Oracle8i SQL Reference Release 3 (8.1.7) Part Number A85397-01 |
|
SQL Statements:
CREATE CLUSTER to CREATE SEQUENCE, 21 of 25
Use the CREATE
PROFILE
statement to create a profile, which is a set of limits on database resources. If you assign the profile to a user, that user cannot exceed these limits.
See Also: Oracle8i Administrator's Guide for a detailed description and explanation of how to use password management and protection |
You must have CREATE
PROFILE
system privilege.
To specify resource limits for a user, you must:
ALTER
SYSTEM
statement or with the initialization parameter RESOURCE_LIMIT
. (This parameter does not apply to password resources. Password resources are always enabled.)
CREATE
PROFILE
statement
CREATE
USER
or ALTER
USER
statement
See Also:
RESOURCE_LIMIT
parameter
profile
Specify the name of the profile to be created. Use profiles to limit the database resources available to a user for a single call or a single session.
Oracle enforces resource limits in the following ways:
CONNECT_TIME
or IDLE_TIME
session resource limit, Oracle rolls back the current transaction and ends the session. When the user process next issues a call, Oracle returns an error.
UNLIMITED
When specified with a resource parameter, indicates that a user assigned this profile can use an unlimited amount of this resource. When specified with a password parameter, indicates that no limit has been set for the parameter.
DEFAULT
Specify DEFAULT
if you want to omit a limit for this resource in this profile. A user assigned this profile is subject to the limit for this resource specified in the DEFAULT
profile. The DEFAULT
profile initially defines unlimited resources. You can change those limits with the ALTER
PROFILE
statement.
Any user who is not explicitly assigned a profile is subject to the limits defined in the DEFAULT
profile. Also, if the profile that is explicitly assigned to a user omits limits for some resources or specifies DEFAULT
for some limits, the user is subject to the limits on those resources defined by the DEFAULT
profile.
resource_parameters
|
Specify the number of concurrent sessions to which you want to limit the user. |
|
|
Specify the CPU time limit for a session, expressed in hundredth of seconds. |
|
|
Specify the CPU time limit for a call (a parse, execute, or fetch), expressed in hundredths of seconds. |
|
|
Specify the total elapsed time limit for a session, expressed in minutes. |
|
|
Specify the permitted periods of continuous inactive time during a session, expressed in minutes. Long-running queries and other operations are not subject to this limit. |
|
|
Specify the permitted number of data blocks read in a session, including blocks read from memory and disk. |
|
|
Specify the permitted the number of data blocks read for a call to process a SQL statement (a parse, execute, or fetch). |
|
|
Specify the amount of private space a session can allocate in the shared pool of the system global area (SGA), expressed in bytes. Use |
|
|
||
|
Specify the total resources cost for a session, expressed in
|
password_parameters
Restrictions on password parameters:
PASSWORD_REUSE_TIME
is set to an integer value, PASSWORD_REUSE_MAX
must be set to UNLIMITED
.
If PASSWORD_REUSE_MAX
is set to an integer value, PASSWORD_REUSE_TIME
must be set to UNLIMITED
.
PASSWORD_REUSE_TIME
and PASSWORD_REUSE_MAX
are set to UNLIMITED
, then Oracle uses neither of these password resources.
PASSWORD_REUSE_MAX
is set to DEFAULT
and PASSWORD_REUSE_TIME
is set to UNLIMITED
, then Oracle uses the PASSWORD_REUSE_MAX
value defined in the DEFAULT
profile.
PASSWORD_REUSE_TIME
is set to DEFAULT
and PASSWORD_REUSE_MAX
is set to UNLIMITED
, then Oracle uses the PASSWORD_REUSE_TIME
value defined in the DEFAULT
profile.
PASSWORD_REUSE_TIME
and PASSWORD_REUSE_MAX
are set to DEFAULT
, then Oracle uses whichever value is defined in the DEFAULT
profile.
CREATE
PROFILE
Example
The following statement creates the profile prof
:
CREATE PROFILE prof LIMIT PASSWORD_REUSE_MAX DEFAULT PASSWORD_REUSE_TIME UNLIMITED;
The following statement creates the profile system_manager
:
CREATE PROFILE system_manager LIMIT SESSIONS_PER_USER UNLIMITED CPU_PER_SESSION UNLIMITED CPU_PER_CALL 3000 CONNECT_TIME 45 LOGICAL_READS_PER_SESSION DEFAULT LOGICAL_READS_PER_CALL 1000 PRIVATE SGA 15K COMPOSITE_LIMIT 5000000;
If you then assign the system_manager
profile to a user, the user is subject to the following limits in subsequent sessions:
DEFAULT
profile.
ALTER
RESOURCE
COST
statement.
system_manager
profile omits a limit for IDLE_TIME
and for password limits, the user is subject to the limits on these resources specified in the DEFAULT
profile.
The following statement creates profile myprofile
with password profile limits values set:
CREATE PROFILE myprofile LIMIT FAILED_LOGIN_ATTEMPTS 5 PASSWORD_LIFE_TIME 60 PASSWORD_REUSE_TIME 60 PASSWORD_REUSE_MAX UNLIMITED PASSWORD_VERIFY_FUNCTION verify_function PASSWORD_LOCK_TIME 1/24 PASSWORD_GRACE_TIME 10;
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|