CREATE PROFILE
CREATE PROFILE — define a new security profile
Synopsis
CREATE PROFILE [IF NOT EXISTS] name
[ LIMIT parameter value [...]
| FROM template_name ]
Description
CREATE PROFILE adds a new security profile. The security profile name must be
distinct from the name of any existing security profiles.
Security profile is a set of limits applied by an administrator to the user's login process.
Parameters
name
The name of the new security profile.
IF NOT EXISTS
Do not throw an error if a security profile with the same name already exists. A notice is issued in this case. Note that there is no guarantee that the existing security profile is anything like the one that would have been created.
LIMIT parameter value [ ... ]
Specifies the security profile limits separated by space (without = symbol).
The supported parameters are:
-
max_failed_attempts (number | NULL)
Sets a number of the failed login attempts allowed for users that this security profile applied to. Write NULL to drop all restrictions. -
auto_unlock (boolean)
Enables automatic unlocking. -
lockout_duration_sec (number)
Sets a lockout duration (in seconds) for users that this security profile applied to. -
inactivity_lockout_sec (number | NULL)
Sets an automatic lockout after specified inactivity time (in seconds). Write NULL to drop all restrictions. -
password_check (boolean)
Enables using of a password authentication policy to this security profile. -
password_len (number | NULL)
Sets minimal password length for the password authentication policy applied to this security profile. Write NULL to drop all restrictions. -
alphabet_size (number | NULL)
Sets minimal size of a password alphabet for the password authentication policy applied to this security profile. Write NULL to drop all restrictions.
fROM template_name
Specifies the template profile from which this security profile will inherit the limits.
Examples
Create a security profile that inherits from default security profile:
CREATE PROFILE my_profile;
Create a security profile with explicitly specified limits:
CREATE PROFLE my_profile LIMIT max_failed_attempts NULL auto_unlock TRUE;
Create a security profile using template:
CREATE PROFILE my_profile FROM profile0;
Compatibility
There is no CREATE PROFILE statement in the SQL standard.