Tuesday, September 30, 2014

ORA-39006: internal error; ORA-39213: Metadata processing is not available;

Scenerio

Oracle 11.2.0.3 - 64 bit on Windows

When using IMPDP you get the error :

ORA-39006: internal error
ORA-39213: Metadata processing is not available

Workaround

sqlplus / as sysdba
SQL> execute sys.dbms_metadata_util.load_stylesheets;

Source : Oracle metalink : DOC ID 801337.1
---------------------------------------------------------------------------------------------------------------

Datapump Import Fails With ORA-39006 ORA-39213 Metadata processing is not available (Doc ID 801337.1)

Applies to :

Oracle Database - Enterprise Edition - Version 10.2.0.3 and later
Information in this document applies to any platform.
***Checked for relevance on 17-Aug-2014***


Symptoms :

DataPump import (impdp) reports the errors:


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit
Production
With the Partitioning, OLAP and Data Mining options
ORA-39006: internal error
ORA-39213: Metadata processing is not available


Attempting to correct the error ORA-39213 via dbms_metadata_util.load_stylesheets also
reports errors similar to:


SQL> exec dbms_metadata_util.load_stylesheets;

BEGIN dbms_metadata_util.load_stylesheets; END;
*
ERROR at line 1:
ORA-22288: file or LOB operation FILEEXISTs failed
Permission denied
ORA-06512: at "SYS.DBMS_METADATA_UTIL", line 1807
ORA-06512: at line 1


Cause : 

The above errors are almost certainly indicative of permissions issues.

Solution :

During dbms_metadata_util.load_stylesheets we read the directory $ORACLE_HOME/rdbms/xml/xsl and load the XSL files using DBMS_LOB package.

If the files cannot be read (most of cases by missing rwx privileges for oracle user), then we raise the errors above.

Re-load the stylesheets using the dbms_metadata_util.load_stylesheets procedure after the permission issue is solved and then retry DataPump import (impdp).


Sunday, May 19, 2013

ORA-00600: internal error code, arguments: [kcratr1_lostwrt],[], [],[], [],[], [], []

Scenerio
----------


Oracle 9.2.0.1 on Windows

After a power failure, when tried to startup the database normally, it did not start.
The database status was 'MOUNTED'. When tried with 'alter database open; the error was :
 
ORA-00600: internal error code, arguments: [kcratr1_lostwrt],[], [],[], [],[], [], []

Work around
---------------

SQL> Shutdown Immediate;
SQL> STARTUP MOUNT;
SQL> RECOVER DATABASE;
SQL> ALTER DATABASE OPEN;



Tuesday, May 7, 2013

ORA-12547: TNS: lost contact

Scenerio
----------
Local connection fails when connecting with / as sysdba

$ sqlplus
SQL*Plus: Release 9.2.0.3.0 - Production on Tue May 7 12:15:02 2013
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter user-name : / as sysdba
ERROR:
ORA-12547: TNS:lost contact
Enter user-name:

Work around
---------------

Relink the Oracle binaries by executing the following command,

$ cd ORACLE_HOME/bin
$ relink all


$ sqlplus

SQL*Plus: Release 9.2.0.3.0 - Production on Tue May 7 12:17:05 2013

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter user-name: / as sysdba

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
With the Partitioning option
JServer Release 9.2.0.3.0 - Production

Monday, February 4, 2013

UDI-31623: operation generated ORACLE error 31623 / ORA-31623

 Scenerio
----------
 When doing an import ( impdp ) on Oracle 11g Rel.2 / RHEL 5.3 64bit
 -------------------------------------------------------------------------------------


UDI-31623: operation generated ORACLE error 31623
ORA-31623: a job is not attached to this session via the specified handle
ORA-06512: at "SYS.DBMS_DATAPUMP", line 3326
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4551
ORA-06512: at line 1

Work around
---------------
 

 Increase the streams_pool_size from 0 to 16M or set the sga_target parameter.

SQL> alter system set streams_pool_size=40M ;

Also see MOSC note  308388.1 for details on diagnosing and tracing the ORA-31623 error. 


Source : Oracle metalink : DOC ID 308388.1
----------------------------------------------------------------------------------------------------------------
Error ORA-31623 When Submitting A DataPump Export Job (Doc ID 308388.1)

Applies to :

Oracle Database - Enterprise Edition - Version 10.1.0.2 to 10.2.0.5 [Release 10.1 to 10.2]
Information in this document applies to any platform.
***Checked for relevance on 07-Jul-2014***

Symptoms :

When you are trying to take an export using DataPump utility you are getting the following errors:
UDE-00008: operation generated ORACLE error 31623

ORA-31623: a job is not attached to this session via the specified handle

ORA-06512: at "SYS.DBMS_DATAPUMP", line 2315

ORA-06512: at "SYS.DBMS_DATAPUMP", line 3185

ORA-06512: at line 1
Cause : 

For submitting an export job with DataPump utility, queues, streams and Java objects are used. SQL tracing confirms that.
If some components are not valid in the database, then you will see these errors. By querying dba_registry you will find the different components and their status:

connect / as sysdba
SELECT comp_name, status, version
FROM   dba_registry;

Solution :


You can validate different components in the database by running the script $ORACLE_HOME/rdbms/admin/catpatch.sql via SQL*Plus:

spool catpatch.log




connect / as sysdba


shutdown immediate


startup migrate


@?/rdbms/admin/catpatch.sql


@?/rdbms/admin/utlrp.sql


SELECT comp_name, version, status


FROM dba_registry;


spool off




-- If you are on 10g Release 2, then perform:




connect / as sysdba


spool dictreload.log


startup restrict


alter system set shared_pool_size = 512M scope=spfile;


alter system set java_pool_size = 150M scope=spfile;


alter system set aq_tm_processes = 1 scope=spfile;


alter system set streams_pool_size = 10M scope=spfile;


alter system set cluster_database = false scope=spfile; -- If on RAC


shutdown immediate


startup upgrade


@?/rdbms/admin/catalog.sql


@?/rdbms/admin/catproc.sql


@?/rdbms/admin/catupgrd.sql


spool off


alter system set cluster_database = true scope=spfile; -- If on RAC


shutdown immediate


startup


@?/rdbms/admin/utlrp.sql


Wednesday, January 23, 2013

ORA-24324 & ORA-24323 & ORA-28547


Scenerio
----------
* When installing Oracle 10g Rel 2 (10.2.0.1) - 32 bit Windows
    (on Windows XP - SP3)  using DBCA
-----------------------------------------------------------------------------

ORA-24324: service handle not initialized
ORA-24323: value not allowed
ORA-28547: connection to server failed, probable Oracle Net admin error.



Work around
---------------
Change the sqlnet.ora file  to

SQLNET.AUTHENTICATION_SERVICES = (NONE)

Monday, January 14, 2013

OPatch cannot find a valid oraInst.loc file to locate Central Inventory. OPatch failed with error code 104

OPatch cannot find a valid oraInst.loc file to locate Central Inventory. OPatch failed with error code 104

$ opatch lsinventory
Invoking OPatch 10.2.0.3.0

Oracle Interim Patch Installer version 10.2.0.3.0
Copyright (c) 2010, Oracle Corporation. All rights reserved.

Oracle Home : /ora/app/product/10.2.0/db_1
Central Inventory : n/a
from :
OPatch version : 10.2.0.3.0
OUI version : 10.2.0.3.0
OUI location : /ora/app/product/10.2.0/db_1/oui
Log file location : n/a

Patch history file: /oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

OPatch cannot find a valid oraInst.loc file to locate Central Inventory.

OPatch failed with error code 104


Scenerio
----------
oraInst.loc is there in Oracle Inventory directory. In my case, my oracle inventory is /oracle/oraInventory and oraInst was there in /oracle/oraInventory

Work around
---------------
copy oraInst.loc in /etc as oracle user and issue :

$/oracle/product/10.2.0/db_1/OPatch/opatch lsinventory

Saturday, November 24, 2012

ORA-04031: unable to allocate 4032 bytes of shared memory ("shared pool","oracle/aurora/rdbms/DbmsJavaSYS","joxlod: in ehe","ioc_allocate_pal")


(Oracle 8.1.7 on Windows 2000 cluster)


In  my case,  java_pool_size was 32KB. When increased to 50MB, solved the problem.

***********************************************************************


Doc ID :  Note:19837.1

Error:  ORA 4031 Text:   unable to allocate %s bytes of shared memory (%s,%s,%s)

Cause:  More shared memory is needed than was allocated in the shared   pool.

Action: Either use the dbms_shared_pool package to pin large packages,  reduce your use of shared memory, or increase the amount of  available shared memory by increasing the value of the init.ora parameter "shared_pool_size".

 *** Important: The notes below are for experienced users - See [NOTE:22080.1]

Explanation: Over a period of time the free memory in the shared pool may become fragmented. When any attempt to allocate a large piece of memory in the shared pool fails Oracle first flushes all objects that are not currently in use from the pool and the resulting free memory chunks are merged. If there is still not a single chunk large enough to satisfy the request ORA 4031 is returned.

Note that in 7.3.4 onwards there are 2 parameters to help control this problem:
SHARED_POOL_RESERVED_SIZE and  SHARED_POOL_RESERVED_MIN_ALLOC

In Oracle 8.1.X if trying to use Java functionality and an ORA-4031 may occur.  To resolve this problem increase the init.ora parameter  Java_Pool_Size.