My scenario:
- Schema Name : schema1
- Package Name : pkg_system
- procedure name : proc1
Now I am trying to create synonyms for my proc1 as shown below
CREATE PUBLIC SYNONYM call_proc FOR schema1.pkg_system.proc1;
... but that gave me a syntax error.
ORA-00933: SQL command not properly ended
I changed the code as below:
CREATE PUBLIC SYNONYM call_proc FOR pkg_system.proc1;
I can successfully create synonyms, but when I tried to execute the stored procedure through a synonym:
EXEC call_proc
... got the following error:
ORA-06550: line 1, column 7:
PLS-00201: identifier call_proc must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
And I used the name of the schema to call a procedure of the type schema1.call_Procthat still got the same error.
What have I done wrong here?
source
share