want to create a role

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.
nirvairghumanAsked:
Who is Participating?
 
sdstuberCommented:
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
 
sdstuberCommented:
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
 
OP_ZaharinCommented:
- 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
 
OP_ZaharinCommented:
- 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.