ALTER PROFILE

ALTER PROFILE — change the definition of a security profile


Synopsis

ALTER PROFILE name RENAME TO new_name
ALTER PROFILE name LIMIT parameter value [...]

Description

ALTER PROFILE changes the definition of a security profile. There are several subforms described below.

The RENAME form changes the name of the security profile.

The LIMIT changes the limits applied to users that this security profile assigned to.

You must be a database system administrator or a superuser to use ALTER PROFILE.


Parameters

name

The name of an existing security profile to alter.

new_name

The new name for the security profile.

LIMIT parameter value [ ... ]

The security profile limits to alter.

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.


Examples

To rename the default security profile to profile9352:

ALTER PROFILE profile0 RENAME TO profile9352;

To add a new limit setting for a security profile:

ALTER PROFILE profile0 LIMIT max_failed_attempts 50;

To set several values in one command:

ALTER PROFILE profile0 LIMIT max_failed_attempts 50 auto_unlock TRUE;

To remove a limit from a security profile:

ALTER PROFILE profile0 LIMIT password_len NULL;

Compatibility

There is no ALTER PROFILE statement in the SQL standard.


See Also

CREATE PROFILE, DROP PROFILE, CREATE ROLE, ALTER ROLE