0% found this document useful (0 votes)
2 views

Module-5 session-1

The document outlines the process of controlling user access in a database, detailing the roles of database administrators (DBAs) in managing user privileges and security. It explains the creation of users and roles, as well as the granting of specific system privileges to users. Additionally, it emphasizes the distinction between system and object privileges, and the importance of schemas in organizing database objects.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Module-5 session-1

The document outlines the process of controlling user access in a database, detailing the roles of database administrators (DBAs) in managing user privileges and security. It explains the creation of users and roles, as well as the granting of specific system privileges to users. Additionally, it emphasizes the distinction between system and object privileges, and the importance of schemas in organizing database objects.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Controlling User Access

Database
administrator

Username and password


Privileges

Users
Privileges

• Database security:
– System security
– Data security
• System privileges: Gaining access to the database
• Object privileges: Manipulating the content of the
database objects
• Schemas: Collections of objects, such as tables,
views, and sequences
System Privileges

• More than 100 privileges are available.


• The database administrator has high-level system
privileges for tasks such as:
– Creating new users
– Removing users
– Removing tables
– Backing up tables
Creating Users

The DBA creates users by using the CREATE USER


statement.

CREATE USER user


IDENTIFIED BY password;

CREATE USER scott


IDENTIFIED BY tiger;
User created.
User System Privileges

• Once a user is created, the DBA can grant specific


system privileges to a user.
GRANT privilege [, privilege...]
TO user [, user| role, PUBLIC...];

• An application developer, for example, may have


the following system privileges:
– CREATE SESSION
– CREATE TABLE
– CREATE SEQUENCE
– CREATE VIEW
– CREATE PROCEDURE
Granting System Privileges

The DBA can grant a user specific system privileges.

GRANT create session, create table,


create sequence, create view
TO scott;
Grant succeeded.
What is a Role?

Users

Manager

Privileges

Allocating privileges Allocating privileges


without a role with a role
Creating and Granting Privileges to a Role

• Create a role
CREATE ROLE manager;
Role created.

• Grant privileges to a role


GRANT create table, create view
TO manager;
Grant succeeded.
• Grant a role to users
GRANT manager TO DEHAAN, KOCHHAR;
Grant succeeded.

You might also like