CREATE PROFILE

2023-12-25 08:49:42  Updated

Purpose

You can use this statement to create a profile. A profile is a set of restrictions on database resources. If you allocate a profile to a user, the user must follow the restrictions.

Syntax

CREATE PROFILE "profile_name" LIMIT
  { FAILED_LOGIN_ATTEMPTS
    | PASSWORD_LOCK_TIME
    | PASSWORD_LIFE_TIME
    | PASSWORD_VERIFY_FUNCTION
    | PASSWORD_GRACE_TIME
    }
    { integer | UNLIMITED | DEFAULT };

Parameters

Parameter Description
profile_name The name of the profile to be created.
FAILED_LOGIN_ATTEMPTS The number of consecutive failed logon attempts allowed for a user account.
PASSWORD_LOCK_TIME The locking period (days) of the account after the specified number of failed logon attempts is reached.
PASSWORD_LIFE_TIME The validity period, in days, of the password.
PASSWORD_VERIFY_FUNCTION Specifies to pass the PL password complexity verification script as a parameter to the CREATE PROFILE statement.
For a function, you must specify the name of the password complexity verification routine. The function must exist in the SYS schema, and you must have the EXECUTE privilege on the function.
If you set this parameter to NULL, password complexity verification is not performed. If you specify an expression for the password parameter, the expression can be of any form except a scalar subquery.
PASSWORD_GRACE_TIME The grace period, in days. In this period, the alert is cleared and account logon is allowed.
integer Indicates that the value of the parameter must be an integer.
UNLIMITED Indicates that no limitation is posed on the format of the parameter value.
DEFAULT Indicates applying the default limitation on the parameter.

Examples

Create a password restriction profile named profile1. Set FAILED_LOGIN_ATTEMPTS to 5, PASSWORD_LOCK_TIME to 1 day, PASSWORD_LIFE_TIME to 60 days, and retain the default value of PASSWORD_GRACE_TIME.

obclient> CREATE PROFILE "profile1" LIMIT
   FAILED_LOGIN_ATTEMPTS 5
   PASSWORD_LOCK_TIME 1
   PASSWORD_LIFE_TIME 60
   PASSWORD_VERIFY_FUNCTION verify_function
   PASSWORD_GRACE_TIME DEFAULT;
Query OK, 0 rows affected

Contact Us