Profiles are used to limit the system and database resources that are used by users and to manage passwords. If you do not specify a profile when you create a user,
The default profile will be used.
1. Create profile by using the "create" Profile command
The syntax format is as follows:
Create profile profile_name limit
resource_parameters | password_parameters;
Where resource_parameters is used to specify the parameters of a resource constraint, password_parameters is used to specify a password parameter.
(1) The syntax format of Resource_parameters is as follows:
[Sessions_per_user integer | unlimited | default]--Limit the number of concurrent sessions for a user * *
[cpu_per_session integer | unlimited | default]--Limited CPU time to make a session, in S/100 unit * *
[cpu_per_call integer | unlimited | default]--Limit CPU time for one call/
[Connect_time integer | Unlimited | Default]--Limit the duration of a session, in Min unit/
[idle_time integer | unlimited | default]--Limit the continuous inactivity time of a session to Min as a unit * *
Logical_reads_per_session Integer | Unlimited | Default]--Specifies the number of data blocks read in a session
, including the number of blocks read from memory and disk.
[logical_reads_per_call integer | unlimited | default]-- Specifies the number of data blocks to be processed at one time by the processing of an SQL statement.
* [composite_limit integer | unlimited | default]--Specify the resource cost for a session, representing the parameter value in a service unit
* /
[Private_sga integer {k| M} | Unlimited | Default]--Specify the number of private spaces that a session can allocate for a shared pool in the system global zone.
(2) The syntax format of Password_parameters is as follows:
[Failed_login_attempts expression | unlimited | default]-the number of times a login is allowed to fail before the account is locked,
by default 10 times/
[password_life_time Expression | Unlimited | Default]--Set the password validity period, in days, after the expiration
date will be forced to modify the password, the default 180 days/
[password_reuse_time expression | unlimited | default]-- Specify the number of days that passwords are not reused, default
unrestricted/
[Password_reuse_max expression | unlimited | default]-the number of times a password needs to be changed before the password is reused
, Default Unlimited */
[password_lock_time expression | unlimited | default]--Specifies the number of days to lock accounts due to multiple logon failures
, default 1 days/*
[Password_ Grace_time Expression | Unlimited | Default]--Set the expiration time of the password, the unit is the day, the
7 days is defaulted to
[password_verify_function functionname | null | default]-- Use a function to verify the complexity of the password,
null means no checksum
Sample code:
Create profile Myprofile limit
password_login_attempts 5
password_lock_time 5;
Alter user Hello profile myprofile;
Description
The above code creates a profile named Myprofile and gives it to the user hello, which indicates that if the user Hello 5 consecutive logon failures, the user hello will be locked for 5 days.
2. Modify profile using ALTER profile command
The syntax format is as follows:
Alter profile profile_name limit
resource_parameters | password_parameters;
Sample code:
Modify Profile Myprofile, set password expiration time to 10 days, set every 60 days to modify the password, the code is as follows:
Alter profile myprofile limit
password_grace_time
password_life_time 60;
3, use the Drop profile command to delete profiles
The syntax format is as follows:
Drop profile profile_name;
For example, delete a profile myprofile as follows:
Drop profile Myprofile;
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/