Thursday, 9 August 2012

What is a Role in ORACLE?How to Create and Grant Privileges to a Role

What is a Role?
A role is a named group of related privileges that can be granted to the user. This method makes it easier to revoke and maintain privileges.
A user can have access to several roles, and several users can be assigned the same role. Roles are typically created for a database application.
Creating and Assigning a Role
First, the DBA must create the role. Then the DBA can assign privileges to the role and users to the role.
Syntax:
CREATE ROLE role_name;
In the syntax:
Role_name is the name of the role to be created
Now that the role is created, the DBA can use the GRANT statement to assign users to the role as well as assign privileges to the 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 AJAY,RAHUL;
Grant succeeded

Note: The following four points about roles:
1.  Are named groups of related privileges
2.  Can be granted to users
3.  Simplify the process of granting and revoking privileges
4. Are created by a DBA

1 comment:

  1. It is a known fact that ILLUMINATI consist of Multi Millionaires,Billionaires who have major influence regarding global affairs, and planning of a New world order. Many world leaders, Presidents, prime ministers, royalty and senior executives are members of ILLUMINATI. follow the steps to Excel in Life. you'll have numerous benefits,for the FIRST TIME IN HISTORY, we are opening our doors to those who believe. If you would like to join ILLUMINATI , to sign up Text: leovincey08@gmail.com or whatsapp +2349033667873 now if you are really serious to help your self

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...

ShareThis