Wednesday, February 25, 2009

How To Check The inventory.xml/comps.xml Or Any Oracle XML File Is Correct


You can check the inventory.xml/comps.xml ( any XML file) using the "LoadXML" option in Opatch utility.
The command is :

> opatch util LoadXML -xmlInput "xml_file"

For example :
If the xml file to be checked is "/u01/oracle/visndb/10.2.0/inventory/ContentsXML/comps.xml "
then the command will be

opatch util LoadXML -xmlInput /u01/oracle/visndb/10.2.0/inventory/ContentsXML/comps.xml

The Opatch output will be:

=========================================================================

opatch util LoadXML -xmlInput comps.xml
Invoking OPatch 10.2.0.2.0

Oracle interim Patch Installer version 10.2.0.2.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..

UTIL session

Oracle Home : /u01/oracle/visndb/10.2.0
Central Inventory : /etc/oraInventory
from : /u01/oracle/visndb/10.2.0/oraInst.loc
OPatch version : 10.2.0.2.0
OUI version : 10.2.0.2.0
OUI location : /u01/oracle/visndb/10.2.0/oui
Log file location : /u01/oracle/visndb/10.2.0/cfgtoollogs/opatch/opatch-2009_Feb_25_05-34-19-CST_Wed.log

Invoking method loadxml
Please enter the complete path to the XML file to load:
(enter both the dir. path and the file name)"

You entered: "comps.xml".
XML file is OK.

OPatch succeeded.

=========================================================================

If the XML file is incorrect, Opatch will chow an error like:

=========================================================================

opatch util LoadXML -xmlInput D:\11G\db_1\inventory\ContentsXML\comps.xml
Invoking OPatch 10.2.0.2.0

Oracle interim Patch Installer version 10.2.0.2.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..

UTIL session

Oracle Home : /u01/oracle/visndb/10.2.0
Central Inventory : /etc/oraInventory
from : /u01/oracle/visndb/10.2.0/oraInst.loc
OPatch version : 10.2.0.2.0
OUI version : 10.2.0.2.0
OUI location : /u01/oracle/visndb/10.2.0/oui
Log file location : /u01/oracle/visndb/10.2.0/cfgtoollogs/opatch/opatch-2009_Feb_25_05-34-19-CST_Wed.log

org.xml.sax.SAXParseException: : XML-20125: (Fatal Error) Attribute value should start with quote.
at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:417)
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:286)
at oracle.xml.parser.v2.NonValidatingParser.parseAttrValue(NonValidatingParser.java:1616)
at oracle.xml.parser.v2.NonValidatingParser.parseAttr(NonValidatingParser.java:1521)
at oracle.xml.parser.v2.NonValidatingParser.parseAttributes(NonValidatingParser.java:1454)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1293)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:339)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:306)
.
.
.
.
.
.
UtilSession failed: OracleHomeInventory gets a null Vector of installed products

=========================================================================

1 comment:

tikitodo said...

I think that you may want to know more about another method of how can i make data recovery in sql server..