Creates a new secured feature key.
sp_create_secure_feature_key( name , auth_key , features )
The VARCHAR (128) name for the new secured feature key. This argument cannot be NULL or an empty string.
The CHAR (128) case-sensitive authorization code for the secured feature key. The authorization code must be a non-empty string of at least six characters.
The LONG VARCHAR comma-separated list of features that the new key can enable.
Specifying - before a feature means that the feature is not re-enabled when the secured feature key is acquired.
You must have the MANAGE_KEYS feature enabled on the connection to run this system procedure.
This procedure creates a new secured feature key that can be given to any user. The SYSTEM secured feature key is created by using the -sk database server option.
There is a limit of 1000 secured feature keys per database server.
The authorization code must be a non-empty string of at least six characters, and it cannot contain double quotes, control characters (any character less than 0x20), or backslashes.
You must have EXECUTE privilege on the system procedure, as well as the SERVER OPERATOR system privilege.
None
In order for the following example to work, the server must be started with the option: -sk securefkey.
This example enables the SYSTEM secured feature key which includes MANAGE_KEYS, creates a new secured feature key called MYSET with a case-sensitive authorization code SecureMySet, and then uses sp_list_secure_feature_keys to obtain a list of the currently defined secured feature keys:
CALL sp_use_secure_feature_key( 'system', 'securefkey' ); CALL sp_create_secure_feature_key( 'myset', 'SecureMySet', 'local' ); CALL sp_list_secure_feature_keys( );
This example enables the SYSTEM secured feature key which includes MANAGE_KEYS and then creates a new secured feature key called MYSET2 with a case-sensitive authorization code SecureMySet2. The database feature is excluded from the feature set:
CALL sp_use_secure_feature_key( 'system', 'securefkey' ); CALL sp_create_secure_feature_key( 'myset2', 'SecureMySet2', 'local,-database' );