1
Nov

Utlrp.sql results to "Warning: XDB Now Invalid, Could Not Find Xdbconfig"

Symptoms:

When trying to recompile invalid objects by running the utlrp.sql script, the below error is thrown:
"XDB now invalid, could not find xdbconfig"
 
Furthermore, Oracle XML Database (XDB) is INVALID.

Error:

ERROR at line 1:
ORA-31024: Parser initialization failed with LPX-201 error
while parsing a stream to XOB
ORA-06512: at "SYS.UTL_RECOMP", line 865
ORA-06512: at line 4

Compile the invalid objects
----------------------------
SQL> @?/rdbms/admin/utlrp.sql

TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN 2018-08-01 17:32:26

DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC> objects in the database. Recompilation time is proportional to the
DOC> number of invalid objects in the database, so this command may take
DOC> a long time to execute on a database with a large number of invalid
DOC> objects.
DOC>
DOC> Use the following queries to track recompilation progress:
DOC>
DOC> 1. Query returning the number of invalid objects remaining. This
DOC> number should decrease with time.
DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC> 2. Query returning the number of objects compiled so far. This number
DOC> should increase with time.
DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC> This script automatically chooses serial or parallel recompilation
DOC> based on the number of CPUs available (parameter cpu_count) multiplied
DOC> by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC> On RAC, this number is added across all RAC nodes.
DOC>
DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC> recompilation. Jobs are created without instance affinity so that they
DOC> can migrate across RAC nodes. Use the following queries to verify
DOC> whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC> 1. Query showing jobs created by UTL_RECOMP
DOC> SELECT job_name FROM dba_scheduler_jobs
DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC> 2. Query showing UTL_RECOMP jobs that are running
DOC> SELECT job_name FROM dba_scheduler_running_jobs
DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#
DECLARE
*
ERROR at line 1:
ORA-31024: Parser initialization failed with LPX-201 error
while parsing a stream to XOB
ORA-06512: at "SYS.UTL_RECOMP", line 865
ORA-06512: at line 4

TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END 2018-08-01 17:32:37

DOC> The following query reports the number of objects that have compiled
DOC> with errors.
DOC>
DOC> If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
0

DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
0

Function created.

PL/SQL procedure successfully completed.

Function dropped.

Warning: XDB now invalid, could not find xdbconfig

PL/SQL procedure successfully completed.

Cause:

Incorrect setting of enviroment variable, ORA_NLS10.

The ORA_NLSxx environment variable is used to indicate where Oracle RDBMS/client software can locate the defintions of Charactersets.

Solution:

Check the status of the dba registry


set line 120;
column COMP_NAME format a35;
column VERSION format a10;
column status format a10;
select COMP_NAME, VERSION,status from dba_registry;

COMP_NAME VERSION STATUS
----------------------------------- ---------- ----------
Oracle Machine Generated Data 11.2.0.4.0 VALID
OLAP Catalog 11.2.0.4.0 VALID
Oracle Enterprise Manager 11.2.0.4.0 VALID
Oracle XML Database 11.2.0.4.0 INVALID
Oracle Text 11.2.0.4.0 VALID
Spatial 11.2.0.4.0 VALID
Oracle Multimedia 11.2.0.4.0 VALID
Oracle Database Catalog Views 11.2.0.4.0 VALID
Oracle Database Packages and Types 11.2.0.4.0 VALID
JServer JAVA Virtual Machine 11.2.0.4.0 VALID
Oracle Database Java Packages 11.2.0.4.0 VALID

COMP_NAME VERSION STATUS
----------------------------------- ---------- ----------
Oracle XDK 11.2.0.4.0 VALID
Oracle Real Application Clusters 11.2.0.4.0 VALID
OLAP Analytic Workspace 11.2.0.4.0 VALID
Oracle OLAP API 11.2.0.4.0 INVALID

15 rows selected.


SQL> select any_path from resource_view;
select any_path from resource_view
*
ERROR at line 1:
ORA-31024: Parser initialization failed with LPX-201 error
while parsing a stream to XOB

 
Shutdown the application and database on all the nodes.

Unset ORA_NLS10 on both the database nodes.


[oracle@ebsdb-01 ~]$ echo $ORA_NLS10
/u01/app/oracle/product/11.2.0.4/dbhome_1/nls/data/9idata

[oracle@ebsdb-01 ~]$ unset ORA_NLS10
[oracle@ebsdb-01 ~]$ echo $ORA_NLS10

 
Start the database

[oracle@ebsdb-01 ~]$ srvctl start database -d erppt

 
Compile the invalid objects


SQL> @?/rdbms/admin/utlrp.sql

TIMESTAMP
------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN 2018-08-02 10:59:51

DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC> objects in the database. Recompilation time is proportional to the
DOC> number of invalid objects in the database, so this command may take
DOC> a long time to execute on a database with a large number of invalid
DOC> objects.
DOC>
DOC> Use the following queries to track recompilation progress:
DOC>
DOC> 1. Query returning the number of invalid objects remaining. This
DOC> number should decrease with time.
DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC> 2. Query returning the number of objects compiled so far. This number
DOC> should increase with time.
DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC> This script automatically chooses serial or parallel recompilation
DOC> based on the number of CPUs available (parameter cpu_count) multiplied
DOC> by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC> On RAC, this number is added across all RAC nodes.
DOC>
DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC> recompilation. Jobs are created without instance affinity so that they
DOC> can migrate across RAC nodes. Use the following queries to verify
DOC> whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC> 1. Query showing jobs created by UTL_RECOMP
DOC> SELECT job_name FROM dba_scheduler_jobs
DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC> 2. Query showing UTL_RECOMP jobs that are running
DOC> SELECT job_name FROM dba_scheduler_running_jobs
DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#

PL/SQL procedure successfully completed.

TIMESTAMP
------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END 2018-08-02 11:00:36

DOC> The following query reports the number of objects that have compiled
DOC> with errors.
DOC>
DOC> If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
0

DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
0

Function created.

PL/SQL procedure successfully completed.

Function dropped.

PL/SQL procedure successfully completed.




Check the dba_registry


set line 120;
column COMP_NAME format a35;
column VERSION format a10;
column status format a10;
select COMP_NAME, VERSION,status from dba_registry;

COMP_NAME VERSION STATUS
----------------------------------- ---------- ----------
Oracle Machine Generated Data 11.2.0.4.0 VALID
OLAP Catalog 11.2.0.4.0 VALID
Oracle Enterprise Manager 11.2.0.4.0 VALID
Oracle XML Database 11.2.0.4.0 VALID
Oracle Text 11.2.0.4.0 VALID
Spatial 11.2.0.4.0 VALID
Oracle Multimedia 11.2.0.4.0 VALID
Oracle Database Catalog Views 11.2.0.4.0 VALID
Oracle Database Packages and Types 11.2.0.4.0 VALID
JServer JAVA Virtual Machine 11.2.0.4.0 VALID
Oracle Database Java Packages 11.2.0.4.0 VALID

COMP_NAME VERSION STATUS
----------------------------------- ---------- ----------
Oracle XDK 11.2.0.4.0 VALID
Oracle Real Application Clusters 11.2.0.4.0 VALID
OLAP Analytic Workspace 11.2.0.4.0 VALID
Oracle OLAP API 11.2.0.4.0 INVALID

15 rows selected.

All objects are valid but it appears as INVALID in DBA_REGISTRY


execute validate_context;


set line 120;
column COMP_NAME format a35;
column VERSION format a10;
column status format a10;
select COMP_NAME, VERSION,status from dba_registry;

COMP_NAME VERSION STATUS
----------------------------------- ---------- ----------
Oracle Machine Generated Data 11.2.0.4.0 VALID
OLAP Catalog 11.2.0.4.0 VALID
Oracle Enterprise Manager 11.2.0.4.0 VALID
Oracle XML Database 11.2.0.4.0 VALID
Oracle Text 11.2.0.4.0 VALID
Spatial 11.2.0.4.0 VALID
Oracle Multimedia 11.2.0.4.0 VALID
Oracle Database Catalog Views 11.2.0.4.0 VALID
Oracle Database Packages and Types 11.2.0.4.0 VALID
JServer JAVA Virtual Machine 11.2.0.4.0 VALID
Oracle Database Java Packages 11.2.0.4.0 VALID

COMP_NAME VERSION STATUS
----------------------------------- ---------- ----------
Oracle XDK 11.2.0.4.0 VALID
Oracle Real Application Clusters 11.2.0.4.0 VALID
OLAP Analytic Workspace 11.2.0.4.0 VALID
Oracle OLAP API 11.2.0.4.0 VALID

15 rows selected.

 

All components have become valid now !!!

Back to Top