Home » SQL & PL/SQL » SQL & PL/SQL » ORA-31603 when using DBMS_JOB.SUBMIT
ORA-31603 when using DBMS_JOB.SUBMIT [message #589425] Fri, 05 July 2013 07:36 Go to next message
anvi123
Messages: 1
Registered: July 2013
Location: Milan, Italy
Junior Member
I'm using dbms_metadata.get_ddl inside a package and I have a problem: if I execute the package directly, like "exec pkg_util.read_ddl('TA_DL_IDP', 'RMI_KUNDE') it works fine.
If I submit the same procedure using DBMS_JOB.SUBMIT, I get an error:
Err_code: -31603 - MSG: ORA-31603: object "RMI_KUNDE" of type TABLE not found in schema "TA_DL_IDP"

I know that in order to use dbms_metadata.get_ddl I need to have SELECT_CATALOG_ROLE and I know about the necessity to give explicit grants to objects rather than using roles when running pl/sql code from inside a package, but this is different: the different behavior is between running the same package in foreground and submitting it using DBMS_JOB.SUBMIT.
Re: ORA-31603 when using DBMS_JOB.SUBMIT [message #589429 is a reply to message #589425] Fri, 05 July 2013 09:08 Go to previous message
mikomi
Messages: 33
Registered: July 2013
Member
Sounds like a problem with IR vs DR.
Not familiar with your issue directly but a quick search has an asktom at the top of the list and he goes straight to the issue of roles being disabled when you use DBMS_JOB

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:24065646637395

Have you tried "SET ROLE NONE" in sqlplus before executing the package directly, to verify that you're able to execute the package directly because of granted roles?

[Updated on: Fri, 05 July 2013 09:46]

Report message to a moderator

Previous Topic: No data found
Next Topic: print the columns of a table
Goto Forum:
  


Current Time: Sun Aug 31 06:01:28 CDT 2014

Total time taken to generate the page: 0.10037 seconds