Enable the features included in the specified secured feature key for the current connection.
sp_use_secure_feature_key( name , auth_key )
The VARCHAR (128) name of the secured feature key to be enabled.
The CHAR (128) case-sensitive authorization code for the secured feature key being enabled. The authorization code must be at least six characters.
This procedure enables the secured features that are included in the specified secured feature key for the current connection only.
You must have EXECUTE privilege on the system procedure.
None
In order for the following examples to work, the server must be started with the option: -sk securefkey.
The following example enables the SYSTEM secured feature key which includes MANAGE_KEYS for the current connection.
CALL sp_use_secure_feature_key( 'system', 'securefkey' );
The following example enables the SYSTEM secured feature key which includes MANAGE_KEYS, creates a new secured feature key called MYSET with case-sensitive authorization code SecureMySet, and then uses the new secured feature key:
CALL sp_use_secure_feature_key( 'system', 'securefkey' ); CALL sp_create_secure_feature_key( 'myset', 'SecureMySet', 'local,remote' ); CALL sp_use_secure_feature_key( 'myset', 'SecureMySet' );
After switching to the new secured feature key, the current connection is no longer using the SYSTEM secured feature so does not have access to MANAGE_KEYS.