Home » RDBMS Server » Server Administration » Roles for Active users in a database
Roles for Active users in a database [message #127798] Wed, 13 July 2005 07:37 Go to next message
Mahesh P
Messages: 69
Registered: September 2004
Member
Hi all,

can anyone can give me a query to find all the users/schema with roles assigned to that schema.
simply this shud be like as follows:

User | Role
-----------
A | DBA
B | user

etc..

Thanks & regards,
Mahesh P
Re: Roles for Active users in a database [message #127805 is a reply to message #127798] Wed, 13 July 2005 08:45 Go to previous messageGo to next message
Frank Naude
Messages: 4587
Registered: April 1998
Senior Member
SQL> SELECT * FROM dba_role_privs WHERE grantee = 'SCOTT'
  2  /

GRANTEE                        GRANTED_ROLE                   ADM DEF
------------------------------ ------------------------------ --- ---
SCOTT                          CONNECT                        NO  YES
SCOTT                          RESOURCE                       NO  YES


Best regards.

Frank
Re: Roles for Active users in a database [message #127811 is a reply to message #127798] Wed, 13 July 2005 08:57 Go to previous messageGo to next message
Mahesh P
Messages: 69
Registered: September 2004
Member
thanks Frank,

regards,
Mahesh
Re: Roles for Active users in a database [message #127844 is a reply to message #127798] Wed, 13 July 2005 11:28 Go to previous message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
In general, one thing I have found that is helpful if you want to know the view name to look for something, is to do a query against dba_views. In this case, you are looking for 'ROLE' information, so the query would be like:

select view_name from dba_views where view_name like '%ROLE%';

Of course the reference guide is useful here also, but sometimes it is easier to enter the query than pull up the guide.
Previous Topic: How to upgrade OUI?
Next Topic: max number of datafile per a database
Goto Forum:
  


Current Time: Fri Jan 10 08:01:37 CST 2025