How to identify objects created by registering xml schema

Hi Everyone,
We are using Oracle 9i Rel2. I have registered an XML schema and I saw that there were several objects created for it table ,some types and a trigger . For some build purposes I want to exclude all of these objects which are associated with xml schema and should be able to drop and recreate the whole of oracle schema.
I see the user_types table does not have any parameter to indicate that these are autogenerated or are different. In user_types they look like any other type that a user would have created. Do any of you know how to differentiate these types created by registering XML schemas from the normal types.
Thanks for your help

There is no way I know of to differentiate between a type created by Schema Registration and another Type. You can query the XML Schema itslef to get the Typenames it relies on.
SQL> --
SQL> SQL> select nvl(extractvalue
2 (
3 value(ct),
4 '/xs:complexType/@name',
5 'xmlns:xs="http://www.w3.org/2001/XMLSchema"
6 xmlns:xdb="http://xmlns.oracle.com/xdb"'
7 ),'Local Complex Type') COMPLEX_TYPE,
8 extractvalue
9 (
10 value(ct),
11 '/xs:complexType/@xdb:SQLType',
12 'xmlns:xs="http://www.w3.org/2001/XMLSchema"
13 xmlns:xdb="http://xmlns.oracle.com/xdb"'
14 ) SQL_TYPE
15 from user_xml_schemas,
16 table
17 (
18 xmlsequence
19 (
20 extract
21 (
22 schema,
23 '//xs:complexType',
24 'xmlns:xs="http://www.w3.org/2001/XMLSchema"
25 xmlns:xdb="http://xmlns.oracle.com/xdb"'
26 )
27 )
28 ) ct
29 /
COMPLEX_TYPE
SQL_TYPE
PurchaseOrderType
PURCHASEORDER_T
LineItemsType
LINEITEMS_T
LineItemType
LINEITEM_T
COMPLEX_TYPE
SQL_TYPE
PartType
PART_T
ActionsType
ACTIONS_T
Local Complex Type
ACTION_T
COMPLEX_TYPE
SQL_TYPE
RejectionType
REJECTION_T
ShippingInstructionsType
SHIPPING_INSTRUCTIONS_T
Local Complex Type
ROOT_T
COMPLEX_TYPE
SQL_TYPE
Local Complex Type
P222_T
10 rows selected.
SQL>

Similar Messages

  • How to identify MBeans created and registered from a Remote RMI Connection

    Hi. I'm writting an application that has a central MBeanServer. Each time a remote agent is started, it creates a JMXConnection (RMI) to the Server. During its lifetime the remote agent creates mbeans, invoke methods, etc.
    On the JMXConnectorServer server the JMXConnectionNotifications are listened.
    What I want is:
    When the remote agent dies, to unregister automatically the MBeans created through the remote connection.
    I'm received the Connection Closed Notification, So I can retrieve de connectionID of the closed connection, but I cannot correlate the connectionID with the mbeans created and registered through that connection.
    Any Ideas?
    Thanks

    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!
    Try a Coke-a-Cola ther good!

  • Unable to disply type created by registering XML schema

    Hello,
    I have tried to register my XML schema.
    The process returns with success and I can see new object types created by:
    select * from user_types;
    However, if I perform a DESC on the object type it says:
    ORA-0403: object <MyType> does not exist.
    Has anybody seen the problem before ?
    Thanks,
    Bryan

    Hi,
    Thanks a lot for the reply.
    I have tried out and it seems to me that the SQLType specified in my schema must be in Capital letters. Otherwise DESC won't work.
    Quoting it doesn't seem to work as well.
    Bryan

  • How to identify and delete objects after failure of registering XML schema

    Hi,
    I have tried to register a XML schema with many global elements but failed.
    I have checked the view DBA_XML_SCHEMA and found that there is an entry for this failed XML schema and the disk spaces would not be freed after the failure of registration as well.
    I have tried DBMS_XMLSCHEMA.deleteSchema() with DELETE_CASCADE_FORCE but failed with ORA-31000: Resource is not XDB document.
    How can I identify and delete the objects for this failed XML schema and free up the disk space ?
    I would not prefer to use 'DROP USER ... CASCADE' since there are other objects owned by this user.
    Thanks in advance.

    you can get them from user_objects.
    but you have to identify them manuallly if your schema has other objects other then created by the xml schema creation process.
    Note these objects will be cases senistitive. so you should enclose them with double quotes during deletion.

  • How to Generate and Register XML Schema

    Does any one know how to gererate Oracle type XML schema provided XML file and register to XMLType field?
    Thanks for any expert suggestion...

    The SQL statement below shows how one can register XML schema to an XMLType column:
    create table po_tab(
    id number,
    po sys.XMLType
    xmltype column po
    XMLSCHEMA "http://www.oracle.com/PO.xsd"
    element "PurchaseOrder";
    Similarly you can register XML schema to the INVDOC field in the your INVOICE table.
    Hope it helps
    Shefali
    (OTN team)

  • How to create our own XML Schema (.xsd) in Weblogic WorkShop

    Hi,
    I am new to Weblogic Workshop.I want to create one xml schema with custom elements.
    when I am creating a file xml schema(.xsd).The file contains default namespace and no child elements in it.I don't know how to add elements to that file.
    please tell me how to add parent elements and child elements and also our own xml namingspace.

    Hi Sivaram,
    Unfortunately, the 8.1 IDE did not have special tooling for schema generation.
    You will need to create it by hand or using an external tool
    If you are using an external tool to create the file within the schema project, you might want to disable the schema project auto build, which will be triggered every time a file save takes place
    cheers
    Raj

  • How can I modify a registered XML-Schema?

    Hi
    I have registered a XML-Schema document. Is it possible to modify it?
    Here is an example of an registered XML-Schema. What I have to do if I would like to change for example the MA_NR, without to delete and recreate the XML-Schema?
    DECLARE
    xml_schema VARCHAR2(1000) :=
    '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:adr="http://www.ordix.de/mitarbeiterAbteilung4.xsd"
    elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:complexType name="MitarbeiterType">
    <xs:sequence>
    <xs:element name="Ma_Nr"/>
    <xs:element name="Ma_Vorname"/>
    <xs:element name="Ma_Nachname"/>
    <xs:element name="Ma_Abteilung">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Abteilung_NR"/>
         <xs:element name="Abteilung_Name"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="Mitarbeiter" type="MitarbeiterType"/>
    </xs:schema>';
    BEGIN
    DBMS_XMLSCHEMA.registerSchema('http://www.ordix.de/mitarbeiterAbteilung4.xsd',xml_schema);
    END;

    I believe you want CopyEvolve

  • Trouble including registered XML Schema in generated XML

    Hello,
    I'm new to XMLDB, and find myself wanting to build an XML document that conforms
    to a paricular XML schema. I'm looking for help in "passing" the shema into the
    xml query, and for advice (i may not be going about things in the best way possible).
    my data comes from three different sources: deliveries, origin of deliveries (warehouse),
    and a user-defined parameter (number of vehicles). I am putting the xml data together via union statements.
    this is slightly undesireable due to the limitations on union (no xmltypes, no clobs)
    and the size limitation of the varchar datatype. If there is a better way of structuring
    the end XML document (all three sources, one output record) then please advise me.
    I am having issues "passing" the registered XML schema to the SYS_XMLGEN function,
    so if you see where I've made a mistake, please point it out.
    Last thing, Oracle version: 9.2.0.4.0 (aka 9iR2)
    --Register a new XML schema
    --Since this is a GLOBAL schema, register it as privileged user (SYS).
    DECLARE
           vrp varchar2(10000) :=
    '<xs:schema targetNamespace="http://example.com/vrp.xsd"
        xmlns:vrp="http://example.com/vrp.xsd"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        elementFormDefault="qualified">
        <xs:complexType name="VehicleRoute">
            <xs:sequence>
                <xs:element name="Stops" type="vrp:Stops" minOccurs="1" maxOccurs="1" />
                <xs:element name="Vehicles" type="xs:string" minOccurs="1" maxOccurs="1" />
                <xs:element name="Warehouse" type="vrp:Warehouse" minOccurs="1" maxOccurs="1" />
            </xs:sequence>
        </xs:complexType>
        <xs:complexType name="Stops">
            <xs:sequence>
                <xs:element name="Stop" type="vrp:Stop" minOccurs="1" maxOccurs="unbounded" />
            </xs:sequence>
        </xs:complexType>
        <xs:complexType name="Stop">
            <xs:sequence>
                <xs:element name="Documents" type="vrp:Documents" minOccurs="1" maxOccurs="1" />
                <xs:element name="Stop_Address" type="xs:string" minOccurs="1" maxOccurs="1" />
                <xs:element name="Stop_Minutes" type="xs:double" minOccurs="1" maxOccurs="1" />
            </xs:sequence>
        </xs:complexType>
        <xs:complexType name="Documents">
            <xs:sequence>
                <xs:element name="Document" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
            </xs:sequence>
        </xs:complexType>
        <xs:complexType name="Warehouse">
            <xs:sequence>
                <xs:element name="Warehouse_Address" type="xs:string" minOccurs="1" maxOccurs="1" />
            </xs:sequence>
        </xs:complexType>
        <xs:element name="Vehicle_Route" type="vrp:VehicleRoute" />
    </xs:schema>';  
    begin
      --"CUSTOM" is the name of my database user - the SCHEMA in which this development should occur.
         dbms_xmlschema.registerschema('http://example.com/vrp.xsd', vrp, false, false, false, false, false, 'CUSTOM');
    END;Here is the XML schema (as viewed by the 'CUSTOM' user):
    <xs:schema targetNamespace="http://example.com/vrp.xsd" xmlns:vrp="http://example.com/vrp.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:flags="17" oraxdb:schemaURL="http://example.com/vrp.xsd" oraxdb:schemaOwner="CUSTOM" oraxdb:numProps="10">
      <xs:complexType name="VehicleRoute" oraxdb:SQLType="CLOB">
        <xs:sequence>
          <xs:element name="Stops" type="vrp:Stops" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2225" oraxdb:global="false" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false"/>
          <xs:element name="Vehicles" type="xs:string" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2226" oraxdb:global="false" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
          <xs:element name="Warehouse" type="vrp:Warehouse" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2227" oraxdb:global="false" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="Stops" oraxdb:SQLType="CLOB">
        <xs:sequence>
          <xs:element name="Stop" type="vrp:Stop" minOccurs="1" maxOccurs="unbounded" oraxdb:propNumber="2228" oraxdb:global="false" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="Stop" oraxdb:SQLType="CLOB">
        <xs:sequence>
          <xs:element name="Documents" type="vrp:Documents" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2229" oraxdb:global="false" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false"/>
          <xs:element name="Stop_Address" type="xs:string" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2230" oraxdb:global="false" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
          <xs:element name="Stop_Minutes" type="xs:double" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2231" oraxdb:global="false" oraxdb:memType="2" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="Documents" oraxdb:SQLType="CLOB">
        <xs:sequence>
          <xs:element name="Document" type="xs:string" minOccurs="1" maxOccurs="unbounded" oraxdb:propNumber="2232" oraxdb:global="false" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="Warehouse" oraxdb:SQLType="CLOB">
        <xs:sequence>
          <xs:element name="Warehouse_Address" type="xs:string" minOccurs="1" maxOccurs="1" oraxdb:propNumber="2233" oraxdb:global="false" oraxdb:memType="1" oraxdb:SQLInline="true" oraxdb:MemInline="true" oraxdb:JavaInline="true"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="Vehicle_Route" type="vrp:VehicleRoute" oraxdb:propNumber="2224" oraxdb:global="true" oraxdb:SQLType="CLOB" oraxdb:SQLName="Vehicle_Route" oraxdb:memType="258"/>
    </xs:schema>Here is sample data for reproducing what I'm seeing:
    --Create the "document" table
    create table vrp_document
    (document_num varchar2(10),
    document_minutes number(10),
    document_address varchar2(30));
    --Sample "document" data
    insert into vrp_document (document_num, document_minutes, document_address)
    values ('TEST1', 30, '1234 ELM ST');
    insert into vrp_document (document_num, document_minutes, document_address)
    values ('TEST2', 20, '1234 ELM ST');
    insert into vrp_document (document_num, document_minutes, document_address)
    values ('TEST3', 40, '1234 MAPLE ST');
    insert into vrp_document (document_num, document_minutes, document_address)
    values ('TEST3', 15, '1234 YEW ST');
    --Create the "warehouse" table
    create table vrp_warehouse
    (warehouse_id varchar2(3),
    warehouse_address varchar2(30));
    --Sample "warehouse" data
    insert into vrp_warehouse (warehouse_id, warehouse_address)
    values ('100', '900 MY OWN WAY');Query to produce XML
    Please note, I realize that for the data provided, the aggregations (and sub queries)
    are a little over the top. They are however necessary for my actual data set.
    SELECT SYS_XMLGEN(xmlagg(XMLTYPE(xmlroute)),  xmlformat.createFormat('Vehicle_Route')).getStringVal() Delivery_XML_Data
    FROM (SELECT XMLELEMENT("Stops",
              XMLAGG(XMLELEMENT("Stop",    
              XMLCONCAT(
                XMLELEMENT("Documents",
                    xmlagg(xmlelement("Document", t.document))),
                  xmlforest(t.document_address "Stop_Address",  
                 SUM(t.document_minutes) "Stop_Minutes"))))).getStringVal() AS xmlroute
    from     (select   s.document_num document, 
                       s.document_address,
                       sum(s.document_minutes) document_minutes
              from     vrp_document s       
              group by s.document_num, s.document_address) t
    GROUP BY t.document_address
    UNION
    SELECT   XMLELEMENT("Warehouse",
             xmlforest(
              w.warehouse_address "Warehouse_Address")).getstringval()
    from     vrp_warehouse w
    WHERE    w.warehouse_id = '100'
    union
    select   xmlelement("Vehicles", '&Number_Of_Vehicles').getstringval()
    FROM     dual) g;This query produces the following (Note. Answer "1" or any other integer for &Number_Of_Vehicles):
    The only other thing I want is to mention the above schema (that is, xmlns:http://example.com/vrp) or however that goes.
    I realize I can "fudge" this by assigning the attribute for various elements, but I think the "right" way would be to modify that call to createFormat().
    <?xml version="1.0"?>
    <Vehicle_Route>
    <Stops>
      <Stop>
        <Documents>
          <Document>TEST1</Document>
          <Document>TEST2</Document>
        </Documents>
        <Stop_Address>1234 ELM ST</Stop_Address>
        <Stop_Minutes>50</Stop_Minutes>
      </Stop>
      <Stop>
        <Documents>
          <Document>TEST3</Document>
        </Documents>
        <Stop_Address>1234 MAPLE ST</Stop_Address>
        <Stop_Minutes>40</Stop_Minutes>
      </Stop>
      <Stop>
        <Documents>
          <Document>TEST3</Document>
        </Documents>
        <Stop_Address>1234 YEW ST</Stop_Address>
        <Stop_Minutes>15</Stop_Minutes>
      </Stop>
    </Stops>
    <Vehicles>1</Vehicles>
    <Warehouse>
      <Warehouse_Address>900 MY OWN WAY</Warehouse_Address>
    </Warehouse>
    </Vehicle_Route>I have tried various permutation of the following with no success:
    Currently, the error is something serious:
    ORA-00600: internal error code, arguments: [kkdotat1], [], [], [], [], [], [], []
    00600. 00000 - "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"
    *Cause:    This is the generic internal error number for Oracle program
    exceptions.     This indicates that a process has encountered an
    exceptional condition.
    *Action:   Report as a bug - the first argument is the internal error number
    SELECT SYS_XMLGEN(xmlagg(XMLTYPE(xmlroute)),  xmlformat.createFormat('Vehicle_Route', 'USE_GIVEN_SCHEMA', 'http://example.com/vrp.xsd', 'http://example.com/vrp.xsd')).getStringVal() Delivery_XML_Data
    . . .Edited by: user2316919 on Jan 21, 2010 3:46 PM

    Cannot find a cleanest solution:
    SQL>  select xmltype('<?xml version="1.0"?>'||
      2                  xmlelement("Vehicle_Route",
      3                     xmlattributes('http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi",
      4                                   'http://example.com/vrp.xsd' AS "xsi:schemaLocation"
      5                                   ),
      6                     xmlagg(xmltype(xmlroute))
      7                     ).extract('/*')
      8                  ) Delivery_XML_Data
      9   FROM (SELECT XMLELEMENT("Stops",
    10             XMLAGG(XMLELEMENT("Stop",    
    11             XMLCONCAT(
    12               XMLELEMENT("Documents",
    13                   xmlagg(xmlelement("Document", t.document))),
    14             xmlforest(t.document_address "Stop_Address",  
    15                SUM(t.document_minutes) "Stop_Minutes"))))).getStringVal() AS xmlroute
    16   from     (select   s.document_num document, 
    17                      s.document_address,
    18                      sum(s.document_minutes) document_minutes
    19             from     vrp_document s       
    20             group by s.document_num, s.document_address) t
    21   GROUP BY t.document_address
    22   UNION
    23   SELECT   XMLELEMENT("Warehouse",
    24             xmlforest(
    25              w.warehouse_address "Warehouse_Address")).getstringval()
    26    from     vrp_warehouse w
    27    WHERE    w.warehouse_id = '100'
    28    union
    29    select   xmlelement("Vehicles", '&Number_Of_Vehicles').getstringval()
    30    FROM     dual) g;
    Immettere un valore per number_of_vehicles: 1
    vecchio  29:   select   xmlelement("Vehicles", '&Number_Of_Vehicles').getstringval()
    nuovo  29:   select   xmlelement("Vehicles", '1').getstringval()
    DELIVERY_XML_DATA
    <?xml version="1.0"?><Vehicle_Route xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schema
    http://example.com/vrp.xsd">
      <Stops>
        <Stop>
          <Documents>
            <Document>TEST1</Document>
            <Document>TEST2</Document>
          </Documents>
          <Stop_Address>1234 ELM ST</Stop_Address>
          <Stop_Minutes>50</Stop_Minutes>
        </Stop>
        <Stop>
          <Documents>
            <Document>TEST3</Document>
          </Documents>
          <Stop_Address>1234 MAPLE ST</Stop_Address>
          <Stop_Minutes>40</Stop_Minutes>
        </Stop>
        <Stop>
          <Documents>
            <Document>TEST3</Document>
          </Documents>
          <Stop_Address>1234 YEW ST</Stop_Address>
          <Stop_Minutes>15</Stop_Minutes>
        </Stop>
      </Stops>
      <Vehicles>1</Vehicles>
      <Warehouse>
        <Warehouse_Address>900 MY OWN WAY</Warehouse_Address>
      </Warehouse>
    </Vehicle_Route>
    {code}
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/17/supporto-di-xml-schema-in-oracle-xmldb/]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Register xml schema in Oracle 9i error

    I got following ORA error when register xml schema in Oracle 9i.
    ORA-30931: Element 'seq' cannot contain mixed text
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
    ORA-06512: at line 754
    There is no mixed in the XSD. There is someone mentioned oracle 9i has bug and need to change the xsd file. any ideas how to work around this?
    Edited by: user7435395 on Dec 2, 2011 1:22 PM

    You are out of luck. Oracle 9i is not a supported version.

  • ORA-00600 error when registering XML Schema

    Dear Mark!
    1. Database version: 9.2.0.3.0
    2. Operating system: Windows XP Prof
    3. XML Schema: (it's too big to be posted_
    4. Instance document: no
    5. SQL statement used to register the schema
    DBMS_XMLSCHEMA.registerSchema(schemaURL =&gt; aSchemaURL, schemaDoc =&gt; fBFile_Loc);
    6. SQL statement that exposes the problem: above
    Attempt to register XML Schema caused the following error:
    ORA-00600: internal error code, arguments: [qmtsGetAttrElemName1], [], [], [], [], [], [], []
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 131
    ORA-06512: at "DVLP.PRIME_BRIDGE", line 91
    ORA-06512: at line 6
    What does it mean?
    Thank you in advance
    Artem Rodin

    If you cannot post the schema please open a itar with oralce support so that the schema can be uploaded.

  • Cannot see registered XML schema in user_objects

    Hi,
    I noticed that XML schema that I register do not appear in the user_objects view. But they appear in the all_objects view.
    Joining all_objects with all_xml_schemas each XML schema appears to have two owners, the owner XDB and the account used to register the schema.
    select schema_url,X.owner xml_owner,O.owner object_owner
    from all_xml_schemas X, all_objects O
    where int_objname = object_name
    SCHEMA_URL                                                   XML_OWNER       OBJECT_OWNER
    ts-csg.com/group_alertAscii.xsd                              OPS$PHITCHMAN   XDB
    ts-csg.com/group_applicationId.xsd                           OPS$PHITCHMAN   XDB
    ts-csg.com/group_paraAsciiSimple.xsd                         OPS$PHITCHMAN   XDB
    ts-csg.com/group_paragraphAscii.xsd                          OPS$PHITCHMAN   XDB
    ts-csg.com/group_paraAscii.xsd                               OPS$PHITCHMAN   XDB
    ts-csg.com/group_coreAscii.xsd                               OPS$PHITCHMAN   XDB
    ts-csg.com/group_psList.xsd                                  OPS$PHITCHMAN   XDBIs this right?
    Thanks
    Pete

    USER_XML_SCHEMAS is the view you need to query.
    USER_XML_SCHEMAS describes the registered XML schemas owned by the current user. Its columns (except for OWNER) are the same as those in ALL_XML_SCHEMAS.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_4491.htm#REFRN26307

  • When I register XML schema, if I set the GENTYPES=FALES.

    hi all,
    when I regist XML schema, if I set the GENTYPES=FALES. I also set xdb:storeVarrayAsTable="fales"
    do I still need to put annotation xdb:SQLType = "XXXXXX" in the .xsd file?
    when do I should set GENTYPES=FALES, when should set GENTYPES=FALES = TRUE.
    Thanks.
    Cow.

    I think you hit the wrong forum: it's about Berkeley DB XML, not Oracle DB
    Vyacheslav

  • SQL Server 2012 Management Studio:In the Database, how to print out or export the old 3 dbo Tables that were created manually and they have a relationship for 1 Parent table and 2 Child tables?How to handle this relationship in creating a new XML Schema?

    Hi all,
    Long time ago, I manually created a Database (APGriMMRP) and 3 Tables (dbo.Table_1_XYcoordinates, dbo.Table_2_Soil, and dbo.Table_3_Water) in my SQL Server 2012 Management Studio (SSMS2012). The dbo.Table_1_XYcoordinates has the following columns: file_id,
    Pt_ID, X, Y, Z, sample_id, Boring. The dbo.Table_2_Soil has the following columns: Boring, sample_date, sample_id, Unit, Arsenic, Chromium, Lead. The dbo.Table_3_Water has the following columns: Boring, sample_date, sample_id, Unit, Benzene, Ethylbenzene,
    Pyrene. The dbo.Table_1_XYcoordinates is a Parent Table. The dbo.Table_2_Soil and the dbo.Table_3_Water are 2 Child Tables. The sample_id is key link for the relationship between the Parent Table and the Child Tables.
    Problem #1) How can I print out or export these 3 dbo Tables?
    Problem #2) If I right-click on the dbo Table, I see "Start PowerShell" and click on it. I get the following error messages: Warning: Failed to load the 'SQLAS' extension: An exception occurred in SMO while trying to manage a service. 
    --> Failed to retrieve data for this request. --> Invalid class.  Warning: Could not obtain SQL Server Service information. An attemp to connect to WMI on 'NAB-WK-02657306' failed with the following error: An exception occurred in SMO while trying
    to manage a service. --> Failed to retrieve data for this request. --> Invalid class.  .... PS SQLSERVER:\SQL\NAB-WK-02657306\SQLEXPRESS\Databases\APGriMMRP\Table_1_XYcoordinates>   What causes this set of error messages? How can
    I get this problem fixed in my PC that is an end user of the Windows 7 LAN System? Note: I don't have the regular version of Microsoft Visual Studio 2012 in my PC. I just have the Microsoft 2012 Shell (Integrated) program in my PC.
    Problem #3: I plan to create an XML Schema Collection in the "APGriMMRP" database for the Parent Table and the Child Tables. How can I handle the relationship between the Parent Table and the Child Table in the XML Schema Collection?
    Problem #4: I plan to extract some results/data from the Parent Table and the Child Table by using XQuery. What kind of JOIN (Left or Right JOIN) should I use in the XQuerying?
    Please kindly help, answer my questions, and advise me how to resolve these 4 problems.
    Thanks in advance,
    Scott Chang    

    In the future, I would recommend you to post your questions one by one, and to the appropriate forum. Of your questions it is really only #3 that fits into this forum. (And that is the one I will not answer, because I have worked very little with XSD.)
    1) Not sure what you mean with "print" or "export", but when you right-click a database, you can select Tasks from the context menu and in this submenu you find "Export data".
    2) I don't know why you get that error, but any particular reason you want to run PowerShell?
    4) If you have tables, you query them with SQL, not XQuery. XQuery is when you query XML documents, but left and right joins are SQL things. There are no joins in XQuery.
    As for left/right join, notice that these two are equivalent:
    SELECT ...
    FROM   a LEFT JOIN b ON a.col = b.col
    SELECT ...
    FROM   b RIGHT JOIN a ON a.col = b.col
    But please never use RIGHT JOIN - it gives me a headache!
    There is nothing that says that you should use any of the other. In fact, if you are returning rows from parent and child, I would expect an inner join, unless you want to cater for parents without children.
    Here is an example where you can study the different join types and how they behave:
    CREATE TABLE apple (a int         NOT NULL PRIMARY KEY,
                        b varchar(23) NOT NULL)
    INSERT apple(a, b)
       VALUES(1, 'Granny Smith'),
             (2, 'Gloster'),
             (4, 'Ingrid-Marie'),
             (5, 'Milenga')
    CREATE TABLE orange(c int        NOT NULL PRIMARY KEY,
                        d varchar(23) NOT NULL)
    INSERT orange(c, d)
       VALUES(1, 'Agent'),
             (3, 'Netherlands'),
             (4, 'Revolution')
    SELECT a, b, c, d
    FROM   apple
    CROSS  JOIN orange
    SELECT a, b, c, d
    FROM   apple
    INNER  JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    LEFT   OUTER JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    RIGHT  OUTER JOIN orange ON apple.a = orange.c
    SELECT a, b, c, d
    FROM   apple
    FULL OUTER JOIN orange ON apple.a = orange.c
    go
    DROP TABLE apple, orange
    Erland Sommarskog, SQL Server MVP, [email protected]

  • "a"+"b"+"c", how many String objects created?

    Hello everyone,
    String s = "a" + "b" +"c";
    How many String objects are created?
    I guess 5, is it right?
    regards

    > How many String objects are created?
    >
    I guess 5, is it right?
    Nope. Just one.

  • Can't create defaultTable when registering XML Schema

    Hi,
    when registering an XML Schema with a xdb:defaultTable Attribute the default table is not created. The user owns role XDBADMIN!
    What goes wrong with my example??
    <code>
    <?xml version='1.0'?>
    <xsd:schema xmlns:xdb="http://xmlns.oracle.com/xdb"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="Invoice" xdb:defaultTable="INVOICE_SIMPLE">
    <xsd:complexType >
    <xsd:sequence>
    <xsd:element name="CustomerRef" type="xsd:integer" />
    <xsd:element name="Supplier" type="xsd:string" />
    <xsd:element name="TotalAmount" type="xsd:decimal" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    begin
    dbms_xmlschema.registerSchema('invoice_simple.xsd', getDocument('invoice_simple.xsd'),
    FALSE, TRUE, FALSE, FALSE);
    end;
    </code>
    Any hint is wellcome!
    Thanx.

    this works fine for me:
    declare
    doc varchar2(2000) := '<xsd:schema xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="_new"
    xmlns="_new">
    <xsd:element name="Invoice" xdb:defaultTable="INVOICE_SIMPLE">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element name="CustomerRef" type="xsd:integer"/>
                        <xsd:element name="Supplier" type="xsd:string"/>
                        <xsd:element name="TotalAmount" type="xsd:decimal"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
    </xsd:schema>';
    begin
    dbms_xmlschema.registerSchema('invoice_simple.xsd', doc);
    end;

Maybe you are looking for

  • Dialog instance on PI7.0

    Hello Gurus,     I need some information about settingup dialog instance for our PI7.0. What is the installation procedure and what needs to be configured on ABAP and JAVA stacks? Also, if we need to setup different clients on PI, how can I do the cl

  • Set item property

    Dear All Any one tell me. Can i use SET_ITEM_PROPERTY('ALLAWANCES.TXT_TEST', VISIBLE, PROPERTY_TRUE); in when list change trigger thanks in advance Regards,

  • Problem with ServletOutputStream

    Hi! I am a fresh developer getting trained on J2EE. When i use response.getWriter() to ger the writer object, it's working fine. I tried to get the ServletOutputStream object and create a writer object by passing it to the PrintWriter. The problem is

  • How do I connect i phone 5 bluetooth to my kindle fire hd

    Can someone help with this. Cheers

  • Database toolkit Included in LabView 12?

    I thought i read somewhere but cannot confirm Does Labview 12 come with the database toolkit?  thanks in advance -Kurt Solved! Go to Solution.