0% found this document useful (0 votes)
117 views9 pages

Database User Accounts and Roles Guide

The document discusses how to create database user accounts, profiles, and roles in Oracle. It explains how to create new user accounts and assign them permissions and default tablespaces. It also describes how to create profiles to set limits on database resources for users and the different types of profile parameters. Finally, it covers creating roles, granting roles and users privileges, and revoking privileges.

Uploaded by

Vinu3012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
117 views9 pages

Database User Accounts and Roles Guide

The document discusses how to create database user accounts, profiles, and roles in Oracle. It explains how to create new user accounts and assign them permissions and default tablespaces. It also describes how to create profiles to set limits on database resources for users and the different types of profile parameters. Finally, it covers creating roles, granting roles and users privileges, and revoking privileges.

Uploaded by

Vinu3012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.

Creating Database User Accounts

Creating Users & Roles Page 1


Creating New user Account.

Connected to new user account

Assign permissions to new user account

Creating new tablespace and assign default tablespace to new user account.

Creating Users & Roles Page 2


2. Creating User Profile

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, then that user cannot
exceed these limits.

They are two types are profiles.

a. resource_parameters

b. password_parameters

a. Resource_Parameters: -
1. Session_per_user
2. Cpu_per_session
3. Cpu_per_call
4. Connect_time
5. Idle_time
6. Logical_reads_per_session
7. Logical_reads_per_call
8. Private _SGA
9. Composite_limit.

b. Password_parameters

1.Failed_login_attenpts.

2.password_life_time

3.Password_reuse_time and passwrd _reuse_max

4.password _lock_time

5.password_grace_time

Creating Users & Roles Page 3


Createing New Profile

Creating new profile with Resources

Setting Profile Password Limits: Example The following statement creates the


app_user2 profile with password limits values set:

Creating Users & Roles Page 4


Creating Users & Roles Page 5
3. Createing Roles

grant a CREATE TABLE privilege to the ROLE testing. You can add more privileges
to the ROLE.

grant the role to a user.

To revoke a CREATE TABLE privilege from testing ROLE, you can write:

To drop a role called mother, you can write:

Creating Users & Roles Page 6


Data Control Language (DCL) Statements

 Data Control Language Statements are used to grant privileges on tables, views,
sequences, synonyms, procedures to other users or roles.

 The DCL statements are

 GRANT          :Use to grant privileges to other users or roles.

REVOKE       :Use to take back privileges granted to other users and roles.

 Privileges are of two types:

 SYSTEM PRIVILEGES

 OBJECT PRIVILEGES
 System Privileges are normally granted by a DBA to users. Examples of system
privileges are CREATE SESSION, CREATE TABLE, CREATE USER etc.

 Object privileges means privileges on objects such as tables, views, synonyms,


procedure. These are granted by owner of the object.

 Object Privileges are

 ALTER   Change the table definition with the ALTER TABLE statement.  
DELETE   Remove rows from the table with the DELETE statement.
Note: You must grant the SELECT privilege on the table along with
the DELETE privilege. 
INDEX   Create an index on the table with the CREATE INDEX statement.  
INSERT   Add new rows to the table with the INSERT statement.  

Creating Users & Roles Page 7


REFERENCES   Create a constraint that refers to the table. You cannot grant this
privilege to a role.  
SELECT   Query the table with the SELECT statement.  
UPDATE   Change data in the table with the UPDATE statement.  
  Note: You must grant the SELECT privilege on the table along with
the UPDATE privilege. 

Creating Users & Roles Page 8


You can use the below views to find role related informations,

DBA_ROLES - Roles in DB
DBA_ROLE_PRIVS - Roles granted to users and roles
ROLE_ROLE_PRIVS - Roles which are granted to roles
ROLE_SYS_PRIVS - System privileges granted to roles
ROLE_TAB_PRIVS - Table privileges granted to roles

Creating Users & Roles Page 9

You might also like