Home » SQL & PL/SQL » SQL & PL/SQL » To get all privileges, roles granted to a user
icon1.gif  To get all privileges, roles granted to a user [message #270410] Wed, 26 September 2007 16:39 Go to next message
harry07
Messages: 61
Registered: June 2007
Location: now york
Member
Hi Forum

I want to get all the privileges, roles granted to a user in database( 9.2.0.7).

Can anybody please help me with this.

Thanks a lot in advance,
Hary
Re: To get all privileges, roles granted to a user [message #270411 is a reply to message #270410] Wed, 26 September 2007 16:50 Go to previous messageGo to next message
Soumen Kamilya
Messages: 128
Registered: August 2007
Location: Kolkata
Senior Member

connect to a sys:
then run the script:
GRANT DBA,RESOURCE,CONNECT TO <USER_NAME>


Cheers
Soumen
Re: To get all privileges, roles granted to a user [message #270414 is a reply to message #270411] Wed, 26 September 2007 18:13 Go to previous messageGo to next message
pablolee
Messages: 2835
Registered: May 2007
Location: Scotland
Senior Member
Read the question again Soumen. The op want to find out what the privs ARE that are granted to a specific user.
Re: To get all privileges, roles granted to a user [message #270441 is a reply to message #270410] Wed, 26 September 2007 22:03 Go to previous messageGo to next message
muzahid
Messages: 281
Registered: September 2004
Location: Dhaka, Bangladesh
Senior Member
select * from dba_role_privs where grantee = user_name


User_name should be upper case
Re: To get all privileges, roles granted to a user [message #270457 is a reply to message #270410] Thu, 27 September 2007 00:27 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Quote:
User_name should be upper case

Not true.
Re: To get all privileges, roles granted to a user [message #270459 is a reply to message #270410] Thu, 27 September 2007 00:31 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Have a look at this example. It will be clear.

SQL> create user t identified by t;

User created.

SQL> drop user t;

User dropped.

SQL>  create user "t" identified by t;

User created.

SQL> drop user t;
drop user t
          *
ERROR at line 1:
ORA-01918: user 'T' does not exist

SQL> drop user "t";

User dropped.


Re: To get all privileges, roles granted to a user [message #270460 is a reply to message #270410] Thu, 27 September 2007 00:37 Go to previous message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
dba_role_privs
dba_sys_privs
dba_tab_privs
dba_col_privs

Regards
Michel
Previous Topic: RDB7 Equivalent function of LEN(), or any way
Next Topic: Enabling parallel DML in dbms_scheduler
Goto Forum:
  


Current Time: Fri Dec 09 00:08:22 CST 2016

Total time taken to generate the page: 0.11229 seconds