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>

Similar Messages

  • 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

  • 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

  • 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>

  • 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

  • I am using Windows 8.1 and Prem Elements 13 and Elements is not seeing my recordings on a CF Card The camera is a Canon XF 100 recording in Mpeg2

    I am using Windows 8.1 and Prem Elements 13 and Elements is not seeing my recordings on a CF Card The camera is a Canon XF 100 recording in Mpeg2. I have been told it is a codec clash?

    jamesb
    Premiere Elements 13 Windows 8.1 (assumed 64 bit).
    From what I have read, the Canon XF100 uses the MPEG2 Long GOP video compression, however it uses a MXF file extension (container/wrapper format).
    Premiere Elements (any version) does not support MXF files.
    Based on existing information, you would need to convert the MXF file to another format which is supported by Premiere Elements.
    Apparently lots of the MXF converters available online.
    Have you been there and done that?
    ATR

  • Hello I saw in the latest version of photoshop , smart guides make a measurement between layers, I still have windows xp and I can not buy that version , there is something like to do that but cs6 ? thx

    hello I saw in the latest version of photoshop , smart guides make a measurement between layers, I still have windows xp and I can not buy that version , there is something like to do that but cs6 ? thx

    There definitely is! Here's a link to the Adobe tutorial: Work with Smart Guides | Adobe Photoshop CC tutorials

  • Accounts and entities do not match in application ownership

    Hi all,
    I'm working on NW 7.5 SP07 (upgrading in SP09 isn't an option at the moment) and when running Consolidation i am getting the error "Accounts and entities do not match in application ownership".
    I am very familiar with Consolidation and created consol appsets numerous times, so I am confident I have set up the dimensions correctly (with all the right properties), appset and app web parameters all look ok, business rules are good, ownership and rate data is all in correct place...but no matter what i do i still get this error.
    FX, carry-forward and calc accounts all work ok, so it is simply something wrong with the ownership app or with how finance is talking to it.
    There was only 1 thread I could find where others had this issue - many people had the same problem and there was never a clear solution to it ..... [Accounts and entities do not match data in application OWNERSHIP; 
    Any ideas besides upgrading to SP09?
    Tom.

    Hi Tom
    Thank you for answer. I found some missing data in my ownership cube and now  'Accounts and entities do not match in application ownership' gone but new error appears after validate script in se38 'GETWA_NOT_ASSIGNED'. Have you ever had this kind of error?
    SAP sent me some tasks list but it seems to me that I have all settings they sent in that document.
    I have a couple of questions and will be very appreciate if you can answer me.
    Are additional members in O_Acct  necessary? If I use only METHOD PCON PGROUP POWN in my input schedules.
    METHOD_SYS
    PCON_SYS
    PCTRL
    PCTRL_SYS
    POWN_SYS
    POWND
    POWND_SYS
    Are you using those above for your consolidation process?
    Are you using dynamic hierarchy editor or input schedules to maintain your ownership data?
    Regards!
    Justyna

  • ORA-01504: database name 'DEV1' does not match parameter db_name 'PROD1'

    Hi, All -
    This is my first time cloning a database. The recovery finished but gave me the following error message. All the parameters in the pfile are set to "DEV1". I believe that the parameter db_name 'PROD1' exists in the control file and causing this error. The control file is under ASM.
    How can I change the parameter in the control file and bring the 'DEV1' cloned database up? Also, how can I avoid this issue next time I do a clone?
    Thanks in advance!
    Oracle 10g Release 2 on RHEL5
    Database cloning using RMAN Duplicate > ORA-01504: database name 'DEV1' does not match parameter db_name 'PROD1'
    ASMCMD> ls
    control01.ctl
    current.275.729098001
    archive log filename=/u001/dbsvr/dev1/1_131706_653848580.dbf recid=59 stamp=741953991
    media recovery complete, elapsed time: 00:09:31
    *Finished recover at 01-FEB-11*
    contents of Memory Script:
       shutdown clone;
       startup clone nomount ;
    executing Memory Script
    database dismounted
    Oracle instance shut down
    connected to auxiliary database (not started)
    Oracle instance started
    Total System Global Area     725614592 bytes
    Fixed Size                     2075592 bytes
    Variable Size                448791608 bytes
    Database Buffers             268435456 bytes
    Redo Buffers                   6311936 bytes
    sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DEV1" RESETLOGS ARCHIVELOG
      MAXLOGFILES     50
      MAXLOGMEMBERS      5
      MAXDATAFILES      100
      MAXINSTANCES     1
      MAXLOGHISTORY     5445
    LOGFILE
      GROUP  1 '+DATA3/dev1/datafile/redo01.log' SIZE 100 M ,
      GROUP  2 '+DATA3/dev1/datafile/redo02.log' SIZE 100 M ,
      GROUP  3 '+DATA3/dev1/datafile/redo03.log' SIZE 100 M
    DATAFILE
      '+DATA3/dev1/datafile/system01.dbf'
    CHARACTER SET WE8ISO8859P1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 02/01/2011 10:30:17
    RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
    ORA-01504: database name 'DEV1' does not match parameter db_name 'PROD1'
    RMAN>
    RMAN> **end-of-file**
    RMAN>

    Respected, Sybrand Bakker -
    Thanks for constructive feedback!
    Here are the command that I ran.
    RMAN> connect target sys/<password>@PROD1
    connected to target database: PROD1 (DBID=556212836)
    RMAN> connect auxiliary sys/<password>
    connected to auxiliary database: DEV1 (not mounted)
    RMAN> @rman_dup.sql
    rman_dup.sql contains
    run {
        allocate auxiliary channel d1 type disk;
    set newname for datafile 1 to '+DATA3/dev/datafile/system01.dbf';
    set newname for datafile 2 to '+DATA3/dev/datafile/undotbs01.dbf';
    set newname for datafile 3 to '+DATA3/dev/datafile/cwmlite01.dbf';
    set newname for datafile 4 to '+DATA3/dev/datafile/drsys01.dbf';
    set newname for datafile 5 to '+DATA3/dev/datafile/example01.dbf';
    set newname for datafile 6 to '+DATA3/dev/datafile/indx01.dbf';
    set newname for datafile 7 to '+DATA3/dev/datafile/odm01.dbf';
    set newname for datafile 8 to '+DATA3/dev/datafile/tools01.dbf';
    set newname for datafile 9 to '+DATA3/dev/datafile/users01.dbf';
    set newname for datafile 10 to '+DATA3/dev/datafile/xdb01.dbf';
    set newname for datafile 11 to '+DATA3/dev/datafile/cons01.dbf';
    set newname for datafile 12 to '+DATA3/dev/datafile/survey01.dbf';
    set newname for datafile 13 to '+DATA3/dev/datafile/mem201.dbf';
    set newname for datafile 14 to '+DATA3/dev/datafile/cons02.dbf';
    set newname for datafile 15 to '+DATA3/dev/datafile/mem202.dbf';
    set newname for datafile 16 to '+DATA3/dev/datafile/cater01.dbf';
    set newname for datafile 17 to '+DATA3/dev/datafile/users02.dbf';
    set newname for datafile 18 to '+DATA3/dev/datafile/mar_data01.dbf';
    set newname for datafile 19 to '+DATA3/dev/datafile/sysaux01.dbf';
    set newname for datafile 20 to '+DATA3/dev/datafile/streams_tbs_01.dbf';
    set newname for datafile 21 to '+DATA3/dev/datafile/users03.dbf';
    set newname for tempfile 1 to '+DATA3/dev1/tempfile/temp01.dbf';
      duplicate target database to dev1
      until scn 48712532746
      logfile
       '+DATA3/dev1/datafile/redo01.log' size 100M,
       '+DATA3/dev1/datafile/redo02.log' size 100M,
       '+DATA3/dev1/datafile/redo03.log' size 100M;
    }Edited by: CipherDBA on Feb 3, 2011 10:50 AM

  • How can i fix a clip when the video and audio are not matching up?

    How can i fix a clip when the video and audio are not matching up? I imported the video from a junkdrive in a .VOB format and concerted to a .mov the videos were filmed on a miniDVD recorder.

    I would try detaching the audio and the dragging the audio to the left or right until it lines up.

  • I would like to add to the Safari toolbar on my ipad 5 IOS 6  machine. I have searched the web and find some instructions to do this but the words and pictures do not match what I can see. I am beginning to think this is not a capabilty of the ipad 5

    I would like to add to the Safari toolbar on my ipad 5 IOS 6  machine. I have searched the web and find some instructions to do this but the words and pictures do not match what I can see. I am beginning to think this is not a capabilty of the ipad 5 but perhaps for a Mac computer running Safari. Does anyone know if it is possible to add tools to the toolbar on the latest version of iPad OS & Safari Browser? If so please tell me how. Thanks

    You cannot customize the Safari toolbar on the iPad.
    What you can do on the iPad is go to Settings>Safari>Always show Bookmarks Bar>On and that will add a bookmarks bar on to the Safari browser.

  • IMovie will not import or play the clips at the proper speed and the audio and video do not match up.

    i have a samsung hd camcorder. it records at 40 fps, but iMovie will not play the clips at the proper speed and the audio and video do not match up. I have tried to record at standard quality to no avail. Help. thanks in advance.

    samsung sc-hmx10c     ntsc
    im guessing that is the speed it records at due to the fact imovie puts a blue 40 at the top left corner of every clip i import.

  • Storage Breakdown On iTunes and iPhone Do Not Match Up

    I will preface this question by providing the following information:
    Computer Information
    Model: MacBook Pro, mid 2009, 15 inch
    Capacity: 1 TB
    OS: Yosemite (10.10.1)
    iTunes Version: 12.0.1.26
    iPhone Information
    Model: iPhone 6 Plus, purchased early 1/2015
    Capacity: 128 GB
    OS: iOS 8.1.2
    Okay here's the problem. I was attempting to sync my iPhone 6 Plus with my iTunes library. I have about 50 GB of music which I normally carry around on my iPhone, which amounts to about half of my total storage. On my latest sync, I was told in iTunes that I do not have enough space to complete the sync. Here's what the display looked like:
    As you can see:
    > The total capacity for audio is displayed as being 49.67 GB (aprox. 6889 songs).
    > The total capacity for photos is displayed as being 6.89 GB (aprox. 10,647 photos).
    > The total capacity for apps is displayed as being 5.04 GB (aprox. 110 apps).
    > The total capacity for other is displayed as being a whopping 45.08 GB.
    Upon seeing this, I'm shocked that the other category is taking up so much space. I immediately go to my iPhone to begin trying to eliminate things that could possibly be taking up all this space. When I take a look at my iPhone usage, I see this:
    As you can see, the photos and apps are approximately correct, but the songs are way off. In addition, the free space I have on my iPhone according to iTunes is 6.12 GB. According to my iPhone though, I have 47.1 GB (see the screenshot of my iPhone above).
    Essentially the storage breakdown on my iPhone and iTunes does not match up. I'm not sure how to fix this problem without restoring the phone, which I want to avoid doing if I don't have to.
    Has anyone else had this problem? If so, is anyone aware of a possible solution?
    Thanks.

    If it was an iOS bug I would expect to see it on the 3 devices I have upgraded to iOS 8. I don't see it on any. I would also expect there to be thousands of posts and views about it, as somewhere over 100 million users have updated. This is the only thread I have seen, and you are the only one posting about it.
    Go to Settings/iCloud. Turn off Find my iPhone. Then go to Settings/general/reset - Erase all content and settings. Check your "Other". I would expect it to be minimal.

  • Username and password do not match

    I can no longer authenticate.  I get "Username and password do not match".
    Is there a file I can edit to reset the username and password?
    Thanks in advance,
    Mike Britton

    We should take a look at the log files to see what's really going on but if you haven't done anything with the installation yet then "reinstalling" is very easy.
    In the directory where you launched the jar file, you should find a directory named "crx-quickstart". Simply rename this directory to "crx-quickstart.old" and restart the jar file. Your new environment will be ready in a couple of minutes.  Keep the old directory and look into the [your directory]\crx-quickstart\logs directory for details on your original problem.

  • RUN LOGIC:Accounts and entities do not match data in application Ownership (BPC10.0 NW)

    Hello Experts,
    During execution of the legal consolidation package we get the following error: "Accounts and entities do not match data in application OWNERSHIP"
    We have entered the ownership and transaction data.
    Could you, please, help us to solve the problem?
    Thanks.

    Hi
    The Ownership has accounts like Percentage consolidation etc. Please check if you have selected the correct ones, marked as use in consolidation process and loaded Ownership data aganst those .
    Regards
    Surabhi

Maybe you are looking for

  • Sharepoint 2013 Wiki Page - Links in content rewritten to relative urls

    We have an issue where on all SharePoint 2013 wiki pages any URL to items within the site containing the wiki page are rewritten to be relative URLs. This causes a huge problem when we surface these pages and a snippet of their content through a sear

  • How do I add .swf created with Photoshop web gallery to Dreamweaver page.?

    I've used Photoshop CS3 to create a Flash Web Gallery. I put that folder in my site root in dreamweaver, but when I add the .swf to the webpage- it only shows as a white box. Even when I press "play" nothing happens. What else needs to be done? All o

  • Can system update session files be deleted?

    It seems to me ThinkVantage System Update must be keeping everything it downloads. I now have on my T60 about 7000 files (2.5GB) of files under C:\Program Files\Lenovo\System Update\sessions. Does that function not clean up after itself? Can any of t

  • DVD ROM Empty

    I'm new to apple and idvd. I am making a dvd of some slideshows I made in iphoto, I have the box checked for "Always add original slideshow photos to DVD-ROM" in idvd preferences. I imported the slideshows into idvd, and checked out the dvd-rom file,

  • To get the employee with the largest salary

    Is it possible to find the employee with the largest salary without using a subquery???