Monday, July 21, 2014

Ora-06508: Pl/Sql: Could Not Find Program Unit Being Called: DBSNMP.BSLN_INTERNAL

You are seeing following errors in the database alert.log file:

ORA-12012: error on auto execute of job 41042
ORA-04063: package body "DBSNMP.BSLN_INTERNAL" has errors
ORA-06508: PL/SQL: could not find program unit being called:
"DBSNMP.BSLN_INTERNAL"
ORA-06512: at line 1

or

Errors in file <trace file name>.trc:
ORA-12012: error on auto execute of job 11689
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "DBSNMP.BSLN_INTERNAL", line 2073
ORA-06512: at line 1


Solution:
For security reasons, the privileges on DBMS_JOB package to public has been removed.
Verify:

select * from dba_tab_privs where table_name='DBMS_JOB';

GRANTEE      OWNER        TABLE_NAME   GRANTOR      PRIVILEGE    GRA HIE
------------ ------------ ------------ ------------ ------------ --- ---
OWBSYS       SYS          DBMS_JOB     SYS          EXECUTE      NO  NO
SYSMAN       SYS          DBMS_JOB     SYS          EXECUTE      NO  NO
EXFSYS       SYS          DBMS_JOB     SYS          EXECUTE      NO  NO

Please grant explicit execute permissions on DBMS_JOB to DBSNMP user:
sqlplus / as sysdba
GRANT EXECUTE ON sys.dbms_job to DBSNMP;


I hope this helps.

Please feel free to leave your questions or suggest improvements to this section.

2 comments:

  1. Hi Boris,
    I am getting ORA-04023 before ORA-06508. Will above solution work in this case as well?
    Because it just says could not be validated or authorized a particular object. I am able to compile this package in backend but from DAC sometimes, I get above error messages.

    Vivek

    ReplyDelete
  2. 1. Please grant explicit execute permissions on DBMS_JOB to DBSNMP user.
    2. Run following script to find out the objects which are having timestamp discrepencies.

    Connect as / as sysdba
    SQL> @?/rdbms/admin/utldtchk.sql

    3. Recompile all invalid objects.

    ReplyDelete