DBMS_JOB errors: PLS-00201: identifier 'package.proc_name' must be declared
Hi all,
I am new to writing packages and procedures. I have 2 boxes a live box and a test box. I have a job which runs a procedure which is part of a package via dbms_job and another which deletes rows from a certain table . Now i have exported the schema to the test box and set up the jobs but am finding these errors when it tries to execute the jobs:
ORA-12012: error on auto execute of job 22
ORA-06550: line 1, column 96:
PLS-00201: identifier 'package_name.proc_name' must be declared
ORA-06550: line 1, column 96:
PL/SQL: Statement ignored
ORA-12012: error on auto execute of job 7
ORA-06550: line 1, column 117:
PL/SQL: ORA-01031: insufficient privileges
ORA-06550: line 1, column 96:
PL/SQL: SQL Statement ignored
Can anyone shed some light on this?
Thanks in advance,
Chucks
another cause of this error
I also had this error.
It actually turned out to be something simple. In Oracle, when you declare a package name with double quotes, it defaults to upper case. Object names are case sensitive.
So, CREATE OR REPLACE PACKAGE "DBO"."PkgName" would create
DBO.PKGNAME. However, depending on the editor, it may (in my case it did) display PkgName, but will register PKGNAME in the database.
This means a call to PkgName.procedure would raise PLS-00201: identifier PkgName must be declared.
The answer? Either use caps as a standard naming convention or don't use the double quotes. The quotes are only needed if there is a space in the object name.