Home » SQL & PL/SQL » SQL & PL/SQL » Running this function resolved with error:ORA-31603...
Running this function resolved with error:ORA-31603... [message #221723] Wed, 28 February 2007 03:29 Go to next message
shlomi_bt
Messages: 16
Registered: August 2005
Location: Canada
Junior Member

Hi,
i get the error and i don't find which priv I miss:
ORA-31603: object "ADVERTISER_AES_FK3" of type REF_CONSTRAINT not found
in schema "CORE_CUST" ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.DBMS_METADATA", line 628 ORA-06512: at
"SYS.DBMS_METADATA", line 1221 ORA-06512: at line 1 ORA-06512: at
"ONAIR.UPDATE_TAB_PKG", line 1480

when i'm missing some privilidge when trying to perform this statment:
sql>SELECT UPDATE_TAB_PKG.fk_ddl('AGENCY_AES_FK3','R','CORE_CUST')
FROM DUAL;

The function is:
FUNCTION fk_ddl (fk_name in varchar2
,fk_type in varchar2,in_schema in varchar2 )

RETURN varchar2
IS
Result varchar2(4000);
i_long long;
BEGIN
IF fk_type in ('R') THEN
SELECT DBMS_METADATA.get_ddl('REF_CONSTRAINT',fk_name,in_schema)
into i_long FROM DUAL;
Result:=trim(substr(i_long,1,length(i_long)))||';';
END IF;
IF fk_type in ('C') THEN
SELECT DBMS_METADATA.get_ddl('CONSTRAINT',fk_name,in_schema)
into i_long FROM DUAL;
Result:=trim(substr(i_long,1,length(i_long)))||';';
END IF;
RETURN Result;
END fk_ddl;

can someone help me with that


When i ran this directly from sqlplus it works and return data
Re: Running this function resolved with error:ORA-31603... [message #221863 is a reply to message #221723] Wed, 28 February 2007 13:17 Go to previous messageGo to next message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
Did you grant your privs through a role?
Re: Running this function resolved with error:ORA-31603... [message #222979 is a reply to message #221863] Wed, 07 March 2007 02:11 Go to previous messageGo to next message
shlomi_bt
Messages: 16
Registered: August 2005
Location: Canada
Junior Member

both. directly and to the rows. error is the same
Re: Running this function resolved with error:ORA-31603... [message #223634 is a reply to message #221723] Fri, 09 March 2007 20:32 Go to previous message
Barbara Boehmer
Messages: 8625
Registered: November 2002
Location: California, USA
Senior Member
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1464804639878#28729949069626
Previous Topic: can we insert in multiple tables with one insert command
Next Topic: Passing of a parametrrs to procedure
Goto Forum:
  


Current Time: Sun Dec 04 23:11:51 CST 2016

Total time taken to generate the page: 0.05758 seconds