Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Roles creation issue in oracle database

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 01-02-2010
Member
 
Join Date: Nov 2009
Posts: 39
Roles creation issue in oracle database
  

I am new to database , I am having a small assignment in my course .The assignment is like that..Assume you are the DBA of a large international banking concern (sites in three countries). You have just taken over the position and found that there is currently no roles used in the database. What roles do you need to create? Consider job function, location, and any other criteria you can identify.
They are asking the role alone not the code in oracle , so please help me to solve the Roles creation issue in oracle database.

Reply With Quote
  #2  
Old 01-02-2010
Member
 
Join Date: Oct 2005
Posts: 2,389
Roles description in oracle

The role is a powerful and secure feature of oracle database.It is a group of privileges that can be granted to one or more than one users and role obviously.

If you are working in an organization as a DBA and you are responsible to create and manage the database user. In a particular organization, there are so many employees are working on different posts and their needs of data usage are also different.It is not so easy to write the grant statement for every user according to their accessibility. As a DBA you need to categorize the user in different sections or departments and after that you can create and use the role and easily grant the permission to every users of database.
Reply With Quote
  #3  
Old 01-02-2010
Member
 
Join Date: May 2008
Posts: 2,383
Roles creation in oracle database

Creating Role in database:
If you are not working as a DBA,then you need to have the privileges to create the role .

The syntax for creating role:

Code:
CREATE ROLE_NAME 
[ NOT IDENTIFIED |
IDENTIFIED {BY password | USING [schema.] package | EXTERNALLY | GLOBALLY } ;
ROLE_NAME - identifies the name of the Role.

NOT IDENTIFIED means the role is enabled and no need for password to enable it.

IDENTIFIED means the role creator(user) must be authorized by particular method before enabling the role and the respective options are given like by PASSWORD, EXTERNALLY and GLOBALLY.
__________________
The FIFA Manager 2009 PC Game
Reply With Quote
  #4  
Old 01-02-2010
Member
 
Join Date: Feb 2008
Posts: 1,845
Granting privileges to Roles in oracle database

After the creation,you need to grant some privileges to the role.Suppose, I have different posts in organization like manager and executive. I will create a role named " MANAGER_ROLE".
Now, its time to assign some privileges to that created role. I want to grant only SELECT, INSERT AND UPDATE PRIVILEGE to the manager of every managers.That would be as follows :

Code:
CREATE ROLE MANAGER_ROLE
IDENTIFIED BY MAN123;
Granting the privilege to the role:

Code:
GRANT SELECT,INSERT,UPDATE ON <Object_name> TO MANAGER_ROLE;
Reply With Quote
  #5  
Old 01-02-2010
Member
 
Join Date: Jan 2008
Posts: 1,515
Assigning Roles to users in oracle database

Now, you can easily grant the created role to one or more users of the database.The syntax would be as follows:

Code:
GRANT name_of_role TO name_of_user;
The implementation of the role would be as follows for SCOTT user:

Code:
GRANT MANAGER_ROLE to scott;
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Roles creation issue in oracle database"
Thread Thread Starter Forum Replies Last Post
sql server new database creation error. . Rizwan_Akhter Windows Software 1 17-10-2011 12:41 PM
Creation of tablespace in oracle database Garlands Software Development 3 05-02-2010 10:58 PM
Users,Roles and privileges in Oracle Garlands Software Development 4 29-01-2010 02:56 PM
Creation of a database in OOo Theodore Software Development 3 18-03-2009 07:31 PM


All times are GMT +5.5. The time now is 04:05 AM.