Synonyms, Execute Immediate, ***on another user for another user*** [message #353716] |
Tue, 14 October 2008 17:14  |
tmcallister
Messages: 107 Registered: December 2007
|
Senior Member |
|
|
I know the first answer that is going to be given it that privileges granted via roles do no operate in a procedure, so let's just get that out of the way. I know this is the problem, what I do not know is what privilege I need. I know that the 'create synonym' privilege isn't it .
I have a table BOB on users SCOTT_A and SCOTT_B with public accessibility. I have another 2 other users: SCOTT_LOADER, and SCOTT.
I have a procedure on SCOTT_LOADER that runs:
EXECUTE IMMEDIATE 'create or replace synonym SCOTT.BOB for SCOTT_A.BOB';
This procedure fails with ORA-01031, ORA-06512 errors.
All of SCOTT, SCOTT_A, SCOTT_B, SCOTT_LOADER have the create synonym privilege.
Thanks!
|
|
|
|
|