This example changes the password to the important_key encryption key. If the key owner executes this command, it reencrypts the base key; if the user assigned a key copy executes this command, it reencrypts that key copy.
alter encryption key important_key with passwd 'oldpassword' modify encryption with passwd 'newpassword'
Changes the password on a key copy to the current session’s login password. This command can be executed only by a user who has been assigned a key copy:
alter encryption key important_key modify encryption with passwd login_passwd
Changes the password for the important_key encryption key to the system password. This command can be executed only by the key owner or a user with sso_role, and is allowed only if a key has no key copies. It modifies the encryption of the base key:
alter encryption key important_key with passwd 'ReallyBigSecret' modify encryption with passwd system_encr_passwd
Changes the password for the important_key encryption key from the system encryption password to a new password (because the system encryption password is the default password, it does not need to be specified in the statement):
alter encryption key important_key modify encryption with passwd 'ReallyNewPassword'
Adds encryption for user “ted” for
the important_key encryption key with
the password just4now
:
alter encryption key important_key with passwd 'TopSecret' add encryption with passwd 'just4now' for user 'ted'
Modifies the encryption for user “ted” to use a new password. Only “ted” can execute this command:
alter encryption key important_key with passwd 'just4now' modify encryption with passwd 'TedsOwnPassword'
Drops encryption for user “ted” for
the important_key
encryption
key:
alter encryption key important_key drop encryption for user 'ted'
Modifies the owner of important_key to new owner, “tinnap:”
alter encryption key important_key modify owner tinnap