This sounds really weird but happened in our database yesterday after we migrated to a 11g and RAC from single-instance 10g.
Only one user has trouble accessing tables of another schema after the migration.
Example:
1. Schema = user1
2. table name = tab1
3. role name = role1
4. user1 has given select privilege on tab1 to role1.
5. app user = user2
6. Contains no objects of its own
7. user2 is granted connect and role1 (both default)
8. select * from user1.tab1;
9. ERROR at line 1:
ORA-00942: table or view does not exist
Can anyone guess what the issue might be?
A reply at the earliest would be appreciated.
SQL> conn adtrack
Enter password:
Connected.
SQL> grant select on candidates to adtrack_user;
Grant succeeded.
SQL> conn /as sysdba
Connected.
SQL> select * from dba_user_roles
2 where grantee = 'APP_OPS_REPORTS';
select * from dba_user_roles
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select * from dba_role_privs
2 where grantee = 'APP_OPS_REPORTS';
GRANTEE GRANTED_ROLE ADM DEF
------------------------------ ------------------------------ --- ---
APP_OPS_REPORTS CONNECT NO YES
APP_OPS_REPORTS DEVELOP_MANAGER NO NO
APP_OPS_REPORTS ADTRACK_READ_ONLY NO YES
APP_OPS_REPORTS AQ_USER_ROLE NO YES
APP_OPS_REPORTS ADTRACK_USER NO YES
APP_OPS_REPORTS ADTRACK_MANAGER NO NO
APP_OPS_REPORTS DEVELOP_USER NO NO
APP_OPS_REPORTS ADTRACK_DBA NO NO
APP_OPS_REPORTS RESOURCE NO NO
APP_OPS_REPORTS AQ_ADMINISTRATOR_ROLE NO NO
APP_OPS_REPORTS ADTRACK_BILLING NO NO
11 rows selected.
SQL> conn app_ops_reports
Enter password:
Connected.
SQL> select * from adtrack.candidates where rownum=1;
select * from adtrack.candidates where rownum=1
*
ERROR at line 1:
ORA-00942: table or view does not exist
Hi Vijay,
Thanks for all the replies! and yes, your suggestion worked!!
However, I had opened an SR with Oracle and the following is part of it...
"
Starting with 10.2.0.4, password protected roles are not enabled when granted, as this was considered a security hole. t. You'll need to do an ALTER SESSION
SET ROLE to enable it.
"
and I said: "I dont want to do "alter session" everytime. What is the "global" solution?
29-SEP-09 18:03:45 GMT
Perhaps a logom trigger to do the alter? "
They seem to be side-lined with too many complexities over at Oracle
Again, many thanks for your excellent inputs: I learnt something today...
Bookmarks