the script is like this ...
I have a XXX namespace where I created some tables and some stored procedures ...
We have a YYY namespace where they created several tables ...
THEY GIVES XXX access to their tables, so when I connect to SQL Developer using the XXX connection, I can do:
SELECT * FROM YYY.TableA
But if I try to run the same statement from a stored procedure (either a simple stored procedure or a package), the stored procedure will not compile. This happens to many sp. Is there any other permission I should ask for? I run sp like this:
CREATE OR REPLACE PROCEDURE PRC_SOMESP( ) AS BEGIN END PRC_SOMESP;
Procedures that do not have access to YYY tables compile well.
Thanks in advance.
After Justin Cave's answer, I try to add the sentence "AUTHID CURRENT_USER" to sp, but get the same result "table or view does not exist":
CREATE OR REPLACE PROCEDURE PRC_PROC1( PARAMETERS... ) AUTHID CURRENT_USER AS MYVAR NUMBER; BEGIN STATEMENTS... END PRC_PROC1; CREATE OR REPLACE PACKAGE PKG_PROC2 AUTHID CURRENT_USER AS TYPE T_CURSOR IS REF CURSOR; PROCEDURE PRC_PROC2( PARAMETERS... ) END PKG_PROC2
Should I check something else?
oracle stored-procedures
user509925
source share