Re: I needhelp

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Tue, 3 Feb 2004 08:09:45 -0500
Message-ID: <SfWdncTCDK1cAILd4p2dnA_at_comcast.com>


"tracy" <tracykim10_at_yahoo.com.hk> wrote in message news:5c91cce9.0402030109.2b333fa1_at_posting.google.com...
| hi, mcs,
|
| I have dba_1 created a role called TESTING. From the SQL, if a connect
| as dba_1, i can see the role.
|
| SQL> CONN dba_1/dba_1
| Connected.
| SQL> select distinct role from role_tab_privs;
|
| ROLE
| ------------------------------
| TESTING
| ITEM_ROLE
|
| And dba_2 has created ITEM_ROLE
| SQL> conn dba_2/dba_2
| Connected.
| SQL> select distinct role from role_tab_privs;
|
| ROLE
| ------------------------------
| ITEM_ROLE
|
| But if, i conncet as dba, I can't see the role TESTING as below:
|
| SQL> conn system/manager
| Connected.
| SQL> select distinct role from role_tab_privs;
|
| ROLE
| ------------------------------
| POSTGRAD_ROLE
| TUTORMNGT_ROLE
| p/s: these two roles created using sysem_id.
|
|
| I curios, why when i log in using system, i can't see ITEM_ROLE and
| TESTING.
| and why dba_1 can see role created by dba_2(Item_role)but dba_2 can't
| see role created by dba_1 (TESTING role)
|
| DBA_1 AND DBA_2 were granted DBA priviledge.
|
|
| Thanz.

Why are you looking in ROLE_TAB_PRIVS? That view does not contain the list of roles, it lists table privileges granted to roles, specifically the roles which the current user has granted to it.

DBA_ROLES is where you need to look. Also, take some time to read thru the Oracle Reference Manual's chapter on 'Static Data Dictionary Views'.

Make sure that when you choose a table or view for your query that you are choosing the object that most directly defines the data you're looking for, not a table that contains (some) references to the data. this is important when accessing the data dictionary and when writing application code.

  • mcs
Received on Tue Feb 03 2004 - 14:09:45 CET

Original text of this message