redbadgers
Programmer
I have a stored procedure that accepts object type and object name as inputs then generates a DROP statement and exec immediate as dynamic SQL.
It works fine for all object types except PUBLIC SYNONYM.
When user with DBA role (such as "SYSTEM")invokes this procedure to drop a PUBLIC SYNONYM foo, it will yield insufficent privilege error on the "DROP PUBLIC SYNONYM foo" statement. The user with DBA role can execute the same "DROP PUBLIC SYNONYM foo" statement successfully on the SQL*Plus command line; but not from inside of the stored procedure.
Any Clue? It failed on both Oracle 9i and 10g.
Thanks!
Regards, Nancy
It works fine for all object types except PUBLIC SYNONYM.
When user with DBA role (such as "SYSTEM")invokes this procedure to drop a PUBLIC SYNONYM foo, it will yield insufficent privilege error on the "DROP PUBLIC SYNONYM foo" statement. The user with DBA role can execute the same "DROP PUBLIC SYNONYM foo" statement successfully on the SQL*Plus command line; but not from inside of the stored procedure.
Any Clue? It failed on both Oracle 9i and 10g.
Thanks!
Regards, Nancy