Set Encryption password and SQL20143N

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jon.Hakkinen@gmail.com

    Set Encryption password and SQL20143N

    Hi all,

    I'm on DB2 9.5 fp 0 on Windows.
    I have a simple SQL stored procedure which uses the Encrypt() function
    to insert data in a table.
    I do not set the encryption password inside the procedure, I plan to
    issue an Set Encryption statement at the beginning of every database
    session from our middle layer.

    But for now I use clp or db2ce to run something like

    Set encryption password = 'password';
    call sp();

    When trying to run it, I get
    SQL20143N The encryption or decryption function failed, because the
    ENCRYPTION PASSWORD value is not set. SQLSTATE=51039

    Is embedding the 'Set encryption password' statement in all my sql
    stored procedures the only option I have here?

    thanks!

Working...