Sets the encryption password.
set encryption passwd 'password_phrase' for {key | column} {keyname | column_name}
is the explicit password specified with the create encryption key or alter encryption key command to protect the key
indicates that Adaptive Server uses this password to decrypt the key when accessing any column encrypted by the named key
may be supplied as a fully qualified name. For example:
[[database.][owner].]keyname
specifies that Adaptive Server uses this password only in the context of encrypting or decrypting the named column. End users do not necessarily know the name of the key that encrypts a given column
name of the column on which you are setting an encryption password. Supply column_name as
[[database.][ owner ]. ]table_name.column_name
The key custodian shares the password required to access employee.ssn with “susan”. He does not need to disclose the name of the key to do this:
If “susan” has select and decrypt permission on employee, she can select employee data using the password given to her for employee.ssn:
set encryption passwd "Ynot387" for column employee.ssn select ename from employee where ssn = '111-22-3456'
ename ----------------------- Priscilla Kramnik
If “susan” attempts to select data from payroll without specifying the password for payroll.ssn, the following select fails (even if “susan” has select and decrypt permission on payroll):
select base_salary from payroll where ssn = '111-22-3456'
You cannot execute 'SELECT' command because the user encryption password has not been set.
To avoid this error, “susan” must first enter:
set encryption passwd "Ynot387" for column payroll.ssn
If a stored procedure or a trigger references a column encrypted by a user specified password, you must set the encryption password before executing the procedure or the statement that fires the trigger.
Sybase does not recommend that you place the set encryption passwd statement inside the trigger or procedure because this could lead to unintentional exposure of the password through sp_helptext. Additionally, hard-coded passwords require you to change the procedure or trigger when a password is changed.