User, Administration Create Complete
User, Administration Create Complete
---
users, granting and revoking privileges, and managing roles and profiles. It is
---
Users in Oracle Database are the accounts that allow individuals to log in and
Syntax:
Example:
'mypassword123'. By default, the user will not have any privileges to perform
operations.
---
2. Grant Privileges
Privileges control what a user is allowed to do in the database. There are two
Page 1
Oracle Database User Management Guide
a. System Privileges
System privileges allow users to perform tasks like creating tables or logging
in.
Syntax:
Example:
The above command grants the CREATE SESSION privilege to 'john', allowing
b. Object Privileges
Object privileges allow users to interact with specific database objects like
tables or views.
Syntax:
Example:
This allows 'john' to query and insert data into the 'employees' table. To grant
---
3. Revoke Privileges
a. System Privileges
Syntax:
Page 2
Oracle Database User Management Guide
Example:
b. Object Privileges
Syntax:
Example:
---
Types of Roles:
sets of privileges.
a. Create a Role
Syntax:
Page 3
Oracle Database User Management Guide
Example:
Syntax:
Example:
Syntax:
Example:
---
Profiles are used to control database resource usage and enforce password
- To set limits on system resources for users (e.g., CPU usage, sessions).
a. Create a Profile
Page 4
Oracle Database User Management Guide
Syntax:
Example:
SESSIONS_PER_USER 2
PASSWORD_LIFE_TIME 30;
This profile restricts users to 2 sessions and forces password changes every
30 days.
Syntax:
Example:
c. Modify a Profile
Syntax:
Example:
d. Drop a Profile
Syntax:
Example:
The CASCADE option ensures all users associated with the profile are switched
Page 5
Oracle Database User Management Guide
---
6. Summary Table
Summary Table
Command Purpose Example
Page 6