[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

want to create a role

Posted on 2011-10-10
4
Medium Priority
?
328 Views
Last Modified: 2012-06-27
Hi guys,
I want to create a role and want to grant this role to some of the users.Whats the right path to achieve this.
Which clause should I use identified by or not identified.
0
Comment
Question by:nirvairghuman
  • 2
  • 2
4 Comments
 
LVL 74

Accepted Solution

by:
sdstuber earned 332 total points
ID: 36942738
if the role itself needs a password then use identified  (this isn't common)

create role YOUR_ROLE;

grant YOUR_ROLE to YOUR_USER;

grant select on YOUR_TABLE to YOUR_ROLE;
0
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 332 total points
ID: 36942748
you would use the identified by clause if the role shouldn't be enabled by default and users that wanted to enable it would be required to enter the password to do so
0
 
LVL 23

Assisted Solution

by:OP_Zaharin
OP_Zaharin earned 168 total points
ID: 36942764
- use identified if you want a password protected role. i would suggest that you go thru the CREATE ROLE documentation:
http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_6011.htm
http://psoug.org/reference/roles.html

- steps to create a role:
SQL> CREATE ROLE select_table_role;
SQL> GRANT SELECT ON table1, table2 TO select_table_role;
SQL> GRANT select_table_role TO user;
0
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 36942778
- the steps i provide is almost the same as sdstuber. as additional you should go thru the link i provided for more option on create role.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question