Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: dbms_job failures
In article <9ivg08$9mm_at_dispatch.concentric.net>, "Jim says...
>
>I found the SNP trace logs and this is the error being generated
>
>*** SESSION ID:(9.13895) 2001-07-16 12:01:11.318
>*** 2001-07-16 12:01:11.318
>ORA-12012: error on auto execute of job 61
>ORA-06550: line 1, column 102:
>PLS-00201: identifier 'FIT_DBA.AMS_JOB' must be declared
>ORA-06550: line 1, column 102:
>PL/SQL: Statement ignored
>
>Why would the SNP process have problems resolving the user.package
>qualifier? I'm logged in as user 'FIT' which as stated in the previous
>message, can run the procedure without problems from an anonymous block.
>
>Thanks
>
>
>--
>Jim Poe (jpoe_at_fulcrumit.com)
>
>
DBMS_JOB runs with no roles enabled. You have the ability to execute FIT_DBA.AMS_JOB via a role.
Here is an example, shows that a direct grant will correct this:
ops$tkyte_at_ORA815> create procedure p as begin null; end;
2 /
Procedure created.
ops$tkyte_at_ORA815> grant execute on p to connect; Grant succeeded.
ops$tkyte_at_ORA815> @connect scott/tiger
scott_at_ORA815> exec ops$tkyte.p
PL/SQL procedure successfully completed.
scott_at_ORA815> variable n number
scott_at_ORA815> exec dbms_job.submit( :n, 'ops$tkyte.p;' )
PL/SQL procedure successfully completed.
scott_at_ORA815> print n
N
1
scott_at_ORA815> exec dbms_job.run(1)
BEGIN dbms_job.run(1); END;
*
ERROR at line 1:
ORA-12011: execution of 1 jobs failed ORA-06512: at "SYS.DBMS_IJOB", line 394 ORA-06512: at "SYS.DBMS_JOB", line 276 ORA-06512: at line 1
scott_at_ORA815> @connect /
ops$tkyte_at_ORA815> grant execute on p to scott
2 /
Grant succeeded.
ops$tkyte_at_ORA815> @connect scott/tiger
scott_at_ORA815> exec dbms_job.run(1)
PL/SQL procedure successfully completed.
scott_at_ORA815>
-- Thomas Kyte (tkyte@us.oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Mon Jul 16 2001 - 14:56:17 CDT