April 30, 2021
I got ” ORA-04067: not executed, package body does not exist ” error in Oracle database.
ORA-04067: not executed, package body does not exist
Details of error are as follows.
ORA-04067: not executed, string does not exist. Cause: Attempt to execute a non-existent stored procedure. Action: Make sure that a correct name is given.
not executed, package body does not exist
This ORA-04067errors are related with the Attempt to execute a non-existent stored procedure.
To solve this error, Make sure that a correct name is given.
Or Check Procedure name, maybe you can use Mis-spelled the procedure name.
Or Procedure may be invalid or is not recompiled.
Sometimes there is insufficient privilige for the procedure. So grant the execute on procedure as follows.
grant execute on PROCEDURE_NAME to USERNAME;
Do you want to learn Oracle Database for Beginners, then read the following articles.
Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )
1,367 views last month, 7 views today
About Mehmet Salih Deveci
I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA, Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].- -Oracle DBA, SQL Server DBA, APPS DBA, Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için [email protected] a mail atabilirsiniz.
I am working on ASp.net project with backend Oracle DB.
I created a new package with stored procedures to the DB. and Called a stored procedure from package. I am getting following error.
ORA-04067: not executed, package body "WB_APP_MANAGER.WB_PCK_APP_MANAGER" does not exist
ORA-06508: PL/SQL: could not find program unit being called: "WB_APP_MANAGER.WB_PCK_APP_MANAGER"
ORA-06512: at line 1
Please let me know How to solve this issue.
Thanks
asked Jun 24, 2011 at 20:25
praveenbpraveenb
10.5k14 gold badges60 silver badges83 bronze badges
1
Your package specification may be in place but your package body seems to be missing. For any package which is executed the package body must also exist.
select object_type
from dba_objects
where object_name = 'WB_PCK_APP_MANAGER';
The above query must report both PACKAGE and PACKAGE BODY.
If PACKAGE BODY is not reported by the query you need to create the package body.
create or replace package body WB_PCK_APP_MANAGER as
answered Jun 24, 2011 at 20:49
josephj1989josephj1989
9,4299 gold badges47 silver badges70 bronze badges
1
- check if the name is correct — you didn’t misspelled it;
- check if it is compiled;
- check if WB_APP_MANAGER has proper rights to WB_PCK_APP_MANAGER:
select owner, object_name, object_type from dba_objects where object_name = 'WB_PCK_APP_MANAGER';
answered Jun 24, 2011 at 20:29
CristiCCristiC
22k12 gold badges57 silver badges89 bronze badges
1
Ключевые слова для поиска сведений о значениях ошибок Oracle в диапазоне ORA-04000 — ORA-04999:
На русском языке: ошибки Oracle, коды оракловых ошибок;
На английском языке: ORA-04000 — ORA-04999.
The following errors were thrown when upgrading an Oracle database from 12cR1 to 19c release:
*** WARNING: ERRORS FOUND DURING UPGRADE ***
- Evaluate the errors found in the upgrade logs
and determine the proper action. - Rerun the upgrade when the problem is resolved
REASON:
ERRORS FOUND: During Upgrade
FILENAME: /export/db2/upgrade_19c_log//catupgrd0.log AT LINE NUMBER: 991895
Identifier ORDIM 21-01-28 01:23:32
SCRIPT = [/orcl/db2/product/19.3/md/admin/prvtimd.plb]
ERROR = [ORA-04067: not executed, package body “MDSYS.MDPRVT_IDX” does not exist]
STATEMENT = [declare
already_exists exception;
pragma exception_init(already_exists, -00955);
column_exists exception;
pragma exception_init(column_exists, -01430);
begin
begin
execute immediate
‘ CREATE TABLE MDSYS.SDO_INDEX_AGGREGATES_TABLE
(SDO_INDEX_OWNER varchar2(32),
SDO_INDEX_NAME varchar2(32),
SDO_INDEX_OID varchar2(32),
SDO_NUMTILES NUMBER,
SDO_RTREE_NUM_NODES NUMBER,
SDO_NUM_ROWS NUMBER,
SDO_NUM_BLKS NUMBER,
CONSTRAINT unique_aggregate
PRIMARY KEY (SDO_INDEX_OWNER, SDO_INDEX_NAME)) ‘;
exception
when already_exists then NULL;
when others then
SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
‘EXCEPTION[prvtimd.sql(‘ || $$PLSQL_LINE || ‘)1]: ‘ || SQLERRM); RAISE;
end;
begin
execute immediate
‘ Alter table MDSYS.SDO_INDEX_AGGREGATES_TABLE
modify (SDO_INDEX_OWNER varchar2(130),
SDO_INDEX_NAME varchar2(130)) ‘;
exception
when others then
SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
‘EXCEPTION[prvtimd.sql(‘ || $$PLSQL_LINE || ‘)2]: ‘ || SQLERRM); RAISE;
end;
begin
execute immediate
‘ CREATE TABLE MDSYS.SDO_INDEX_METADATA_TABLE
(SDO_INDEX_OWNER varchar2(32),
SDO_INDEX_TYPE varchar2(32),
SDO_LEVEL NUMBER,
SDO_NUMTILES NUMBER,
SDO_MAXLEVEL NUMBER,
SDO_COMMIT_INTERVAL NUMBER,
SDO_INDEX_TABLE varchar2(32),
SDO_INDEX_NAME varchar2(32),
SDO_INDEX_PRIMARY NUMBER,
SDO_TSNAME varchar2(32),
SDO_COLUMN_NAME varchar2(2048),
SDO_RTREE_HEIGHT number,
SDO_RTREE_NUM_NODES number,
SDO_RTREE_DIMENSIONALITY number,
SDO_RTREE_FANOUT number,
SDO_RTREE_ROOT varchar2(32),
SDO_RTREE_SEQ_NAME varchar2(32),
SDO_FIXED_META RAW(255),
SDO_TABLESPACE varchar2(32),
SDO_INITIAL_EXTENT varchar2(32),
SDO_NEXT_EXTENT varchar2(32),
SDO_PCTINCREASE NUMBER,
SDO_MIN_EXTENTS NUMBER,
SDO_MAX_EXTENTS NUMBER) ‘;
exception
when already_exists then NULL;
when others then
SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
‘EXCEPTION[prvtimd.sql(‘ || $$PLSQL_LINE || ‘)3]: ‘ || SQLERRM); RAISE;
end;
begin
execute immediate
‘ Alter table MDSYS.SDO_INDEX_METADATA_TABLE
modify (SDO_COLUMN_NAME varchar2(2048)) ‘;
exception
when others then
SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
‘EXCEPTION[prvtimd.sql(‘ || $$PLSQL_LINE || ‘)4]: ‘ || SQLERRM); RAISE;
end;
begin
execute immediate
‘ Alter table MDSYS.SDO_INDEX_METADATA_TABLE add ( SDO_INDEX_DIMS number) ‘;
exception
when column_exists then NULL;
when others then
SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
‘EXCEPTION[prvtimd.sql(‘ || $$PLSQL_LINE || ‘)5]: ‘ || SQLERRM); RAISE;
end;
begin
execute immediate
‘ Alter table MDSYS.SDO_INDEX_METADATA_TABLE add ( SDO_LAYER_GTYPE varchar2(32)) ‘;
exception
when column_exists then NULL;
when others then
SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
‘EXCEPTION[prvtimd.sql(‘ || $$PLSQL_LINE || ‘)6]: ‘ || SQLERRM); RAISE;
end;
begin
execute immediate
‘ Alter table MDSYS.SDO_INDEX_METADATA_TABLE add
( SDO_RTREE_PCTFREE number) ‘;
exception
when column_exists then NULL;
when others then
SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
‘EXCEPTION[prvtimd.sql(‘ || $$PLSQL_LINE || ‘)7]: ‘ || SQLERRM); RAISE;
end;
begin
execute immediate
‘ Alter table MDSYS.SDO_INDEX_METADATA_TABLE add
( SDO_INDEX_PARTITION varchar2(32)) ‘;
exception
when column_exists then NULL;
when others then
SYS.DBMS_SYSTEM.KSDWRT(SYS.DBMS_SYSTEM.TRACE_FILE,
‘EXCEPTION[prvtimd.sql(‘ || $$PLSQL_LINE || ‘)8]: ‘ || SQLERRM); RAISE;
end;
Identifier ORDIM 21-01-28 01:23:32
SCRIPT = [/orcl/db2/product/19.3/md/admin/prvtimd.plb]
ERROR = [ORA-06512: at line 206]
STATEMENT = [as above]
Identifier ORDIM 21-01-28 01:23:32
SCRIPT = [/orcl/db2/product/19.3/md/admin/prvtimd.plb]
ERROR = [ORA-06508: PL/SQL: could not find program unit being called: “MDSYS.MDPRVT_IDX”]
STATEMENT = [as above]
Identifier ORDIM 21-01-28 01:23:32
SCRIPT = [/orcl/db2/product/19.3/md/admin/prvtimd.plb]
ERROR = [ORA-06512: at “MDSYS.SDO_INDEX_METADATA_UPDATE”, line 4]
STATEMENT = [as above]
Identifier ORDIM 21-01-28 01:23:32
SCRIPT = [/orcl/db2/product/19.3/md/admin/prvtimd.plb]
ERROR = [ORA-04088: error during execution of trigger ‘MDSYS.SDO_INDEX_METADATA_UPDATE’]
STATEMENT = [as above]
Identifier ORDIM 21-01-28 01:23:32
SCRIPT = [/orcl/db2/product/19.3/md/admin/prvtimd.plb]
ERROR = [ORA-06512: at line 199]
STATEMENT = [as above]
Investigation/Solution:
I found out multimedia component was invalid after the upgrade:
SQL> set pages 1000
SQL> set lines 300
SQL>
SQL>
SQL> select COMP_ID,COMP_NAME,VERSION,VERSION_FULL,STATUS from dba_registry where COMP_NAME=’Oracle Multimedia’;
COMP_ID COMP_NAME
—————————— —————————————————————————————————————————————————————————————————————————————————————
VERSION VERSION_FULL STATUS
—————————— —————————— ——————————————–
ORDIM Oracle Multimedia
19.0.0.0.0 19.3.0.0.0 INVALID
what I have done …. I have rolled-back the upgrade using flashback to Oracle 12cR1 , then applied the latest patches on 19c binaries with 19.10 (January 2021)…. And re-performed the upgrade again.
Observation: the upgrade will generate a file under /tmp directory called db2_catctl.dat in my case (/tmp/$ORACLESID_catctl.dat) you better remove it before re-running the upgrade process again.
Also, ensure /etc/oratab file is pointing to Oracle 19c binaries
cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
SQL> startup upgrade;
SQL> exit;
nohup $ORACLE_HOME/perl/bin/perl catctl.pl -n 2 -l /orcl/tmp/upgrade_19c_log/ catupgrd.sql &
check the upgrade logs….it should be successful
then recompile the objects and check database components:
SQL> @?/rdbms/admin/utlrp.sql
SQ> select * from dba_registry;
Upgraded to 11.2.x from older version.
Encountered the following errors:
ORA-04067: not executed, package body «SYS.DBMS_METADATA» does not exist
ORA-06508: PL/SQL: could not find program unit being called: «SYS.DBMS_METADATA»
The following query shows that dbms_metadata package specification is present but the package body is missing:
SELECT owner, object_name, object_type, status
FROM dba_objects
WHERE object_name like ‘%DBMS_METADATA%’
ORDER BY 1,2,3;
OWNER OBJECT_NAME OBJECT_TYPE STATUS
———— ——————————— ————— ——-
PUBLIC DBMS_METADATA SYNONYM VALID
PUBLIC DBMS_METADATA_BUILD SYNONYM VALID
PUBLIC DBMS_METADATA_DIFF SYNONYM VALID
PUBLIC DBMS_METADATA_DPBUILD SYNONYM VALID
SYS DBMS_METADATA PACKAGE VALID >>>>>
SYS DBMS_METADATA_BUILD PACKAGE VALID
SYS DBMS_METADATA_BUILD PACKAGE BODY VALID
SYS DBMS_METADATA_DIFF PACKAGE VALID
SYS DBMS_METADATA_DIFF PACKAGE BODY VALID
SYS DBMS_METADATA_DPBUILD PACKAGE VALID
SYS DBMS_METADATA_DPBUILD PACKAGE BODY VALID
SYS DBMS_METADATA_INT PACKAGE VALID
SYS DBMS_METADATA_INT PACKAGE BODY VALID
SYS DBMS_METADATA_UTIL PACKAGE VALID
SYS DBMS_METADATA_UTIL PACKAGE BODY VALID
Cause :
SYS DBMS_METADATA PACKAGE BODY is missing.
SOLUTION :
Install the missing dbms_metadata package body by running the sript that recreates it.
This can be done by running the script as SYSDBA via SQLPlus:
$ORACLE_HOME/rdbms/admin/prvtmeta.plb
$ORACLE_HOME/rdbms/admin/utlrp.sql
Check to see if that package body exists now..
Check to see if this or other objects became invalid.
If there are errors doing this or if it fails, run the $ORACLE_HOME/rdbms/admin/catproc.sql script in startup restrict mode.
In either case, ensure that a current working backup is in place before doing this.