the scenarion is like this...
I HAVE a namespace XXX
where I created some tables and some stored procedures...
THEY HAVE a namespace YYY
where they created some tables...
THEY GRANTED XXX
access to their tables, so when I conect to SQL Developer using XXX
connection, I can do:
SELECT * FROM YYY.TableA
But if I try to run that very same statement from inside a stored procedure (either simple stored procedure or a package), the stored procedure does not compile. It happens to a lot of sp's. Is there any other permission that I have to ask for??? I'm running sp's like this:
CREATE OR REPLACE PROCEDURE PRC_SOMESP(
) AS BEGIN
END PRC_SOMESP;
Procedures that does not access YYY tables do compile well.
Thanks in advance.
After Justin Cave response, I'm trying to add "AUTHID CURRENT_USER" sentence to the sp's but getting the same "table or view does not exist" result:
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 anything else???
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…