Why my XML is not loading ?? (ORA-19007: Schema - does not match expected )

Hi,
I want to load a XML document in structured XMLType. You can run my code on your database if you have a directory object called LOG_DIR. I am on Oracle 10.1 .
The schema is a simple example which describe a database table(like it will have 1 or more columns and 0 or more indexes). My schema looks like,
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Tables" type="Table">
<xs:annotation>
<xs:documentation>Table defination</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="table_name" type="xs:string"/>
<xs:complexType name="Table">
<xs:sequence>
<xs:element name="Column" type="Column" minOccurs="1"/>
<xs:element name="Index" type="Index" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Column">
<xs:annotation>
<xs:documentation>Column of the table</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Name" type="xs:string" minOccurs="1"/>
<xs:element name="Type" type="xs:string" minOccurs="1"/>
<xs:element name="Capacity" type="xs:decimal" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Index">
<xs:annotation>
<xs:documentation>Index on the table</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Name" type="xs:string" minOccurs="1"/>
<xs:element name="Type" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
I registered the schema,
BEGIN
DBMS_XMLSCHEMA.registerSchema(
SCHEMAURL => 'tables.xsd',
SCHEMADOC => bfilename('LOG_DIR','tables.xsd'),
CSID => nls_charset_id('AL32UTF8')
END;
This was successfull, also the following create table was ok,
CREATE TABLE TMP_XML_TABLES
file_name VARCHAR2(2000),
load_date DATE,
xml_document XMLType
XMLType COLUMN xml_document
XMLSchema "http://xmlns.oracle.com/xdb/schemas/TDB/tables.xsd"
ELEMENT "Tables";
Now I have a XML document,
<Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/xdb/schemas/TDB/tables.xsd">
<table_name>trades</table_name>
<Column><Name>trade_id</Name><Type>varchar2</Type><Capacity>50</Capacity></Column>
<Column><Name>source</Name><Type>varchar2</Type><Capacity>100</Capacity></Column>
<Column><Name>trade_date</Name><Type>date</Type></Column>
<Column><Name>trader</Name><Type>varchar2</Type><Capacity>200</Capacity></Column>
<Index><Name>trades_pk</Name><Type>btree</Type></Index>
<Index><Name>trades_idx1</Name><Type>bitmap</Type></Index>
</Tables>
When I am trying to load this, I get the error,
SQL> INSERT INTO TMP_XML_TABLES
2 VALUES
3 ('tables1.xml',
4 sysdate,
5 XMLType
6 (
7 bfilename('LOG_DIR','tables1.xml'),
8 nls_charset_id('AL32UTF8')
9 )
10 );
INSERT INTO TMP_XML_TABLES
ERROR at line 1:
ORA-19007: Schema - does not match expected tables.xsd.
Can somebody please explain the cause ???
Thanks and Regards

A quick search of the forum for ORA-19007 should have allowed you to find the answer to your problem. Since you XML Schema does not declare a target namespace you need to use the xsi:noNamespaceSchemaLocation tag rather than the schemaLocation tag..
Also please do not use URLs starting http://xmlns.oracle.com for your schemaLocation hint. If you do no own your own domain I'd suggest example.org...
Finally please make sure that your XML Instance is valid per your XML Schema before posting. You can do this using tools like JDeveloper or XMLSpy. What should have been a 5 min repsonse took me over 20 mins to work through due to the errors in the XML Schema...
Anyway here's a working example for you
SQL>
SQL>
SQL> var schemaURL varchar2(256)
SQL> var schemaPath varchar2(256)
SQL> --
SQL> begin
  2    :schemaURL := 'http://xmlns.examples.org/xdb/schemas/TDB/tables.xsd';
  3    :schemaPath := '/public/testcase.xsd';
  4  end;
  5  /
PL/SQL procedure successfully completed.
SQL> DROP TABLE TMP_XML_TABLES
  2  /
Table dropped.
SQL> call dbms_xmlSchema.deleteSchema(:schemaURL,4)
  2  /
Call completed.
SQL> declare
  2    res boolean;
  3    xmlSchema xmlType := xmlType(
  4  '<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="
tp://xmlns.oracle.com/xdb">
  5     <xs:element name="Tables" xdb:defaultTable="TABLES_TABLE">
  6     <xs:annotation>
  7                     <xs:documentation>Table defination</xs:documentation>
  8             </xs:annotation>
  9             <xs:complexType>
10                     <xs:complexContent>
11                             <xs:extension base="Table"/>
12                     </xs:complexContent>
13             </xs:complexType>
14     </xs:element>
15     <xs:complexType name="Table">
16             <xs:sequence>
17                     <xs:element name="table_name" type="xs:string"/>
18                     <xs:element name="Column" type="Column" maxOccurs="unbounded"/>
19                     <xs:element name="Index" type="Index" minOccurs="0" maxOccurs="unbounded"/>
20             </xs:sequence>
21     </xs:complexType>
22     <xs:complexType name="Column">
23             <xs:annotation>
24                     <xs:documentation>Column of the table</xs:documentation>
25             </xs:annotation>
26             <xs:sequence>
27                     <xs:element name="Name" type="xs:string"/>
28                     <xs:element name="Type" type="xs:string"/>
29                     <xs:element name="Capacity" type="xs:decimal"/>
30             </xs:sequence>
31     </xs:complexType>
32     <xs:complexType name="Index">
33             <xs:annotation>
34                     <xs:documentation>Index on the table</xs:documentation>
35             </xs:annotation>
36             <xs:sequence>
37                     <xs:element name="Name" type="xs:string"/>
38                     <xs:element name="Type" type="xs:string" minOccurs="0"/>
39             </xs:sequence>
40     </xs:complexType>
41  </xs:schema>
42  ');
43  begin
44    if (dbms_xdb.existsResource(:schemaPath)) then
45      dbms_xdb.deleteResource(:schemaPath);
46    end if;
47    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
48  end;
49  /
PL/SQL procedure successfully completed.
SQL> begin
  2    dbms_xmlschema.registerSchema
  3    (
  4      :schemaURL,
  5      xdbURIType(:schemaPath).getClob(),
  6      TRUE,TRUE,FALSE,TRUE
  7    );
  8  end;
  9  /
PL/SQL procedure successfully completed.
SQL> CREATE TABLE TMP_XML_TABLES
  2  (
  3  file_name VARCHAR2(2000),
  4  load_date DATE,
  5  xml_document XMLType
  6  )
  7  XMLType COLUMN xml_document
  8  XMLSchema "http://xmlns.examples.org/xdb/schemas/TDB/tables.xsd"
  9  ELEMENT "Tables"
10  /
Table created.
SQL> insert into TMP_XML_TABLES values ('testcase1.xml',sysdate,xmltype(
  2  '<Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.examples.org/xdb/schemas/T
/tables.xsd">
  3     <table_name>trades</table_name>
  4     <Column>
  5             <Name>trade_id</Name>
  6             <Type>varchar2</Type>
  7             <Capacity>50</Capacity>
  8     </Column>
  9     <Column>
10             <Name>source</Name>
11             <Type>varchar2</Type>
12             <Capacity>100</Capacity>
13     </Column>
14     <Column>
15             <Name>trade_date</Name>
16             <Type>date</Type>
17     </Column>
18     <Column>
19             <Name>trader</Name>
20             <Type>varchar2</Type>
21             <Capacity>200</Capacity>
22     </Column>
23     <Index>
24             <Name>trades_pk</Name>
25             <Type>btree</Type>
26     </Index>
27     <Index>
28             <Name>trades_idx1</Name>
29             <Type>bitmap</Type>
30     </Index>
31  </Tables>'))
32  /
1 row created.
SQL> set long 10000 pages 0 lines 160
SQL> /
1 row created.
SQL> select * from TMP_XML_TABLES
  2  /
testcase1.xml
21-APR-06
<Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.examples.org/xdb/schemas/TDB/tab
s.xsd">
  <table_name>trades</table_name>
  <Column>
    <Name>trade_id</Name>
    <Type>varchar2</Type>
    <Capacity>50</Capacity>
  </Column>
  <Column>
    <Name>source</Name>
    <Type>varchar2</Type>
    <Capacity>100</Capacity>
  </Column>
  <Column>
    <Name>trade_date</Name>
    <Type>date</Type>
  </Column>
  <Column>
    <Name>trader</Name>
    <Type>varchar2</Type>
    <Capacity>200</Capacity>
  </Column>
  <Index>
    <Name>trades_pk</Name>
    <Type>btree</Type>
  </Index>
  <Index>
    <Name>trades_idx1</Name>
    <Type>bitmap</Type>
  </Index>
</Tables>
testcase1.xml
21-APR-06
<Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.examples.org/xdb/schemas/TDB/tab
s.xsd">
  <table_name>trades</table_name>
  <Column>
    <Name>trade_id</Name>
    <Type>varchar2</Type>
    <Capacity>50</Capacity>
  </Column>
  <Column>
    <Name>source</Name>
    <Type>varchar2</Type>
    <Capacity>100</Capacity>
  </Column>
  <Column>
    <Name>trade_date</Name>
    <Type>date</Type>
  </Column>
  <Column>
    <Name>trader</Name>
    <Type>varchar2</Type>
    <Capacity>200</Capacity>
  </Column>
  <Index>
    <Name>trades_pk</Name>
    <Type>btree</Type>
  </Index>
  <Index>
    <Name>trades_idx1</Name>
    <Type>bitmap</Type>
  </Index>
</Tables>Since you are tracking metadata about the documents (name, date loaded) you might want to consider using the XDB repository to load the documents. The folllowing shows how you can do this from SQL and then create a view which contains the metadata and document content. The advantage of this approach is you can now load the documents using FTP or WebDAV.
SQL> declare
  2    res boolean;
  3    document xmltype := xmltype(
  4  '<Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.examples.org/xdb/schemas/T
/tables.xsd">
  5     <table_name>trades</table_name>
  6     <Column>
  7             <Name>trade_id</Name>
  8             <Type>varchar2</Type>
  9             <Capacity>50</Capacity>
10     </Column>
11     <Column>
12             <Name>source</Name>
13             <Type>varchar2</Type>
14             <Capacity>100</Capacity>
15     </Column>
16     <Column>
17             <Name>trade_date</Name>
18             <Type>date</Type>
19     </Column>
20     <Column>
21             <Name>trader</Name>
22             <Type>varchar2</Type>
23             <Capacity>200</Capacity>
24     </Column>
25     <Index>
26             <Name>trades_pk</Name>
27             <Type>btree</Type>
28     </Index>
29     <Index>
30             <Name>trades_idx1</Name>
31             <Type>bitmap</Type>
32     </Index>
33  </Tables>');
34  begin
35    res := dbms_xdb.createResource('/public/testcase.xml',document);
36  end;
37  /
PL/SQL procedure successfully completed.
SQL> create or replace view TMP_XML_TABLES_VIEW as
  2  select extractValue(res,'/Resource/DisplayName') FILENAME,
  3         extractValue(res,'/Resource/CreationDate') LOAD_DATE,
  4         object_value XML_DOCUMENT
  5    from RESOURCE_VIEW, TABLES_TABLE t
  6   where extractValue(res,'/Resource/XMLRef')= ref(t)
  7  /
View created.
SQL> select * from TABLES_TABLE
  2  /
<Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.examples.org/xdb/schemas/TDB/tab
s.xsd">
  <table_name>trades</table_name>
  <Column>
    <Name>trade_id</Name>
    <Type>varchar2</Type>
    <Capacity>50</Capacity>
  </Column>
  <Column>
    <Name>source</Name>
    <Type>varchar2</Type>
    <Capacity>100</Capacity>
  </Column>
  <Column>
    <Name>trade_date</Name>
    <Type>date</Type>
  </Column>
  <Column>
    <Name>trader</Name>
    <Type>varchar2</Type>
    <Capacity>200</Capacity>
  </Column>
  <Index>
    <Name>trades_pk</Name>
    <Type>btree</Type>
  </Index>
  <Index>
    <Name>trades_idx1</Name>
    <Type>bitmap</Type>
  </Index>
</Tables>
SQL> select * from TMP_XML_TABLES_VIEW
  2  /
testcase.xml
21-APR-06 02.21.37.031000 PM
<Tables xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.examples.org/xdb/schemas/TDB/tab
s.xsd">
  <table_name>trades</table_name>
  <Column>
    <Name>trade_id</Name>
    <Type>varchar2</Type>
    <Capacity>50</Capacity>
  </Column>
  <Column>
    <Name>source</Name>
    <Type>varchar2</Type>
    <Capacity>100</Capacity>
  </Column>
  <Column>
    <Name>trade_date</Name>
    <Type>date</Type>
  </Column>
  <Column>
    <Name>trader</Name>
    <Type>varchar2</Type>
    <Capacity>200</Capacity>
  </Column>
  <Index>
    <Name>trades_pk</Name>
    <Type>btree</Type>
  </Index>
  <Index>
    <Name>trades_idx1</Name>
    <Type>bitmap</Type>
  </Index>
</Tables>
SQL>
SQL>
SQL>

Similar Messages

  • ORA-19007: Schema - does not match expected T0090.xsd for non xsd owner

    I have registered an xsd in /home/divload/xsd/T0090.xsd. User "prmt" is the owner of this resource. User prmt can schemavalidate xml against this xsd just as it is now. However, I have package code in "prmt_app" user account that will actually do the schemavalidate - not prmt user. When I run the exact same code using the exact same xml with the T0090.xsd above I am getting ORA-19007: Schema - does not match expected T0090.xsd. prmt_app has "all" privs on "/home", "/home/divload", "/home/divload/xsd", and "/home/divload/xsd/T0090.xsd". What am I missing?
    XSD header info
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">
         <xs:element name="T0090" xdb:defaultTable="T0090">
    ...XML header info
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <T0090 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="T0090.xsd">
    <PERMIT>
    ...The error occurs when I am inserting into this table off disk..
    create table prmt.cview_xml (filename varchar2(256), xmldoc xmltype) xmltype xmldoc xmlschema "T0090.xsd" element "T0090";
    Edited by: Mark Reichman on Jun 28, 2010 2:42 PM

    I did all that before posting the orignial post..
    declare
      v_schema_exists varchar2(1) := 'N';
      res             boolean;
      schemaURL       varchar2(100) := 'T0090.xsd';
      schemaPath      varchar2(100) :=  '/prmt/xsd/T0090.xsd'; --'/public/T0090.xsd';
      xmlSchema xmlType := XMLTYPE(bfilename('DIR_PRMT_OUT_CVIEW','T0090.xsd'),NLS_CHARSET_ID('AL32UTF8'));
    begin
      begin
        select 'Y'
          into v_schema_exists
          from sys.all_xml_schemas  -- changed from user_xml_schemas
         where schema_url = schemaURL;
        dbms_xmlSchema.deleteSchema(schemaURL,4);
        exception
          when NO_DATA_FOUND then
            null;
      end;
      if (dbms_xdb.existsResource(schemaPath)) then
        dbms_xdb.deleteResource(schemaPath);
      end if;
      res := dbms_xdb.createResource(schemaPath,xmlSchema);   
      dbms_xmlschema.registerSchema ( schemaURL, xdbURIType(schemaPath).getClob(), TRUE, TRUE, FALSE, TRUE );
    end;
    / I guess my understanding was that I could grant another oracle user access to my registered schema just like I can grant a single user access to a table. Evidently I only have two options. Only the schema owner can use the schema or everyone can use the schema and I cannot grant access to a single user other than myself.
    Edited by: Mark Reichman on Jul 2, 2010 9:08 AM
    Edited by: Mark Reichman on Jul 2, 2010 9:09 AM

  • ORA-19007 - Schema does not match

    On my database, we have two schemas with matching tables in each - one for active data and one for data that is being held for longer-term research. Both contain an XMLType column registered to the same schema. However, when I try to insert directly from the active into the archive, I get the following:
    SQL> insert into eci_archv_schema.rev_item_earn_dtl_archv
    2 select * from eci_schema.rev_item_earn_dtl
    3 where ROWNUM = 1;
    insert into eci_archv_schema.rev_item_earn_dtl_archv
    ERROR at line 1:
    ORA-19007: Schema http://xmlns.foo.com/1.3.1/ABC.xsd does not match expected http://xmlns.foo.com/1.3.1/ABC.xsd.
    The only way in which I can successfully move the data from one to the other is to wrap the select in one of the following:
    1. XMLType.createXML(my_xml_column.getCLOBVal())
    2. XMLType.createNonSchemaBasedXML(my_xml_column)
    Both of these take an exceptionally long amount of time to complete and cause my archiving process to be very, very slow. It would appear that because the schemas were registered under different database schemas, they are somehow seen as incompatible. Is this the case or do they actually not match in some other way? Is there an easy way to compare them?
    FYI: We are running 11.2.0.3 but this also occurs on 11.2.0.2. Any help would be appreciated.

    It would appear that because the schemas were registered under different database schemas, they are somehow seen as incompatible. Possibly.
    Is this the case or do they actually not match in some other way? Is there an easy way to compare them?Are both XML schemas identical?
    If so, why not register only one globally and give access to both DB schemas?
    Does XML instances have xsi:schemaLocation or xsi:noNamespaceSchemaLocation attributes?
    Are they the same?
    A test case would be welcome actually.
    Edited by: odie_63 on 3 oct. 2012 18:50

  • Why do u keep saying loading interrupted, and google does not work

    Example trying to load Mozilla Firefox is one loading interrupted, Google say mobilitydisabled vehicles nothing happens or you get loading interrupted try again.
    WHY does Mozilla-FireFox not answer these questions or is it to much to ask, or do they not care. Or is it to difficult for them.
    These are not isolated cases happens very regular. Even when trying to get onto a well known web site.
    Google what a waste of space it never gets you to where you wish to go.

    Refer to these articles, seems like a connection issue or malware.
    * [[Websites don't load - troubleshoot and fix error messages]]
    * [[Firefox can't load websites but other browsers can]]

  • SQL*Loader : ORA-19007 with missing Schema Location Hint

    Hi,
    These days I'm stuck with a 10.1.0.4 database (OS Linux Red Hat), and I'm trying to find a workaround for the following situation :
    XML schema (sfgtest.xsd)
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
               xmlns:xdb="http://xmlns.oracle.com/xdb">
      <xs:element name="Code" xdb:SQLName="Code" xdb:SQLType="VARCHAR2">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="16"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Val" xdb:SQLType="NUMBER" xdb:SQLName="Val">
        <xs:simpleType>
          <xs:restriction base="xs:decimal">
            <xs:totalDigits value="12"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Chq">
        <xs:complexType xdb:SQLType="SFG_CHQ_TYPE">
          <xs:sequence>
            <xs:element ref="Code"/>
            <xs:element ref="Val"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="NbRem" xdb:SQLType="NUMBER" xdb:SQLName="NbRem">
        <xs:simpleType>
          <xs:restriction base="xs:integer">
            <xs:totalDigits value="5"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Rmbt" xdb:defaultTable="TEST_XML_SFG">
        <xs:complexType xdb:SQLType="SFG_RMBT_TYPE">
          <xs:sequence>
            <xs:element ref="NbRem"/>
            <xs:element ref="Rem" maxOccurs="unbounded" xdb:SQLCollType="SFG_REM_COLL"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="CodeAff" xdb:SQLName="CodeAff" xdb:SQLType="VARCHAR2">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="12"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="Rem" xdb:SQLName="Rem">
        <xs:complexType xdb:SQLType="SFG_REM_TYPE">
          <xs:sequence>
            <xs:element ref="CodeAff"/>
            <xs:element ref="Chq" maxOccurs="unbounded" xdb:SQLCollType="SFG_CHQ_COLL"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    Sample document (sfgtest.xml)
    <?xml version="1.0" encoding="iso-8859-1"?>
    <Rmbt>
    <NbRem>3</NbRem>
    <Rem>
      <CodeAff>AFF001</CodeAff>
      <Chq><Code>X01001</Code><Val>10.00</Val></Chq>
      <Chq><Code>X01002</Code><Val>10.00</Val></Chq>
      <Chq><Code>X01003</Code><Val>10.00</Val></Chq>
    </Rem>
    <Rem>
      <CodeAff>AFF002</CodeAff>
      <Chq><Code>X02001</Code><Val>10.00</Val></Chq>
      <Chq><Code>X02002</Code><Val>10.00</Val></Chq>
      <Chq><Code>X02003</Code><Val>10.00</Val></Chq>
    </Rem>
    <Rem>
      <CodeAff>AFF003</CodeAff>
      <Chq><Code>X03001</Code><Val>10.00</Val></Chq>
      <Chq><Code>X03002</Code><Val>10.00</Val></Chq>
      <Chq><Code>X03003</Code><Val>10.00</Val></Chq>
      <Chq><Code>X03004</Code><Val>10.00</Val></Chq>
      <Chq><Code>X03005</Code><Val>10.00</Val></Chq>
    </Rem>
    </Rmbt>
    Schema registration
    begin
    dbms_xmlschema.registerSchema(
    schemaURL => 'sfgtest.xsd',
    schemaDoc => xmltype(bfilename('DUMP_DIR','sfgtest.xsd'),nls_charset_id('AL32UTF8')),
    local => true,
    genTypes => true,
    genTables => false
    end;
    Table creation
    create table test_xml_sfg of xmltype
    xmltype store as object relational
    xmlschema "sfgtest.xsd"
    element "Rmbt"
    varray xmldata."Rem" store as table test_xml_sfg_rem_tab
    ( primary key (NESTED_TABLE_ID, ARRAY_INDEX) ) organization index overflow
    varray "Chq" store as table test_xml_sfg_chq_tab
      ( primary key (NESTED_TABLE_ID, ARRAY_INDEX) ) organization index overflow
    );I originally wanted to use SQL*Loader to test performance, as I may have to load multiple files in the same time.
    It works great on 10gR2 and 11gR2 with XML files up to 100 MB loaded in a matter of minutes.
    However, a little issue with 10gR1 :
    SQLLDR control file
    LOAD DATA
    INFILE 'filelist.txt'
    APPEND
    INTO TABLE test_xml_sfg
    XMLTYPE(XMLDATA) (
    filename filler char(260),
    XMLDATA LOBFILE(filename) TERMINATED BY EOF
    )with filelist.txt :
    sfgtest.xmlExecution throws "ORA-19007: Schema - does not match expected sfgtest.xsd".
    As per the documentation, it's expected behaviour in 10.1 :
    http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10790/xdb03usg.htm#BABECCBG
    The XML document must include the appropriate attributes from the XMLSchema-instance namespace or the XML document must be explicitly associated with the XML schema using the XMLType constructor or the createSchemaBasedXML() method.Also as expected, the file is loaded OK after adding the following in the root element :
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="sfgtest.xsd"But, as I don't have any latitude on the files received (i.e. I can't add the location hint), is there some workaround, when using SQL*Loader, to treat the XML file as an instance document?
    Thanks for any solution/idea.

    Not sure if it will work, but out of the top of my head I would make an attempt to create an view (for update) based on the XMLType table and do the insert via the view, matching the incoming XML doc to the schema via
    xmltype(xml_messsage).createSchemaBasedXML(xml_schema)

  • ORA-19007: Schema and element do not match

    I've registered a schema with my DB provided in the Oracle 9i XML DataBase Developer's Guide. I've created a table that has one field of type XMLType and is associated with the registered schema. Now I am trying to insert an xml string - also directly from the Oracle's developer's guide site and am getting 'ORA-19007: Schema and element do not match'.
    These are the steps I took:
    1.begin dbms_xmlschema.registerSchema( 'http://www.oracle.com/po.xsd', getClobDocument ('po.xsd','XSDDIR'), TRUE, TRUE, FALSE, FALSE); end;
    2.create table po_tab(id number,po sys.XMLType ) xmltype column po XMLSCHEMA "http://www.oracle.com/po.xsd"element "PurchaseOrder";
    3.INSERT INTO PurchaseOrder VALUES (xmltype.createxml('<PurchaseOrder xmlns="http://www.oracle.com/po.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/po.xsd"><PONum>1001</PONum><Company>Oracle Corp</Company><Item><Part>9i Doc Set</Part><Price>2550</Price></Item></PurchaseOrder>'));
    this is the po.xsd used:
    <schema targetNamespace="http://www.oracle.com/PO.xsd"
    xmlns:po="http://www.oracle.com/PO.xsd"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <complexType name="PurchaseOrderType">
    <sequence>
    <element name="PONum" type="decimal"/>
    <element name="Company">
    <simpleType>
    <restriction base="string">
    <maxLength value="100"/>
    </restriction>
    </simpleType>
    </element>
    <element name="Item" maxOccurs="1000">
    <complexType>
    <sequence>
    <element name="Part">
    <simpleType>
    <restriction base="string">
    <maxLength value="1000"/>
    </restriction>
    </simpleType>
    </element>
    <element name="Price" type="float"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    <element name="PurchaseOrder" type="po:PurchaseOrderType"/>
    </schema>
    thanks in advance

    Minor correction to the previous message, sorry: I've registered a schema with my DB provided in the
    Oracle 9i XML DataBase Developer's Guide. I've
    created a table that has one field of type XMLType
    and is associated with the registered schema. Now I
    am trying to insert an xml string - also directly
    from the Oracle's developer's guide site and am
    getting 'ORA-19007: Schema and element do not
    match'.
    These are the steps I took:
    1.begin dbms_xmlschema.registerSchema(
    'http://www.oracle.com/po.xsd', getClobDocument
    ('po.xsd','XSDDIR'), TRUE, TRUE, FALSE, FALSE); end;
    2.create table po_tab(id number,po sys.XMLType )
    xmltype column po XMLSCHEMA
    "http://www.oracle.com/po.xsd"element
    "PurchaseOrder";
    3.INSERT INTO PurchaseOrder VALUES
    (xmltype.createxml(1,'<PurchaseOrder
    xmlns="http://www.oracle.com/po.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.oracle.com/po.xsd"><PON
    m>1001</PONum><Company>Oracle
    Corp</Company><Item><Part>9i Doc
    Set</Part><Price>2550</Price></Item></PurchaseOrder>')
    this is the po.xsd used:
    <schema
    targetNamespace="http://www.oracle.com/PO.xsd"
    xmlns:po="http://www.oracle.com/PO.xsd"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <complexType name="PurchaseOrderType">
    <sequence>
    <element name="PONum" type="decimal"/>
    <element name="Company">
    <simpleType>
    <restriction base="string">
    <maxLength value="100"/>
    </restriction>
    </simpleType>
    </element>
    <element name="Item" maxOccurs="1000">
    <complexType>
    <sequence>
    <element name="Part">
    <simpleType>
    <restriction base="string">
    <maxLength value="1000"/>
    </restriction>
    </simpleType>
    </element>
    <element name="Price" type="float"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    <element name="PurchaseOrder"
    type="po:PurchaseOrderType"/>
    </schema>
    thanks in advance

  • Still ORA-19007: Schema and element do not match Error

    Hi all,
    I'm new to XML and dealing with lots of information but I'm stuck with this error ORA-19007: Schema and element do not match. Read some forums and tried some possibitlities but none has solved this issue. I think this is related with some malformed headers definitions but I'm not sure, so any help will be much appreciated.
    Here's what I've done so far:
    This is the xml file - emp.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2006 rel. 3 sp2 (http://www.altova.com)-->
    <employees xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/xdb/emp.xsd">
         <employee team="Team Test">
              <id>1</id>
              <name>Nelson Branco</name>
              <comment>No Comments</comment>
         </employee>
    </employees>
    ...and this is the XSD file: emp.xsd:
    <?xml version="1.0" encoding="ISO-8859-15"?>
    <!-- edited with XMLSpy v2006 rel. 3 sp2 (http://www.altova.com) by Nelson Branco (Oracle Corp) -->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" xdb:storeVarrayAsTable="true">
         <xs:element name="comment" type="xs:string"/>
         <xs:element name="id" type="xs:string"/>
         <xs:element name="name" type="xs:string"/>
         <xs:complexType name="employeeType">
              <xs:sequence>
                   <xs:element ref="id"/>
                   <xs:element ref="name"/>
                   <xs:element ref="comment" minOccurs="0"/>
              </xs:sequence>
              <xs:attribute name="team" type="xs:string" use="optional"/>
         </xs:complexType>
         <xs:element name="employee" type="employeeType"/>
         <xs:element name="employees" xdb:defaultTable="EMPLOYEES">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="employee" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    1) Created folders
    declare
    ignore boolean;
    begin
    ignore := dbms_xdb.createFolder('/public/Emp');
    ignore := dbms_xdb.createFolder('/public/Emp/xsd');
    ignore := dbms_xdb.createFolder('/public/Emp/xml');
    commit ;
    end;
    2) Copied emp.xsd to /public/Emp/xsd in Win Explorer (via WebDAV connection)
    3) Registered the schema
    begin
    dbms_xmlschema.registerURI(schemaURL => 'http://xmlns.oracle.com/xdb/emp.xsd'
    ,schemaDocURI => '/public/Emp/xsd/emp.xsd'
    ,genTables => true
    commit ;
    end ;
    4) Copied the xml file to /public/Emp/xml. At this point I was expecting that the xml file was automatically uploaded to corresponding tables based on is content but it didn't happen. I didn't got any error also. When I issue:
    Select count(*) from employees
    ...or
    select y."name", y."team" from employees x, table(x.xmldata."employee") y
    ...got 0 rows returned
    5) So then created the table:
    create table emp_tab(
    id number,
    emp sys.XMLType
    xmltype column emp
    XMLSCHEMA "http://xmlns.oracle.com/xdb/emp.xsd"
    element "employee";
    6) And tried to insert one record based on the emp.xml:
    insert into emp_tab values (1,
    xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <!--Sample XML file generated by XMLSpy v2006 rel. 3 sp2 (http://www.altova.com)-->
    <employees xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/xdb/emp.xsd">
         <employee team="Team Test">
              <id>1</id>
              <name>Nelson Branco</name>
              <comment>No Comments</comment>
         </employee>
    </employees>'));
    ...and that when I get ORA-19007: Schema and element do not match.
    Any help on this will be appreciated. Thx.

    SQL> set echo on
    SQL> spool testcase.log
    SQL> --
    SQL> connect sys/ as sysdba
    Enter password:
    Connected.
    SQL> set define on
    SQL> --
    SQL> define USERNAME = OTNTEST
    SQL> --
    SQL> def PASSWORD = OTNTEST
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user OTNTEST cascade
    User dropped.
    SQL> grant connect, resource to &USERNAME identified by &PASSWORD
      2  /
    old   1: grant connect, resource to &USERNAME identified by &PASSWORD
    new   1: grant connect, resource to OTNTEST identified by OTNTEST
    Grant succeeded.
    SQL> grant create any directory, drop any directory to &USERNAME
      2  /
    old   1: grant create any directory, drop any directory to &USERNAME
    new   1: grant create any directory, drop any directory to OTNTEST
    Grant succeeded.
    SQL> grant alter session, create view to &USERNAME
      2  /
    old   1: grant alter session, create view to &USERNAME
    new   1: grant alter session, create view to OTNTEST
    Grant succeeded.
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user OTNTEST default tablespace USERS temporary tablespace TEMP
    User altered.
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> alter session set events ='19027 trace name context forever, level 0x800'
      2  /
    Session altered.
    SQL> var schemaURL varchar2(256)
    SQL> var schemaPath varchar2(256)
    SQL> --
    SQL> begin
      2    :schemaURL := 'http://xmlns.oracle.com/xdb/emp.xsd';
      3    :schemaPath := '/public/testcase.xsd';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> create or replace directory XMLDIR as 'c:\xdb\otn'
      2  /
    Directory created.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<?xml version="1.0" encoding="ISO-8859-15"?>
      5  <!-- edited with XMLSpy v2006 rel. 3 sp2 (http://www.altova.com) by Nelson Branco (Oracle Corp) -->
      6  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" xdb:store
    VarrayAsTable="true">
      7  <xs:element name="comment" type="xs:string"/>
      8  <xs:element name="id" type="xs:string"/>
      9  <xs:element name="name" type="xs:string"/>
    10  <xs:complexType name="employeeType">
    11  <xs:sequence>
    12  <xs:element ref="id"/>
    13  <xs:element ref="name"/>
    14  <xs:element ref="comment" minOccurs="0"/>
    15  </xs:sequence>
    16  <xs:attribute name="team" type="xs:string" use="optional"/>
    17  </xs:complexType>
    18  <xs:element name="employee" type="employeeType"/>
    19  <xs:element name="employees" xdb:defaultTable="EMPLOYEES">
    20  <xs:complexType>
    21  <xs:sequence>
    22  <xs:element ref="employee" maxOccurs="unbounded"/>
    23  </xs:sequence>
    24  </xs:complexType>
    25  </xs:element>
    26  </xs:schema>');
    27  begin
    28    if (dbms_xdb.existsResource(:schemaPath)) then
    29      dbms_xdb.deleteResource(:schemaPath);
    30    end if;
    31    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    32  end;
    33  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      :schemaURL,
      5      xdbURIType(:schemaPath).getClob(),
      6      TRUE,TRUE,FALSE,TRUE
      7    );
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> var xmltext varchar2(4000)
    SQL> --
    SQL> begin
      2    :xmltext :=
      3  '<?xml version="1.0" encoding="UTF-8"?>
      4  <!--Sample XML file generated by XMLSpy v2006 rel. 3 sp2 (http://www.altova.com)-->
      5  <employees xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=
    "http://xmlns.oracle.com/xdb/emp.xsd">
      6  <employee team="Team Test">
      7  <id>1</id>
      8  <name>Nelson Branco</name>
      9  <comment>No Comments</comment>
    10  </employee>
    11  </employees>';
    12  end;
    13  /
    PL/SQL procedure successfully completed.
    SQL> insert into EMPLOYEES values ( xmltype(:xmltext));
    1 row created.
    SQL> /
    1 row created.
    SQL> create table emp_tab
      2  (
      3     id number,
      4     emp sys.XMLType
      5  )
      6  xmltype column emp
      7  XMLSCHEMA "http://xmlns.oracle.com/xdb/emp.xsd"
      8  element "employee"
      9  /
    Table created.
    SQL> insert into EMP_TAB values ( 1, xmltype(:xmltext))
      2  /
    insert into EMP_TAB values ( 1, xmltype(:xmltext))
    ERROR at line 1:
    ORA-19040: Element employees does not match expected employee.
    SQL> drop table emp_tab
      2  /
    Table dropped.
    SQL> create table emp_tab
      2  (
      3     id number,
      4     emp sys.XMLType
      5  )
      6  xmltype column emp
      7  XMLSCHEMA "http://xmlns.oracle.com/xdb/emp.xsd"
      8  element "employees"
      9  /
    Table created.
    SQL> insert into EMP_TAB values ( 1, xmltype(:xmltext))
      2  /
    1 row created.
    SQL>

  • SQL LOADER and ORA-01861: literal does not match format string

    Hi,
    I've to load data through control_file(.ctl) into oracle table through sqlldr. Oracle 11g, win xp.
    as soon as I use - sqlldr dss/dss control=orders.ctl I get error or nothing.
    Text file that is generated after loading fails has the following error.
    Record 1: Rejected - Error on table ORDERS, column O_ORDERDATE.
    ORA-01861: literal does not match format string
    I have checked the format of data to be loaded into Orders table is like this : *1996-01-02.*
    I checked the format of data in my database by querying sysdate from dual i.e. 10-JAN-10
    I thought that changing its format might solve my problem so i tried this:
    SQL> alter session set nls_date_format='YYYY-MM-DD';
    Session altered.
    SQL> select sysdate from dual;
    SYSDATE
    2010-01-10but still i'm getting the same error. I've to load millions of data. how I can solve this issue.
    Please suggest.
    Thanks alot.
    Best Regads,
    Kam

    Hi,
    It's strange ....nobody knew it?. I think this type of load problem will be very common isn't it.... where date column data is in a different format than in the db i.e.
    How to change *1996-01-02* in the Control_file to make it able to load in the table where sysdate is like this: *11-JAN-10*
    Sample data to be loaded is :
    1|36901|O|173665.47|1996-01-02|5-LOW|Clerk#000000951|0|nstructions sleep furiously among |
    Desc Orders
    O_ORDERDATE NOT NULL DATEI have tested this by creating a test table and a test control file by omitting this O_ORDERDATE and then everything was fine, data was inserted but don't know how to load this DATE also.
    Also not able to understand about POSITION in the control file...?
    Regards,
    Kam

  • ORA-01435: user does not exist when using imp utility

    I installed Oracle 8.1.7.0.0 successfully on WINDOWS 2000 and created a database TEST using DBCA. Then I used a script to creat a tablespace and a user in TEST databse. I could use the imp utility to import the data (a dmp file) to the TEST database without any problem. But after I applied a patch to bring up the version to Oracle 8.1.7.4.1, I got the following error when I tried to use the imp utility again to import the data (a dmp file) to the TEST database.
    IMP-00003: ORACLE error 1435 encountered
    ORA-01435: user does not exist
    IMP-00000: Import terminated unsuccessfully
    I checked that I created the same user test (as it is in dmp file I wanted to import) on TEST, and I could login to TEST using:
    sqlplus test/test@TEST
    The command I used is:
    imp system/password@TEST file=test.dmp full=y log=importTEST.TEST.tmp
    I also tried to use the following command:
    imp system/password@TEST file=test.dmp fromuser=test touser=test log=importTEST.TEST.tmp
    and got the same error as before.
    Anyone has any clues what could go wrong? The only difference for me to import the data on TEST is that the
    previous successful import was done in Oracle 8.1.7.0.0.
    Is it possible that I missed something during the applying of the patch 8.1.7.4.1?
    Thanks, and your help is greatly appreciated.
    Jane

    Ther is a set of instruction to be followed after installing the patch set 8.1.7.4.1 after running it thru OUI.They are as follows. Please complete these steps and u should not have problems any more.
    When applying this patchset on Windows NT and Windows 2000, you must log onto the system as a user with Administrative privileges (e.g., as a user which is a member of the local Administrators group).
    1.Disabling system triggers.
    Before performing the next step, you must first set SYSTEMTRIG_ENABLED = FALSE in the initialization parameter file. To do this add the following line to your init<sid>.ora file and restart the database (see Note 149948.1 in Metalink for more information on this issue).
    systemtrig_enabled=false
    2.Invoke SQL*Plus (sqlplus), connect as internal and run the following:
    select * from duc$ where PACK='JIS$INTERCEPTOR$' ;
    If no rows were returned go to the next step. If a row was returned delete it using the following:
    delete from duc$ where PACK='JIS$INTERCEPTOR$' ;
    commit;
    3.Invoke SQL*Plus (sqlplus), connect as internal and run the following SQL scripts with event 10520 set. NOTE: This event is not intended for regular database operation and when turned on below by the 'ALTER SESSION' command will automatically be turned off by the subsequent 'CONNECT' command.
    ALTER SESSION SET EVENTS '10520 TRACE NAME CONTEXT FOREVER, LEVEL 10';
    ?/rdbms/admin/catalog.sql
    ?/rdbms/admin/catproc.sql
    ?/rdbms/admin/catrep.sql (This only needs to be run if you are using symmetric/advanced replication. This is not necessary for sites using dblinks and read-only snapshots if symmetric/advanced replication is not installed)
    CONNECT / AS SYSDBA;
    update obj$ set status=5 where type#=29 and owner#!=0;
    commit;
    4.You can ignore this step if you have already executed it as part of a previous 8.1.7 patch set install.
    If Java has previously been loaded into the database, invoke SQL*Plus (sqlplus), connect as internal and run the following SQL DDL command(* Note:If Java has not previously been loaded into the database, skip this step).:
    SQL> create or replace java system
    2 /
    (Note that the / (slash) is important to ensure the execution of the command).
    To ensure the correct installation of the XDK in the database run the following 2 scripts (Bug 2115227):
    $ORACLE_HOME/oracore/admin/initxml.sql
    $ORACLE_HOME/rdbms/admin/catxsu.sql
    * To determine whether Java has previously been loaded into the database:
    invoke SQL*Plus (sqlplus), connect as internal and run the following:
    SQL> select count(*) from all_objects where object_type like 'JAVA%';
    Java is installed if you get a non zero result returned from the query.
    5.You can ignore this step if you have already executed it as part of a previous 8.1.7 patch set install:
    If Java has previously been loaded into the database, invoke SQL*Plus (sqlplus), connect as internal and run the following scripts which are located in $ORACLE_HOME/javavm/install ( Note: If Java has not previously been loaded into the database, you can skip this step):
    load_jis.sql
    jisja.sql
    initjsp.sql
    jspja.sql
    Notes:
    When running the $ORACLE_HOME/javavm/install/jisja.sql script the following error may be reported and can be ignored:
    call jis_exit_java_session(0)
    ERROR at line 1:
    ORA-29515: exit called from Java code with status 0
    Bug 1459233 was filed against this problem which is fixed in 9i.
    6.If you deleted a row from duc$ in step 8 then reinsert it again. Invoke SQL*Plus (sqlplus), connect as internal and run the following SQL:
    insert into duc$ (OWNER, PACK, PROC, FIELD1, OPERATION#, SEQ) values ('SYS', 'JIS$INTERCEPTOR$', 'USER_DROPPED', 0, 1, 1);
    commit;
    7.Enabling system triggers.
    You must either remove SYSTEMTRIG_ENABLED from the initialization parameter file or explicitly set it to TRUE before attempting any other patch set post-install steps. Restart the database.
    8.This step is optional - it will recompile all invalid PL/SQL packages now rather than when accessed for the first time - you can also use utlrcmp.sql to parallelize this. Invoke SQL*Plus (sqlplus), connect as internal and run the following SQL script:
    ?/rdbms/admin/utlrp.sql
    9.Execute the following steps only if you have installed Oracle interMedia Text in the database you are attempting to modify:
    If you have not previously unlocked the ctxsys account and supplied a password for that account, you need to do so. (If you have needed to use Oracle Text in any way prior to applying the patchset, you will have already performed this step, and you can skip this.) Do so by issuing the following statement:
    ALTER USER ctxsys IDENTIFIED BY <passwd> ACCOUNT UNLOCK;
    If you have already installed 8.1.7.2 or 8.1.7.3, go directly to step 7 below.
    If you have already installed 8.1.7.1, go directly to step 5 below.
    CONNECT ctxsys/<passwd>;
    @?/ctx/admin/upgrade/u0801071.sql
    CONNECT ctxsys/<passwd>;
    @?/ctx/admin/upgrade/u0801072.sql
    CONNECT / AS SYSDBA;
    @?/ctx/admin/upgrade/s0801074.sql
    CONNECT ctxsys/<passwd>
    @?/ctx/admin/dr0pkh.sql
    @?/ctx/admin/dr0plb.sql
    @?/ctx/admin/dr0type.plb
    @?/ctx/admin/dr0typec.plb
    9.You can ignore this step if you have already executed it as part of a previous 8.1.7 patch set install:
    The installation of this patch set fixes a potential security hole in the XSQL Servlet - see here for more detail. The patchset installation does not, however, modify any of the Oracle HTTP Server configuration files to reflect changes to the XSQL Servlet installation. If you have previously installed the Oracle HTTP Server, you will need to update one of the configuration files manually after the patchset installation is complete. If you do not do so, the XSQL Servlet may not work in the context of the Oracle HTTP Server after the patchset is installed. To update your Oracle HTTP Server configuration, perform the following steps:
    1) Edit the file: $ORACLE_HOME/Apache/Jserv/conf/jserv.properties
    2) Search for the string: "XSQLConfig.xml File location"
    3) Modify the parameter wrapper.classpath on the line immediately following the above string to read: $ORACLE_HOME/oracore/admin
    4) Save the file.
    10.You can ignore this step if you have already executed it as part of a previous 8.1.7 patch set install:
    The installation of this patch set fixes a potential security hole in the PL/SQL XML parser - see here for more detail. To load the new XML parser in to the database, run the following script as user SYS:
    ? /xdk/plsql/parser/bin/load.sql
    11.If you are using the RMAN catalog then upgrade it as follows:
    rman catalog <user/passwd@alias>
    upgrade catalog;
    upgrade catalog;
    The post install actions are now complete and the database is now ready for use.

  • Error creating sdo_pc point cloud: "ORA-02289: sequence does not exist"

    Oracle Database 12c Enterprise Edition Release 12.1.0.1.0
    I've come across a problem when creating point clouds - every so often I'll get an error about a sequence not existing.
    ERROR at line 1:
    ORA-13199: Invalid Parameters for Partition_Table
    ORA-13199: Invalid Parameters for Partition_Table
    ORA-13249: Stmt-Execute Failure: DROP SEQUENCE "MDPCS_a_17745$$$"
    ORA-29400: data cartridge error
    ORA-02289: sequence does not exist
    ORA-06512: at "MDSYS.PRVT_PC", line 3
    ORA-06512: at "MDSYS.PRVT_PC", line 171
    ORA-06512: at "MDSYS.SDO_PC_PKG", line 179
    ORA-06512: at line 17
    I've got a test case which creates a table where we'll put a sdo_pc, a block table and then a loading XYZ table.  We then loop a bunch of times and create a PC for each.
    Test case setup:
    create table pc_test (
        id integer primary key,
        pc sdo_pc);
    create sequence pc_test_id;
    create table pc_test_blocks as select * from mdsys.sdo_pc_blk_table;
    create table xyz (
        rid number,
        val_d1 number,
        val_d2 number,
        val_d3 number);
    insert /*+ append */ into xyz (
        select
            rownum,
            round(dbms_random.value(1,10000),2),
            round(dbms_random.value(1,10000),2),
            round(dbms_random.value(20,50),2)
        from dual
        connect by level <= 1000);
    commit;
    Run test case:
    declare
      l_pc sdo_pc;
        l_id pls_integer;  
    begin
        for i in 1..50 loop
            l_pc := sdo_pc_pkg.init(
                'PC_TEST', 'PC', 'PC_TEST_BLOCKS', 'blk_capacity=500',
                sdo_geometry(2003, 2157, NULL, sdo_elem_info_array(1,1003,3), sdo_ordinate_array(400000, 500000, 800000, 1000000)),
                0.005, 3, null);
            l_id := pc_test_id.nextval;
            dbms_output.put_line('PC_TEST id=' || l_id);
            insert into pc_test (id, pc) values (l_id, l_pc);
            sdo_pc_pkg.create_pc(l_pc, 'XYZ');
        end loop;
    end;
    Some of the PCs will create, but eventually it'll blow up with
    ORA-02289: sequence does not exist
    In so far as I can tell, once I call sdo_pc_pkg.create_pc(), Oracle is creating a sequence with a name such as MDPCS_a_1751F$$$.  When it is done creating the blocks, it then tries to drop the sequence.  However the statement to drop the sequence is wrapped in double quotes - so if the sequence name contained any lowercase letters then it will error out when trying to drop it.  The values used between the underscores seem to be hexadecimal - sometimes they're numbers only, sometimes numbers and uppercase letters, sometimes numbers and lowercase letters.
    Has anybody else come across this issue?
    The issue isn't critical as the PC blocks do seem to be created correctly, so the issues are: (a) my pl/sql block errors out and (b) I'm left with sequences lying around.
    For the former I'll catch the exception and ignore it, for the latter I'll just drop the sequences myself afterwards.

    I tried the test on 11.2.0.4.  On that release I get an error during a rename:
    ERROR at line 1:
    ORA-13199: Invalid Parameters for Partition_Table
    ORA-13199: Invalid Parameters for Partition_Table
    ORA-13249: Stmt-Execute Failure: RENAME "MDPCI_a_26062$$$" TO "M3_A_26062$$"
    ORA-29400: data cartridge error
    ORA-04043: object MDPCI_a_26062$$$ does not exist
    ORA-06512: at "MDSYS.PRVT_PC", line 3
    ORA-06512: at "MDSYS.PRVT_PC", line 157
    ORA-06512: at "MDSYS.SDO_PC_PKG", line 74
    ORA-06512: at line 17

  • ORA-12514 TNSlistener does not currently know of service requested in conne

    When I connect in command prompt using username,password & Host String(tnsNames.ora). Its succeed as seen below.
    C:\>sqlplus sonia/mypass@sonia - In this line First sonia is the userName & second Sonia is the host from the tnsnames.ora
    SQL*Plus: Release 11.2.0.2.0 Production on Wed Jul 4 13:12:43 2012
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - ProductionBut When I use the sqlPlus screen to connect to Oracle -
    UserNAme - sonia
    Password - mypass
    HostString - sonia
    I am getting ERROR - ORA-12514 TNSlistener does not currently know of service requested in connect descriptor.
    I am not getting why I am not able to LOGIN FROM SQLPLUS SCREEN.
    I searched on the net, But still No LUck.My database is also started which I find using the C:>sc query OracleServiceXE
    tnsnames.ora (LOCATION - C:\oracle\product\10.2.0\client_1\network\admin\tnsnames.ora
    # tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\client_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    SONIA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sonia)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = SONIA)
    tnsNAmes.ora -C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
    XE =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = sonia)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
        (CONNECT_DATA =
          (SID = PLSExtProc)
          (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
        (CONNECT_DATA =
          (SID = CLRExtProc)
          (PRESENTATION = RO)
    Listener.ora -C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
    XE =
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
          (PROGRAM = extproc)
        (SID_DESC =
          (SID_NAME = CLRExtProc)
          (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
          (PROGRAM = extproc)
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
          (ADDRESS = (PROTOCOL = TCP)(HOST = sonia)(PORT = 1521))
    DEFAULT_SERVICE_LISTENER = (XE)I am still confused in that I have two tnsNames.ora in different locations.Is that OK?

    hello All,
    Thanks you all.
    I am succeed in login through SQL PLus Screen. I make the two tnsNames.Ora exactly same. & it worked for me.
    TnaNames.Ora
    XE =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = sonia)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = XE)
    EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
        (CONNECT_DATA =
          (SID = PLSExtProc)
          (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
        (CONNECT_DATA =
          (SID = CLRExtProc)
          (PRESENTATION = RO)
      ) Through Command prompt : -
    FIRST LOGIN
    C:\>sqlplus sonia/mypass@XE
    SQL*Plus: Release 11.2.0.2.0 Production on Fri Jul 6 14:04:35 2012
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    SQL>SECOND LOGIN : -
    C:\>sqlplus sonia/mypass@sonia
    SQL*Plus: Release 11.2.0.2.0 Production on Fri Jul 6 14:03:50 2012
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    SQL>1) I want to ask that, Now in TnsNames.Ora there is no HostString Exist named Sonia, then how in the second method (SEE ABOVE), I am able to login using sonia.
    2) Secondly, I want to know how to get TNS_ADMIN value. I have tried but no output for me (SEE BELOW)
    C:\>set TNS_ADMIN=%ORACLE_HOME%\network\admin
    C:\>echo %ORACLE_SID%
    %ORACLE_SID%
    C:\>I have read on the net : - If ORACLE_HOME is not set, the output will simply give back %ORACLE_HOME%. It means my TNS_ADMIN is not set.

  • Import Error: ORA-01435 : User does not exist

    Hi all,
    I am importing a dump into 11g Database, the dump taken from Old Financial release 6 [EBIZ]
    i given this command:
    IMP FILE=EXPDUMP.DMP BUFFER=524288000 FULL=Y IGNORE=Y
    Import user system and password given...
    Once its started and getting error
    +"ALTER USER "PERFUSER" QUOTA UNLIMITED ON "OTHERD""+
    IMP-00003: ORACLE error 1918 encountered
    ORA-01918: user 'PERFUSER' does not exist
    IMP-00017: following statement failed with ORACLE error 1918:
    +"ALTER USER "DUB_QUERY" QUOTA UNLIMITED ON "OTHERD""+
    IMP-00003: ORACLE error 1918 encountered
    ORA-01918: user 'DUB_QUERY' does not exist
    IMP-00017: following statement failed with ORACLE error 1918:
    +"ALTER USER "OEMV22" QUOTA UNLIMITED ON "OEM_REPOSITORY""+
    IMP-00003: ORACLE error 1918 encountered
    ORA-01918: user 'OEMV22' does not exist
    IMP-00017: following statement failed with ORACLE error 1918:
    +"ALTER USER "W03063_ITD" QUOTA UNLIMITED ON "TEMP" QUOTA UNLIMITED ON "OEM_R"+
    +"EPOSITORY""+
    IMP-00003: ORACLE error 1918 encountered
    ORA-01918: user 'W03063_ITD' does not exist
    +. importing APPS's objects into APPS+
    IMP-00003: ORACLE error 1435 encountered
    ORA-01435: user does not exist
    +. importing DUB_QUERY's objects into DUB_QUERY+
    IMP-00003: ORACLE error 1435 encountered
    ORA-01435: user does not exist
    +. importing SYSTEM's objects into SYSTEM+
    +. importing APPLSYS's objects into APPLSYS+
    +"ALTER SESSION SET CURRENT_SCHEMA= "APPLSYS""+
    IMP-00003: ORACLE error 1435 encountered
    ORA-01435: user does not exist
    IMP-00000: Import terminated unsuccessfully
    Kindly advice me what is the wrong,,
    I have created all the data files same like Old Database. so while importing All the USERs will created, if its correct then why this "*ORA-01435 : User does not exist*" coming...
    Regards
    Paja
    Edited by: Hameed on Jul 2, 2012 4:50 AM

    Create tablespace :
    select 'CREATE TABLESPACE '||TABLESPACE_NAME||' DATAFILE '||FILE_NAME||' SIZE '||BYTES||' autoextend on '||';'
    from dba_data_files
    order by tablespace_name;
    Create User :
    select ' CREATE USER '||USERNAME||' IDENTIFIED BY '||USERNAME||' DEFAULT TABLESPACE '||DEFAULT_TABLESPACE||' temporary tablespace ' ||' TEMP quota unlimited on '|| DEFAULT_TABLESPACE||';'
    from dba_users
    order by USERNAME;
    Create Role
    select 'CREATE ROLE ' || ROLE || ' ;'
    from DBA_ROLES
    order by ROLE
    Grant Role :
    select ' GRANT '|| GRANTED_ROLE || ' to ' || GRANTEE || ' ;'
    from DBA_ROLE_PRIVS
    order by GRANTED_ROLE
    Br
    osama
    Edited by: Osama-mustafa on Jul 2, 2012 5:47 PM

  • Error: ORA-01861: literal does not match format string

    Hi,
    I am doing a RFC-XI-JDBC scenario.
    In the CC monitoring , i am getting this error for the reciver CC:
    "Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. "TableNAMe"(structure 'STATEMENTNAME'): java.sql.SQLException: ORA-01861: literal does not match format string "
    Please guide me what can be the cause and how to solve it.
    Thanks,
    Puneet

    This is how my payload looks like :
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_JDBC_REC xmlns:ns1="https:namespace.scene3">
    <STATEMENTNAME>
    <TABLE_NAME action="INSERT">
    <TABLE>ggclgis</TABLE>
    <access>
    <VALVE_ID>12584</VALVE_ID>
    <EQUNR>122</EQUNR>
    <ERNAM>12122</ERNAM>
    <INVNR>1212</INVNR>
    <GROES>1212</GROES>
    <ELIEF>123</ELIEF>
    <GWLEN>21-jul-2008</GWLEN>
    <GWLDT>12-jun-2006</GWLDT>
    <SERGE>wqwqw</SERGE>
    <TYPBZ>wqwqwq</TYPBZ>
    </access>
    </TABLE_NAME>
    </STATEMENTNAME>
    </ns1:MT_JDBC_REC>
    Please tell me if it looks fine.

  • ORA-01861 literal does not match format string, ORA-02063preceding line fro

    We have upgraded a client from 8.0.5 to 9.2.03. The following query is called from a report that was built using Cold Fusion5. It worked in 8.0.5, but not 9.2.03. When you run the report you get the errors
    [Oracle][ODBC][Ora]ORA-01861: literal does not match format string ORA-02063: preceding line from FRPE
    Here's the query:
    SELECT x.acct, x.obj, x.offn, x.status, x.asofdate, max( decode( x.func_id, 1, t, null ) ) UOB, max( decode( x.func_id, 12, t, null ) ) COB, max( decode( x.func_id, 24, t, null ) ) Rate_Warning, max( decode( x.func_id, 2, t, null ) ) Sector_Change, max( decode( x.func_id, 2006, t, null) ) FRRFRD , max( decode( x.func_id, 2003, t, null ) ) No_Tcode , max( decode( x.func_id, 2004, t, null) ) No_Sector FROM ( SELECT a.acct, a.func_id, count(*) cnt, 'Fail' t, b.obj, b.offn, b.status,a.asofdate FROM frpfaud@FRPE a, frpair@FRPE b WHERE a.acct=b.acct AND a.asofdate='2008-02-29 00:00:00' AND b.bnk not like 'B%' and b.obj not in ('KL') and b.obj in ('GAF') GROUP BY a.acct, a.func_id,b.obj,b.offn,b.status,a.asofdate) x GROUP BY x.acct, x.obj,x.offn,x.status,x.asofdate
    Now, this query will not work by running straight through SQL worksheet in either the 8.0.5 or 9.2.03 regions. So I guess it has something to do with Cold Fusion- which I know nothing about. Has anyone had any experience using Cold Fusion to issue a query? What would be the cause of the difference between the Oracle versions? That is the only thing that changed.
    Thanks for any input.

    I actually want the date format of DD-MON-YY. Which, from what I understand, is the default format for both Oracle 8.0.5 and 9.2.03. I'm trying to figure out why it is now displaying as 'yyyy-mm-dd hh24:mi:ss'. I could convince the client that the code needs changing if I had evidence that this version of Oracle (9.2.03) used a different default date format. Or if Cold Fusion pulls the date differently. Ughh.
    Here are the database parameters:
    SQL> show parameter nls_date_format
    NAME TYPE VALUE
    nls_date_format string
    select sysdate from dual;
    SYSDATE
    26-FEB-08
    1 row selected.
    select * from nls_session_parameters
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    17 rows selected.
    select * from v$nls_parameters
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_CHARACTERSET WE8MSWIN1252
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    19 rows selected.

  • Context is installed, but ORA-29833: indextype does not exist appears

    My Oracle 8.1.7.0.1 did not contain CTXSYS user and all needed roles and i
    did this thing: http://www.orafaq.org/faqctx.htm#ENABLE and now it does
    contain!
    It's cool, but also i have a problem:
    I grant CTXAPP role to some user, and try to create index on CLOB filed:
    create index forumindex on forummess(mess) indextype is ctxsys.context
    And i get error:
    ORA-29833: indextype does not exist
    Why?? I cannot understand...
    Can you say - what can be the reason?

    Please ask this question in the Oracle Text forum (formerly interMedia text). You will get a quicker, more expert answer there.

Maybe you are looking for

  • I Need To Know What You Would Do If You Were In My Shoes

    I bought a iMac 24" 2.33ghz and a Apple Retailer replaced the Ram, Motherboard, Optical Drive, and it was sent home then it went down again after a Apple Rep. came out and worked on it so Apple sent me a NEW iMac 24" 2.4ghz which was great until the

  • How to using RSCRMBW_REPORT

    Hi,buddies:     who have an example about how to using RSCRMBW_REPORT?     thanks in advance. Martin Xie

  • Ethernet not working under Windows XP

    I have installed Windows XP Pro via BootCamp and loaded BootCamp Drivers after the installation process Downloading Windows SP3 was possible via Ethernet connection, since SP3 is installed, Ethernet is missing a driver. Wifi however is working fine A

  • Vista Install or Image CD/DVD

    How can I Re-install the Vista OS ?  There weren't any Vista or Image CDs included in the box, just a Vista drivers CD.  Can I purchase the Image CDs? Thanks. Message Edited by ryanhi on 09-10-2008 05:49 AM

  • Skype Manager Difficult to FIND?

    I hadn't used Skype Manager for a while, and went to www.Skype.com to access it.  Logged in as myself, and I am set as a full administrator for our business account. Why isn't there an obvious, prominent link after I login, to go to the Skype Manager