ORA-01031: insufficient privileges - procedure with synonym
Hi,
Im trying to create a procedure which references a synonym.
The synonym is based on a table from a different schema .
I get this error when i try to create the procedure . .
PL/SQL: ORA-01031: insufficient privileges
Eg .
create or replace procedure MyProc
is
tot number ;
Begin
select count(*)
into tot
from synonym my_Syn_Name ;
END ;
If I run the 'select' statement from PLUS I have no errors.
The owner of the synonym is the same as the schema in which I am creating
the Procedure.
The owner of the table on which the synonym is based is in another schema.
The user (that is creating the procedure) has full DBA privileges .
Can anyone Help ? Th eversion of Oracle is 9.2
Thanks