9managing Users and Resources
9managing Users and Resources
What Is a Profile?
A profile is a named set of the following password and resource limits:
• Password aging and expiration
• Password history
• Password complexity verification
• Account locking
• CPU time
• I/O operations
• Idle time
• Connect time
• Memory space (private SQL area for MTS only)
• Concurrent sessions
Altering a Profile:
ALTER PROFILE profile1
FAILED_LOGIN_ATTEMPTS 3
Connect_time 20
PASSWORD_GRACE_TIME 10;
Managing Users
When a database is created the users SYS and
SYSTEM are created automatically and granted the DBA role.
SYS
• Password:
change_on_install
• Owner of the database data dictionary
SYSTEM
• Password:
manager
• Owner of additional internal tables and views used by Oracle tools
identified by <pass_word>
profile <p1>
Dropping user :
DROP USER user [CASCADE]
A privilege is a right to execute a particular type of SQL statement or to access another user’s object.
These include the right to:
• Connect to a database
• Create a table
• Select rows from another user’s table
• Execute another user’s stored procedure
System Privileges
Each system privilege allows a user to perform a particular database operation or class of database
operations. For example, the privilege to create tablespaces is a system privilege.
Object Privileges
Each object privilege allows a user to perform a particular action on a specific object, such as a table,
view, sequence, procedure, function, or package.
Privileges and roles are used to control user access to data and the types of SQL statements that can be
executed. The table that follows describes the three types of privileges and roles:
Category Examples
INDEX CREATE ANY INDEX
ALTER SESSION
RESTRICTED SESSION
TABLESPACE CREATE TABLESPACE
ALTER TABLESPACE
DROP TABLESPACE
UNLIMITED TABLESPACE
Privileges and roles can be granted to other users by users who have been granted the privilege to
do so. The granting of roles and privileges starts at the administrator level. At database creation,
the administrative user SYS is created and granted all system privileges and predefined Oracle
Creating Roles
Create role <role_name>
Dropping role
drop role role;