Home » RDBMS Server » Security » How to check the privileges given to user
How to check the privileges given to user [message #337572] Thu, 31 July 2008 05:10 Go to next message
harshkumar
Messages: 34
Registered: February 2008
Location: Delhi
Member
Hi,

How to check which privilege is granted to a particular user.
Which view can be used to check the same.

Thanks
Harsh
Re: How to check the privileges given to user [message #337575 is a reply to message #337572] Thu, 31 July 2008 05:18 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
There seem to be quite a few dictionary tables related to privileges and grants. Run this to get a list of them :


SELECT * FROM DICTIONARY 
 WHERE Lower(COMMENTS) LIKE '%privilege%' 
   OR  Lower(COMMENTS) LIKE '%grant%' 


Re: How to check the privileges given to user [message #337622 is a reply to message #337575] Thu, 31 July 2008 07:45 Go to previous messageGo to next message
sunil_v_mishra
Messages: 506
Registered: March 2005
Senior Member
SQL>SELECT * FROM DBA_USER_PRIVS WHERE USERNAME='SCOTT';

will give privileges assign to user scott.

and if you want to know any particular privileges like create any table is given to any user than

SQL> SELECT * FROM DBA_USER_PRIVS WHERE PRIVILEGE = 'CREATE ANY TABLE';
Re: How to check the privileges given to user [message #337633 is a reply to message #337622] Thu, 31 July 2008 08:10 Go to previous messageGo to next message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What about object privileges?
What about roles?

Regards
Michel
Re: How to check the privileges given to user [message #338057 is a reply to message #337633] Sat, 02 August 2008 18:45 Go to previous messageGo to next message
sunil_v_mishra
Messages: 506
Registered: March 2005
Senior Member
Best way is to connect your db through toad, in that you will get script of your user with its privileges Shocked

secondly ....u can get create user script of entire DB users through.

SELECT DBMS_METADATA.GET_DDL('USER', username) FROM DBA_users;

Spool the out put....

[Updated on: Sat, 02 August 2008 18:46]

Report message to a moderator

Re: How to check the privileges given to user [message #338071 is a reply to message #338057] Sun, 03 August 2008 01:50 Go to previous messageGo to next message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Show us that your statement gives the privileges.

Regards
Michel
icon5.gif  Re: How to check the privileges given to user [message #338255 is a reply to message #337572] Mon, 04 August 2008 05:51 Go to previous message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Quote:
Spool the out put....

Spooled but seen nothing rather than user creation script.
Previous Topic: How to identify source of password changes
Next Topic: Insufficient privilegs
Goto Forum:
  


Current Time: Sun Dec 11 04:06:54 CST 2016

Total time taken to generate the page: 0.04113 seconds