problem accessing table [message #234604] |
Wed, 02 May 2007 11:27 |
caprikar
Messages: 226 Registered: March 2007
|
Senior Member |
|
|
Hi,
I logged in as USER1:
CREATE TABLE TAB1
Logged as sys:
created a role called SELECT_ROLE;
grant select on USER1.TAB1 to SELECT_ROLE;
grant SELECT_ROLE to USER2;
Logged in as USER2:
create synony TAB1 for USER1.TAB1;
desc TAB1 --> I'm able to see the columns, but
when I try...select * from TAB1, I'm getting ORA-01031: insufficient privileges.
Can anyone tell me what could be the problem?
Thanks,
GK
|
|
|
|
Re: problem accessing table [message #234676 is a reply to message #234607] |
Wed, 02 May 2007 15:40 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Did you, perhaps, try to use this SELECT statement in PL/SQL procedure? If so, bad news for you: you'll have to grant privileges directly to the user (not through a role) because privileges acquired through roles do not apply in PL/SQL.
|
|
|