ORA-31094 & ORA-31082 when registering Schemas generated w/generateSchema()

I have genereated several Schemas using DBMS_XMLSCHEMA.generateSchema(). However, trying to register these Schemas results in error messages. The error messages state that "REF" and also my own Types were incompatible SQL-Types for an Attribute or Element (ORA-31094). Also, they state that "SQLSchema" was an invalid Attribute (ORA-31082).
As an example, I have included one of the Schemas that has been generated, the procedure used to register it and and also the type OTYP_Artikel it has been generated from. I would like to know why the Schemas generated by Oracle contain these errors and how to fix this.
declare
doc varchar2(2000) := '<xsd:schema targetNamespace="http://ns.oracle.com/xdb/OO_CHEF" xmlns="http://ns.oracle.com/xdb/OO_CHEF" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/xdb http://xmlns.oracle.com/xdb/XDBSchema.xsd">
<xsd:element name="OTYP_ARTIKEL" type="OTYP_ARTIKELType" xdb:SQLType="OTYP_ARTIKEL" xdb:SQLSchema="OO_CHEF"/>
<xsd:complexType name="OTYP_ARTIKELType">
<xsd:sequence>
<xsd:element name="ARTIKEL_NR" type="xsd:string" xdb:SQLName="ARTIKEL_NR" xdb:SQLType="VARCHAR2"/>
<xsd:element name="MWST" type="xsd:hexBinary" xdb:SQLName="MWST" xdb:SQLType="REF"/>
<xsd:element name="BEZEICHNUNG" type="xsd:string" xdb:SQLName="BEZEICHNUNG" xdb:SQLType="VARCHAR2"/>
<xsd:element name="LISTENPREIS" type="xsd:double" xdb:SQLName="LISTENPREIS" xdb:SQLType="NUMBER"/>
<xsd:element name="BESTAND" type="xsd:double" xdb:SQLName="BESTAND" xdb:SQLType="NUMBER"/>
<xsd:element name="MINDESTBESTAND" type="xsd:double" xdb:SQLName="MINDESTBESTAND" xdb:SQLType="NUMBER"/>
<xsd:element name="VERPACKUNG" type="xsd:string" xdb:SQLName="VERPACKUNG" xdb:SQLType="VARCHAR2"/>
<xsd:element name="LAGERPLATZ" type="xsd:double" xdb:SQLName="LAGERPLATZ" xdb:SQLType="NUMBER"/>
<xsd:element name="KANN_WEGFALLEN" type="xsd:double" xdb:SQLName="KANN_WEGFALLEN" xdb:SQLType="NUMBER"/>
<xsd:element name="BESTELLVORSCHLAG" type="xsd:date" xdb:SQLName="BESTELLVORSCHLAG" xdb:SQLType="DATE"/>
<xsd:element name="NACHBESTELLUNG" type="xsd:date" xdb:SQLName="NACHBESTELLUNG" xdb:SQLType="DATE"/>
<xsd:element name="NACHBESTELLMENGE" type="xsd:double" xdb:SQLName="NACHBESTELLMENGE" xdb:SQLType="NUMBER"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>';
begin
dbms_xmlschema.registerSchema('http://www.oracle.com/best.xsd', doc);
end;
DROP TABLE otab_artikel
DROP TABLE otab_mwstsatz
DROP TYPE otyp_artikel
DROP TYPE otyp_mwstsatz
CREATE OR REPLACE TYPE otyp_mwstsatz AS OBJECT (
mwst integer,
prozent number (3,3),
beschreibung varchar2(10),
MAP MEMBER FUNCTION mwst_order RETURN REAL,
PRAGMA RESTRICT_REFERENCES
(mwst_order, RNDS, WNDS, RNPS, WNPS),
STATIC FUNCTION construct_mwst (in_mwst IN INTEGER,
in_prozent IN NUMBER, in_beschreib IN VARCHAR2)
RETURN otyp_mwstsatz
show errors
CREATE OR REPLACE TYPE BODY otyp_mwstsatz AS
MAP MEMBER FUNCTION mwst_order RETURN REAL IS
BEGIN
RETURN prozent;
END mwst_order;
STATIC FUNCTION construct_mwst (in_mwst IN INTEGER,
in_prozent IN NUMBER,
in_beschreib IN VARCHAR2)
RETURN otyp_mwstsatz IS
BEGIN
IF in_mwst < 0 THEN
DBMS_OUTPUT.PUT_LINE ('Mwst-Schluessel muss >=0 sein');
raise_application_error(-1,'Wertfehler bei mwst',FALSE);
ELSE
RETURN otyp_mwstsatz(in_mwst,in_prozent,in_beschreib);
END IF;
END construct_mwst;
END;
show errors
CREATE TABLE otab_mwstsatz OF otyp_mwstsatz
mwst NOT NULL,
prozent NOT NULL,
CONSTRAINT pk_mwstsatz PRIMARY KEY (mwst)
CREATE OR REPLACE TYPE otyp_artikel AS OBJECT (
artikel_nr varchar2(4),
mwst REF otyp_mwstsatz,
bezeichnung varchar2(15),
listenpreis number(8,2),
bestand number(5,0),
mindestbestand number (5,0),
verpackung varchar2(15),
lagerplatz number(2,0),
kann_wegfallen number(1,0),
bestellvorschlag date,
nachbestellung date,
nachbestellmenge number(5,0),
MEMBER FUNCTION get_mwst RETURN REAL,
PRAGMA RESTRICT_REFERENCES (get_mwst, WNDS, WNPS)
show errors
CREATE OR REPLACE TYPE BODY otyp_artikel AS
MEMBER FUNCTION get_mwst RETURN REAL IS
lvar_prozent NUMBER(3,3);
lvar_mwst otyp_mwstsatz;
BEGIN
SELECT DEREF(mwst) INTO lvar_mwst
FROM dual;
lvar_prozent := lvar_mwst.prozent;
RETURN lvar_prozent;
END get_mwst;
END;
show errors
CREATE TABLE otab_artikel OF otyp_artikel (
CONSTRAINT pk_artikel PRIMARY KEY (artikel_nr),
CONSTRAINT nn_mwst mwst NOT NULL,
CONSTRAINT nn_bezeichnung bezeichnung NOT NULL,
CONSTRAINT nn_listenpreis listenpreis NOT NULL,
CONSTRAINT nn_bestand bestand NOT NULL,
CONSTRAINT chk_bestand CHECK (bestand >= 0),
CONSTRAINT nn_mindestbestand mindestbestand NOT NULL,
CONSTRAINT chk_mindestbestand CHECK (mindestbestand >= 0),
CONSTRAINT chk_nachbestell
CHECK (nachbestellmenge IS NULL OR nachbestellmenge >= 0)
);

Please post your question to XML DB forum for further help.

Similar Messages

  • ORA-31000 when register schema in oracle 10g

    I am trying to register a schema in oracle10g rel2. The schema contain "<xs:include schemaLocation="papiNetCommonDefsV2R31.xsd"/>" and papiNetCommonDefsV2R31.xsd is successfully registered in Oracle repository. But i am still getting the error as
    1 begin
    2 dbms_xmlschema.registerSchema
    3 ('http://localhost:8080/home/xdb/xsd/PurchaseOrderV2R31.xsd',
    4 xdburitype('/home/xdb/xsd/PurchaseOrderV2R31.xsd').getCLOB(),
    5 FALSE,
    6 TRUE,
    7 FALSE,
    8 TRUE
    9 );
    10* end;
    SQL> /
    begin
    ERROR at line 1:
    ORA-31000: Resource 'papiNetCommonDefsV2R31.xsd' is not an XDB schema document
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 20
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 31
    ORA-06512: at line 2.
    I can view 'papiNetCommonDefsV2R31.xsd' when i run the query - select schema_url from user_xml_schemas

    Hi Glyn,
    Can you create a script that recreates the problem?
    I have a similiar problem, but can not recreate the exact operations sequance that cause the ORA-07445.
    Avi.

  • Register Schema: ORA-20001: enable_hierarchy_internal

    Hi,
    I'm trying to register an XML Schema and get the following errors:
    16:45:28 SQL> BEGIN
    16:45:28 2      DBMS_XMLSCHEMA.registerSchema(
    16:45:28 3      SCHEMAURL     => 'http://www.sample.net/phoenix/xsd/data_exchange.xsd',
    16:45:28 4      SCHEMADOC     => XDBURIType('/phoenix/DataSupplier20080528-2.xsd').getCLOB(),
    16:45:28 5      GENTABLES     => TRUE
    16:45:28 6      );
    16:45:28 7      COMMIT;
    16:45:28 8 END;
    16:45:28 9 /
    BEGIN
    ERROR at line 1:
    ORA-20001: enable_hierarchy_internal
    ORA-06512: at "XDB.DBMS_XDBZ", line 28
    ORA-06512: at line 1
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 20
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 31
    ORA-06512: at line 2
    18:13:31 SQL>
    Database Version: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 (Linux)
    In my previous attempts I've seen that the types and tables will be created and removed after the error occurred...
    Does anybody know what the problem is?
    TIA
    Andreas

    Hi Mr.Mdrake,
    I am working on XML Type Views, and I did created an XML Type view and it did worked well. Later on there is a change of envirnoment for the development team. So, I tried to deploy my XML Type View scripts in the new environment. While registering the Schema(locally) to the repository I encountered the fallowing error
    Error report:
    ORA-20001: enable_hierarchy_internal
    ORA-06512: at "XDB.DBMS_XDBZ", line 28
    ORA-06512: at line 1
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 3
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 14
    ORA-06512: at line 2
    I have gone through your threads realted to this kind of error and verified wethere I have previleges or not ? Well, there seems to be no problem regarding that(looks like I have all the previlages).
    And one more question I would like to ask is do I have to register the schema globally or locally? The script that worked for me in the previous environment I did register the schema globally using the default.
    Here, even if I try to register the schema locally or globally I am facing the error. The error i am getting while i resiter the schema globally is
    Error report:
    ORA-31086: insufficient privileges to register schema "http://www.oracle.com/MBR_TYPE.xsd"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 3
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 14
    ORA-06512: at line 2
    31086. 00000 - "insufficient privileges to register schema \"%s\""
    *Cause:    An attempt was made to register a schema without
    sufficient privileges.
    *Action:   Make sure that the user has sufficient privileges to register
    the schema.
    The suggestion that you have
    "1. Registering a Schema as SYS.
    This is not supported, please don't do it." is that mean schema should be registered globally??
    Pardon my ignorance if I say anything which is meaning less.
    Thanks in advance

  • "ORA-00902: invalid datatype" when trying to register local schema

    I'm trying to register a local schema which uses/includes a global schema(s). I validated the schemas using XMLSpy.
    Registering the global schema(s) was successful. Registering these global schemas was done under user "Generic". For local schemas, that use global schema, a new user is created, and the following script is executed.
    SQL> --
    SQL> -- Create user
    SQL> --
    SQL> create user &1 identified by &2
    2 temporary TABLESPACE temp
    3 default TABLESPACE users;
    old 1: create user &1 identified by &2
    new 1: create user Simple identified by Simple
    User created.
    Elapsed: 00:00:00.03
    SQL> --
    SQL> -- Grant privileges
    SQL> --
    SQL> grant create session to &1;
    old 1: grant create session to &1
    new 1: grant create session to Simple
    Grant succeeded.
    Elapsed: 00:00:00.01
    SQL> grant resource to &1;
    old 1: grant resource to &1
    new 1: grant resource to Simple
    Grant succeeded.
    Elapsed: 00:00:00.01
    SQL> -- Dunno if following is required for local schemas, but if I remove I can't FTP
    SQL> grant dba, xdbadmin to &1;
    old 1: grant dba, xdbadmin to &1
    new 1: grant dba, xdbadmin to Simple
    Grant succeeded.
    Elapsed: 00:00:00.02
    SQL>
    SQL> --
    SQL> -- Connect ;-)
    SQL> --
    SQL> connect &1/&2@SVF91;
    Connected.
    ===========================================================
    SQL> --
    SQL> -- Register the schema in Oracle
    SQL> --
    SQL> BEGIN
    2 DBMS_XMLSchema.registerSchema(
    3      schemaURL => '&1',
    4      schemaDoc => xdbURIType('&2').getClob(),
    5      local     => TRUE,
    6      genTypes => TRUE,
    7      genBean => FALSE,
    8      genTables => TRUE);
    9 END;
    10 /
    old 3: schemaURL     => '&1',
    new 3: schemaURL     => 'http://http://ehvl091a:8080/home/Simple/xsd/SimplePOI.xsd',
    old 4: schemaDoc     => xdbURIType('&2').getClob(),
    new 4: schemaDoc     => xdbURIType('/home/Simple/xsd/SimplePOI.xsd').getClob(),
    BEGIN
    ERROR at line 1:
    ORA-31084: error while creating table "SIMPLE"."SIMPLE_XPOI" for element
    "XPOIS"
    ORA-00902: invalid datatype
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 20
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 31
    ORA-06512: at line 2
    The schema I use is:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:POI="POI" xmlns:xdb="http://xmlns.oracle.com/xdb" targetNamespace="POI" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="true">
         <xs:include schemaLocation="http://ehvl091a:8080/home/Generic/xsd/POI.xsd"/>
         <xs:element name="XPOIS" xdb:defaultTable="SIMPLE_XPOI">
              <xs:annotation>
                   <xs:documentation>A collection of XPOI</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Simple" minOccurs="3" maxOccurs="unbounded" xdb:columnProps="NOT SUBSTITUTABLE">
                             <xs:complexType>
                                  <xs:complexContent>
                                       <xs:extension base="POI:POIType"/>
                                  </xs:complexContent>
                             </xs:complexType>
                        </xs:element>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    I'm new at this XML (Oracle) stuff, so i could really use some pointers on how to tackle this. Thanks in advance.

    The following example works for me...
    SQL> connect / as sysdba
    Connected.
    SQL> --
    SQL> drop user global cascade
      2  /
    User dropped.
    SQL> drop user local cascade
      2  /
    User dropped.
    SQL> create user global identified by global
      2  /
    User created.
    SQL> grant connect, resource, alter session, create view, xdbadmin to global
      2  /
    Grant succeeded.
    SQL> create user local identified by local
      2  /
    User created.
    SQL> grant connect, resource, alter session, create view to local
      2  /
    Grant succeeded.
    SQL> connect global/global
    Connected.
    SQL> --
    SQL> var schemaURL varchar2(256)
    SQL> var schemaPath varchar2(256)
    SQL> --
    SQL> begin
      2    :schemaURL := 'poTypes.xsd';
      3    :schemaPath := '/public/poTypes.xsd';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<!-- edited with XML Spy v4.0 U (http://www.xmlspy.com) by Mark (Drake) -->
      5  <xs:schema xmlns="http://xmlns.oralce.com/demo/xdb/purchaseOrderTypes" targetNamespace="http://xmlns.oralce.com/demo/xdb/purchaseOrderT
    ypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" version="1.0" xdb:storeVarrayAsTable="true">
      6     <xs:complexType name="LineItemsType" xdb:SQLType="LINEITEMS_T">
      7             <xs:sequence>
      8                     <xs:element name="LineItem" type="LineItemType" maxOccurs="unbounded" xdb:SQLName="LINEITEM" xdb:SQLCollType="LINEIT
    EM_V"/>
      9             </xs:sequence>
    10     </xs:complexType>
    11     <xs:complexType name="LineItemType" xdb:SQLType="LINEITEM_T">
    12             <xs:sequence>
    13                     <xs:element name="Description" type="DescriptionType" xdb:SQLName="DESCRIPTION"/>
    14                     <xs:element name="Part" type="PartType" xdb:SQLName="PART"/>
    15             </xs:sequence>
    16             <xs:attribute name="ItemNumber" type="xs:integer" xdb:SQLName="ITEMNUMBER" xdb:SQLType="NUMBER"/>
    17     </xs:complexType>
    18     <xs:complexType name="PartType" xdb:SQLType="PART_T">
    19             <xs:attribute name="Id" xdb:SQLName="PART_NUMBER" xdb:SQLType="VARCHAR2">
    20                     <xs:simpleType>
    21                             <xs:restriction base="xs:string">
    22                                     <xs:minLength value="10"/>
    23                                     <xs:maxLength value="14"/>
    24                             </xs:restriction>
    25                     </xs:simpleType>
    26             </xs:attribute>
    27             <xs:attribute name="Quantity" type="moneyType" xdb:SQLName="QUANTITY"/>
    28             <xs:attribute name="UnitPrice" type="quantityType" xdb:SQLName="UNITPRICE"/>
    29     </xs:complexType>
    30     <xs:simpleType name="ReferenceType">
    31             <xs:restriction base="xs:string">
    32                     <xs:minLength value="18"/>
    33                     <xs:maxLength value="30"/>
    34             </xs:restriction>
    35     </xs:simpleType>
    36     <xs:complexType name="ActionsType" xdb:SQLType="ACTIONS_T">
    37             <xs:sequence>
    38                     <xs:element name="Action" maxOccurs="4" xdb:SQLName="ACTION" xdb:SQLCollType="ACTION_V">
    39                             <xs:complexType xdb:SQLType="ACTION_T">
    40                                     <xs:sequence>
    41                                             <xs:element name="User" type="UserType" xdb:SQLName="ACTIONED_BY"/>
    42                                             <xs:element name="Date" type="DateType" minOccurs="0" xdb:SQLName="DATE_ACTIONED"/>
    43                                     </xs:sequence>
    44                             </xs:complexType>
    45                     </xs:element>
    46             </xs:sequence>
    47     </xs:complexType>
    48     <xs:complexType name="RejectionType" xdb:SQLType="REJECTION_T">
    49             <xs:all>
    50                     <xs:element name="User" type="UserType" minOccurs="0" xdb:SQLName="REJECTED_BY"/>
    51                     <xs:element name="Date" type="DateType" minOccurs="0" xdb:SQLName="DATE_REJECTED"/>
    52                     <xs:element name="Comments" type="CommentsType" minOccurs="0" xdb:SQLName="REASON_REJECTED"/>
    53             </xs:all>
    54     </xs:complexType>
    55     <xs:complexType name="ShippingInstructionsType" xdb:SQLType="SHIPPING_INSTRUCTIONS_T">
    56             <xs:sequence>
    57                     <xs:element name="name" type="NameType" minOccurs="0" xdb:SQLName="SHIP_TO_NAME"/>
    58                     <xs:element name="address" type="AddressType" minOccurs="0" xdb:SQLName="SHIP_TO_ADDRESS"/>
    59                     <xs:element name="telephone" type="TelephoneType" minOccurs="0" xdb:SQLName="SHIP_TO_PHONE"/>
    60             </xs:sequence>
    61     </xs:complexType>
    62     <xs:simpleType name="moneyType">
    63             <xs:restriction base="xs:decimal">
    64                     <xs:fractionDigits value="2"/>
    65                     <xs:totalDigits value="12"/>
    66             </xs:restriction>
    67     </xs:simpleType>
    68     <xs:simpleType name="quantityType">
    69             <xs:restriction base="xs:decimal">
    70                     <xs:fractionDigits value="4"/>
    71                     <xs:totalDigits value="8"/>
    72             </xs:restriction>
    73     </xs:simpleType>
    74     <xs:simpleType name="UserType">
    75             <xs:restriction base="xs:string">
    76                     <xs:minLength value="1"/>
    77                     <xs:maxLength value="10"/>
    78             </xs:restriction>
    79     </xs:simpleType>
    80     <xs:simpleType name="RequestorType">
    81             <xs:restriction base="xs:string">
    82                     <xs:minLength value="0"/>
    83                     <xs:maxLength value="128"/>
    84             </xs:restriction>
    85     </xs:simpleType>
    86     <xs:simpleType name="CostCenterType">
    87             <xs:restriction base="xs:string">
    88                     <xs:minLength value="1"/>
    89                     <xs:maxLength value="4"/>
    90             </xs:restriction>
    91     </xs:simpleType>
    92     <xs:simpleType name="VendorType">
    93             <xs:restriction base="xs:string">
    94                     <xs:minLength value="0"/>
    95                     <xs:maxLength value="20"/>
    96             </xs:restriction>
    97     </xs:simpleType>
    98     <xs:simpleType name="PurchaseOrderNumberType">
    99             <xs:restriction base="xs:integer"/>
    100     </xs:simpleType>
    101     <xs:simpleType name="SpecialInstructionsType">
    102             <xs:restriction base="xs:string">
    103                     <xs:minLength value="0"/>
    104                     <xs:maxLength value="2048"/>
    105             </xs:restriction>
    106     </xs:simpleType>
    107     <xs:simpleType name="NameType">
    108             <xs:restriction base="xs:string">
    109                     <xs:minLength value="1"/>
    110                     <xs:maxLength value="20"/>
    111             </xs:restriction>
    112     </xs:simpleType>
    113     <xs:simpleType name="AddressType">
    114             <xs:restriction base="xs:string">
    115                     <xs:minLength value="1"/>
    116                     <xs:maxLength value="256"/>
    117             </xs:restriction>
    118     </xs:simpleType>
    119     <xs:simpleType name="TelephoneType">
    120             <xs:restriction base="xs:string">
    121                     <xs:minLength value="1"/>
    122                     <xs:maxLength value="24"/>
    123             </xs:restriction>
    124     </xs:simpleType>
    125     <xs:simpleType name="DateType">
    126             <xs:restriction base="xs:date"/>
    127     </xs:simpleType>
    128     <xs:simpleType name="CommentsType">
    129             <xs:restriction base="xs:string">
    130                     <xs:minLength value="1"/>
    131                     <xs:maxLength value="2048"/>
    132             </xs:restriction>
    133     </xs:simpleType>
    134     <xs:simpleType name="DescriptionType">
    135             <xs:restriction base="xs:string">
    136                     <xs:minLength value="1"/>
    137                     <xs:maxLength value="256"/>
    138             </xs:restriction>
    139     </xs:simpleType>
    140  </xs:schema>');
    141  begin
    142    if (dbms_xdb.existsResource(:schemaPath)) then
    143      dbms_xdb.deleteResource(:schemaPath);
    144    end if;
    145    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    146  end;
    147  /
    PL/SQL procedure successfully completed.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      :schemaURL,
      5      xdbURIType(:schemaPath).getClob(),
      6      FALSE,TRUE,FALSE,FALSE
      7    );
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> connect local/local
    Connected.
    SQL> --
    SQL> var schemaURL varchar2(256)
    SQL> var schemaPath varchar2(256)
    SQL> --
    SQL> begin
      2    :schemaURL := 'po.xsd';
      3    :schemaPath := '/public/po.xsd';
      4  end;
      5  /
    PL/SQL procedure successfully completed.
    SQL> declare
      2    res boolean;
      3    xmlSchema xmlType := xmlType(
      4  '<xs:schema xmlns="http://xmlns.oralce.com/demo/xdb/purchaseOrder" targetNamespace="http://xmlns.oralce.com/demo/xdb/purchaseOrder"  xm
    lns:types="http://xmlns.oralce.com/demo/xdb/purchaseOrderTypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.c
    om/xdb" version="1.0" xdb:storeVarrayAsTable="true">
      5     <xs:import namespace="http://xmlns.oralce.com/demo/xdb/purchaseOrderTypes" schemaLocation="poTypes.xsd"/>
      6     <xs:element name="PurchaseOrder" type="PurchaseOrderType" xdb:defaultTable="PURCHASEORDER"/>
      7     <xs:complexType name="PurchaseOrderType" xdb:SQLType="PURCHASEORDER_T">
      8             <xs:sequence>
      9                     <xs:element name="Reference" type="types:ReferenceType" xdb:SQLName="REFERENCE"/>
    10                     <xs:element name="Actions" type="types:ActionsType" xdb:SQLName="ACTIONS"/>
    11                     <xs:element name="Reject" type="types:RejectionType" minOccurs="0" xdb:SQLName="REJECTION"/>
    12                     <xs:element name="Requestor" type="types:RequestorType" xdb:SQLName="REQUESTOR"/>
    13                     <xs:element name="User" type="types:UserType" xdb:SQLName="USERID"/>
    14                     <xs:element name="CostCenter" type="types:CostCenterType" xdb:SQLName="COST_CENTER"/>
    15                     <xs:element name="ShippingInstructions" type="types:ShippingInstructionsType" xdb:SQLName="SHIPPING_INSTRUCTIONS"/>
    16                     <xs:element name="SpecialInstructions" type="types:SpecialInstructionsType" xdb:SQLName="SPECIAL_INSTRUCTIONS"/>
    17                     <xs:element name="LineItems" type="types:LineItemsType" xdb:SQLName="LINEITEMS"/>
    18             </xs:sequence>
    19     </xs:complexType>
    20     </xs:schema>');
    21  begin
    22    if (dbms_xdb.existsResource(:schemaPath)) then
    23      dbms_xdb.deleteResource(:schemaPath);
    24    end if;
    25    res := dbms_xdb.createResource(:schemaPath,xmlSchema);
    26  end;
    27  /
    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> desc PURCHASEORDER
    Name                                      Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "po.xsd" Element "PurchaseOrder") STORAGE Object-relational TYPE "PURCHASEORDER_T"
    SQL> desc PURCHASEORDER_T
    PURCHASEORDER_T is NOT FINAL
    Name                                      Null?    Type
    SYS_XDBPD$                                         XDB.XDB$RAW_LIST_T
    REFERENCE                                          VARCHAR2(30 CHAR)
    ACTIONS                                            GLOBAL.ACTIONS_T
    REJECTION                                          GLOBAL.REJECTION_T
    REQUESTOR                                          VARCHAR2(128 CHAR)
    USERID                                             VARCHAR2(10 CHAR)
    COST_CENTER                                        VARCHAR2(4 CHAR)
    SHIPPING_INSTRUCTIONS                              GLOBAL.SHIPPING_INSTRUCTIONS
                                                        _T
    SPECIAL_INSTRUCTIONS                               VARCHAR2(2048 CHAR)
    LINEITEMS                                          GLOBAL.LINEITEMS_T
    SQL>I'm not sure what you were trying here in your xml schema
    xdb:columnProps="NOT SUBSTITUTABLE">
    or whether or not this annotation is the source of the problem

  • ORA-31050: Access denied when try to register XMLSchema

    Dear All
    I got ORA-31050: Access denied
    when tried to run to load XML schema with DBMS_XMLSCHEMA.registerSchema
    Can you advise me what privilege should I grant to the user?
    I tried grant XDBADMIN role but it does nto help
    Thank you in advance
    Artem Rodin

    Dear Mark!
    I realy need you help!
    I can successfully register schema which has complexType declaration as root element, like
    <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>
    But I failed if in the root there is element like
    <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>
    I got the following error stack
    ORA-01031: insufficient privileges
    ORA-06512: at “XDB.DBMS_XDBZ0”, line 218
    ORA-06512: at “XDB.DBMS_XDBZ”, line 6
    ORA-06512: at line 1
    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 73
    ORA-06512: at line 7
    I guess you can reproduce this in-house,
    It's not my schema it is taken from
    XML Database Developer’s Guide - Oracle XML DB
    Structured Mapping of XMLType 5-3
    Example 5–1 XML Schema Definition, po.xsd
    As far as I understand in the second case Oracle tries to create a table to store XML content and fails to do it.
    User that I used has DBA role. What other privileges should I grant to the user? And/or I should grant some additional privileges to "XDB" user?
    This issue has become critical for me, so I am highly appreciate any assistance
    Many thanks in advance
    Best regards
    Artem Rodin

  • ORA-29382 when requesting schema service

    Hi Experts,
    I'm trying to request a schema (Database Cloud Self Service Portal->My Databases->Request->Schema). But I always got the following errors:
    Step: Create the resource plan and groups
    Error message:
    Step: Evaluate expression (Failed)
    name from repository ORA-29382: validation of pending area failed ORA-29375: sum of values 101 for level 1, plan EM_RSC_PLAN exceeds 100 ORA-06512: at "SYS.DBMS_RMIN", line 444 ORA-06512: at "SYS.DBMS_RESOURCE_MANAGER", line 815 ORA-06512: at line 1
    e from repository ORA-29382: validation of pending area failed
    ORA-29375: sum of values 101 for level 1, plan EM_RSC_PLAN exceeds 100
    ORA-06512: at "SYS.DBMS_RMIN", line 444
    ORA-06512: at "SYS.DBMS_RESOURCE_MANAGER", line 815
    ORA-06512: at line 1
    Incidents   
    213 EM-03703 evaluateExpression(378972)
    Centralized Logging   
    08:59:18 [INCIDENT_ERROR] - Error executing compute step CREATE_RESOURCE_PLAN_AND_GROUP for procedure Schema_as_a_Service
    The version of my EM is 12.1.0.2.0.
    Any suggestions?
    Thanks

    I've got very similar problem some months ago. After some back and forth stage I've realized that the problem was in some expressions in source query that used locally defined PL/SQL functions. It appeared that Oracle tried to execute this local functions on remote server and finalyy I've got an error
    ORA-04052: error occurred when looking up remote object <schema>.<package name>@<local server url>
    When I removed the calls to local functions everything began to work fine.
    What are exact expressions for columns in your
    select col_1,...,col_n
    from local_table
    Are there any function calls there?
    Cheers

  • ORA-12008:ERR OCCCURS WHEN MATERIALIZED VIEW IS REFRESHED FROM OTHER SCHEMA

    Hi,
    ORA-12008: Error occcurs when materialized view is refreshed from another schema, Following the output of the trace file when error occured.
    /u01/app/oracle/admin/orcl92/bdump/orcl92_j000_23729.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1
    System name: Linux
    Node name: newdbserver
    Release: 2.6.9-5.ELsmp
    Version: #1 SMP Wed Jan 5 19:30:39 EST 2005
    Machine: i686
    Instance name: orcl92
    Redo thread mounted by this instance: 1
    Oracle process number: 164
    Unix process pid: 23729, image: oracle@newdbserver (J000)
    *** SERVICE NAME:(SYS$USERS) 2008-05-23 10:30:51.848
    *** SESSION ID:(462.21166) 2008-05-23 10:30:51.848
    *** 2008-05-23 10:30:51.848
    ORA-12012: error on auto execute of job 766
    ORA-12008: error in materialized view refresh path
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2255
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2461
    ORA-06512: at "SYS.DBMS_IREFRESH", line 683
    ORA-06512: at "SYS.DBMS_REFRESH", line 195
    ORA-06512: at line 1
    Regards,
    Abhishek

    Hi Damorgan,
    As i said, when refresh materialized view from another schema, mentioned error occurs.
    I have also granted accees explicitely still following error occurs.
    ORA-12008: error in materialized view refresh path
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2255
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2461
    ORA-06512: at "SYS.DBMS_IREFRESH", line 683
    ORA-06512: at "SYS.DBMS_REFRESH", line 195
    ORA-06512: at line 1
    Regards,
    Abhishek
    Message was edited by:
    AbhishekRathod(user559364)

  • ORA-20233 when requesting schema service

    Hi Experts,
    I'm trying to request a schema (Database Cloud Self Service Portal->My Databases->Request->Schema). But I always got the following errors:
    Step: "reate Database Service target and Promote Metrics."->"Promote Database Service Metrics"
    Error message:
    Unable to promote the target metrics. ORA-20233: Either the target or the metric does not exist for <target_name>/<metric_name>/<metric_column> schemaas.clouddemo.oracle.com_schemaas1/tbspAllocationspaceUsed ORA-06512: at "SYSMAN.EM_REP_METRIC", line 390 ORA-06512: at "SYSMAN.EM_REP_METRIC", line 629 ORA-06512: at "SYSMAN.EM_REP_METRIC", line 1775 ORA-06512: at "SYSMAN.MGMT_TARGET", line 4057 ORA-06512: at "SYSMAN.GENSVC", line 153 ORA-06512: at "SYSMAN.GENSVC", line 273 ORA-06512: at "SYSMAN.GENSVC", line 1048 ORA-06512: at "SYSMAN.MGMT_SERVICE", line 3269 ORA-06512: at line 1
    CPU Warning threshold limit specified : 80.0
    CPU Critical threshold limit specified : 90.0
    Memory Warning threshold limit specified : 819.0
    Memory Critical threshold limit specified : 921.0
    Storage Warning threshold limit specified : 819.0
    Storage Critical threshold limit specified : 921.0
    About to create the metric property for Storage...
    Storage metric property created successfully...
    About to create the metric property for CPU...
    CPU metric property created successfully...
    About to promote the database service taret metrics...
    Error while evaluating expression:[Error evaluating expression: ${promoteMetricStep()} : [Unable to promote the target metrics. ORA-20233: Either the target or the metric does not exist for <target_name>/<metric_name>/<metric_column> schemaas.clouddemo.oracle.com_schemaas1/tbspAllocationspaceUsed
    ORA-06512: at "SYSMAN.EM_REP_METRIC", line 390
    ORA-06512: at "SYSMAN.EM_REP_METRIC", line 629
    ORA-06512: at "SYSMAN.EM_REP_METRIC", line 1775
    ORA-06512: at "SYSMAN.MGMT_TARGET", line 4057
    ORA-06512: at "SYSMAN.GENSVC", line 153
    ORA-06512: at "SYSMAN.GENSVC", line 273
    ORA-06512: at "SYSMAN.GENSVC", line 1048
    ORA-06512: at "SYSMAN.MGMT_SERVICE", line 3269
    ORA-06512: at line 1
    The version of my EM is 12.1.0.2.0.
    Any suggestions?
    Thanks

    I've got very similar problem some months ago. After some back and forth stage I've realized that the problem was in some expressions in source query that used locally defined PL/SQL functions. It appeared that Oracle tried to execute this local functions on remote server and finalyy I've got an error
    ORA-04052: error occurred when looking up remote object <schema>.<package name>@<local server url>
    When I removed the calls to local functions everything began to work fine.
    What are exact expressions for columns in your
    select col_1,...,col_n
    from local_table
    Are there any function calls there?
    Cheers

  • ORA-04052: error occurred when looking up remote obj in mapping execution

    Hi,
    While executing an OWB mapping, I am getting the following error:
    ============
    Starting Execution UII_D_MAP_SPC_INSTALLATION_SIT
    Starting Task UII_D_MAP_SPC_INSTALLATION_SIT
    ORA-04052: error occurred when looking up remote object [email protected]
    ORA-00604: error occurred at recursive SQL level 1
    ORA-02019: connection description for remote database not found
    ORA-02063: preceding 3 lines from BIP2S@BIPDRACONN
    ORA-06512: at "UII_ODS_OWNER.UII_D_MAP_SPC_INSTALLATION_SIT", line 73
    ORA-06512: at "UII_ODS_OWNER.UII_D_MAP_SPC_INSTALLATION_SIT", line 1672
    ORA-06512: at "UII_ODS_OWNER.UII_D_MAP_SPC_INSTALLATION_SIT", line 2353
    ORA-06512: at "UII_ODS_OWNER.UII_D_MAP_SPC_INSTALLATION_SIT", line 6838
    ORA-06512: at line 1
    Completing Task UII_D_MAP_SPC_INSTALLATION_SIT
    Completing Execution UII_D_MAP_SPC_INSTALLATION_SIT
    ============
    Actually, here UII_ODS_OWNER itself is the target schema and <<UIIVS.DEVENV1.BT.CO.UK>> is the database in which this schema exists. And the mapping "UII_D_MAP_SPC_INSTALLATION_SIT" is being executed in the same target schema UII_ODS_OWNER.
    I am not sure why this above error is coming because such a dblink 'UIIVS.DEVENV1.BT.CO.UK' does not exist in the OWB generated package code. And the 2nd dblink 'BIP2S@BIPDRACONN' does not exist in the code, intead it exists as "BIP2S.DEVENV1.BT.CO.UK@BIPDRACONN" in the package code which is correct (as per OWB configuration & database).
    Same error also comes when I try to execute the same mapping from the OWB DEPLOYMENT MANAGER.
    Thanks & Regards,
    lenin

    Good morning Lenin,
    Have you checked the implementation of the connectors and are your locations well registered?
    Has a similar setup ever worked well?
    Can you access the source table using SQL (e.g. with SQL*Plus or TOAD)?
    Regards, Patrick

  • Issue in Store XML into Schema generated tables and Validation XML against registered schema.

    Hello friends,
    I am facing some problem when store xml into generated tables from registered schema.
    This is my Schema
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.abc.inf.in/test" targetNamespace="http://www.abc.inf.in/test" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:include schemaLocation="abc.xsd"/>
      <xs:element name="project" type="student">
      <xs:annotation>
      <xs:documentation> This is a Documentation</xs:documentation>
      </xs:annotation>
      </xs:element>
    </xs:schema>
    -- This is my xml document
    <project versao="2.00" xmlns="http://www.abc.inf.in/test">
      <test xmlns="http://www.abc.inf.in/test">
      <intest version="2.00" Id="testabc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  >
      <ide>
      <cUF>35</cUF>
      <cNF>59386422</cNF>
      <natOp>this is post</natOp>
      <indPag>1</indPag>
      <mod>55</mod>
      <serie>1</serie>
      </ide>............
    Not giving full because it's too long.
    1. I Successfully registered Schema into database
    2. Then i generate table from registered Schema
    2. In my java code i validated XML document against Schema and it's successfully validate.
    3. But when i stored this XML into this generated table it's give me error
       Like :
    INSERT INTO XMLTABLE
    VALUES
    (XMLTYPE(bfilename('MYDIR','testabc.xml'),NLS_CHARSET_ID('AL32UTF8')))
    Error report:
    SQL Error: ORA-31061: XDB error: XML event error
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "94032000" is not valid with respect to the pattern
    And i have to store this xml into this tables so what i have to do ?

    Thanks for your reply odie_63.
    I got this my error solution. My XML document is not well structured based on my registered XML Schema.
    Means In My XML Document there are some invalid value and that not match my schema pattern so it's gives this error
    SQL Error: ORA-31061: XDB error: XML event error
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "94032000" is not valid with respect to the pattern
    For Solution we have two ways
    1. I have changed this literal "94032000" value in my xml file then save it.
    2.
    - We have to delete this schema then
    - we have to change Schema pattern for particular element
    like :--
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="preserve"/>
      <xs:pattern value="[0-9]{3}"/>
    </xs:restriction>
    - then store xml into database it works..
    Thanks.

  • When trying to create new DB ORA-01109 ORA-01092

    Hi all,
    When I try to create a new database on a two-node clustered machine using dbca and the "General Purpose" template, it returns ORA-01109 ORA-01092 errors.
    Following is what I did:
    1. Installed Oracle 10 Release 2 on the two Oracle Enterprise Linux 4.5 nodes
    2. Installed patch set 3 (upgrade from 10.2.0.1 to 10.2.0.4)
    3. Installed Oracle clusterware on both nodes
    4. Installed ASM instance
    5. when I used the dbca to create a new db, it returns DB ORA-01109 ORA-01092
    I guess, the reason is that the seed of the "General Purpose" template was not upgraded by the patch set. If this is the case, my questions are:
    *(1) Why the patchset didn't upgrade the template seeds? Is it a bug?*
    *(2) How to upgrade the template seeds?*
    Oracle 10g R2 (10.2.0.4) on Oracle EL 4.5
    Following is a copy of a few last lines in the log generated by the dbca:
    [Thread-158] [10:22:57:99] [CloneDBCreationStep.executeImpl:352]  createCtl=Create
    controlfile reuse set databa se "rac"
    MAXINSTANCES 32
    MAXLOGHISTORY 1
    MAXLOGFILES 192
    MAXLOGMEMBERS 3
    MAXDATAFILES 1024
    Datafile
    '+DG1/rac/datafile/system.277.705320457',
    '+DG1/rac/datafile/undotbs1.279.705320475',
    '+DG1/rac/datafile/sysaux.278.705320469',
    '+DG1/rac/datafile/users.280.705320477',
    [Thread-158] [10:22:57:100] [CloneDBCreationStep.executeImpl:359]  crtCtl=Create
    controlfile reuse set database  "rac"
    MAXINSTANCES 32
    MAXLOGHISTORY 1
    MAXLOGFILES 192
    MAXLOGMEMBERS 3
    MAXDATAFILES 1024
    Datafile
    '+DG1/rac/datafile/system.277.705320457',
    '+DG1/rac/datafile/undotbs1.279.705320475',
    '+DG1/rac/datafile/sysaux.278.705320469',
    '+DG1/rac/datafile/users.280.705320477'
    [Thread-158] [CloneDBCreationStep.executeImpl:374]  Length of OriginalRedoLogsGrNames=2
    [Thread-158][CloneDBCreationStep.executeImpl:382]  0th redoLogText = GROUP 1  SIZE 51200K
    [Thread-158][CloneDBCreationStep.executeImpl:382]  1th redoLogText = GROUP 2  SIZE 51200K
    [Thread-158][CloneDBCreationStep.executeImpl:403]  createCTLSql=Create controlfile reuse
    set da tabase "rac"
    MAXINSTANCES 32
    MAXLOGHISTORY 1
    MAXLOGFILES 192
    MAXLOGMEMBERS 3
    MAXDATAFILES 1024
    Datafile
    '+DG1/rac/datafile/system.277.705320457',
    '+DG1/rac/datafile/undotbs1.279.705320475',
    '+DG1/rac/datafile/sysaux.278.705320469',
    '+DG1/rac/datafile/users.280.705320477'
    LOGFILE GROUP 1  SIZE 51200K,
    GROUP 2  SIZE 51200K RESETLOGS;
    [Thread-158] [10:23:22:541] [CloneDBCreationStep.executeImpl:415]  calling zerodbid
    [Thread-158] [10:23:41:517] [CloneDBCreationStep.executeImpl:425]  Shutdown database
    [Thread-158] [10:23:41:717] [CloneDBCreationStep.executeImpl:447]  Startup ......nomount......
    [Thread-158] [10:23:57:523] [CloneDBCreationStep.executeImpl:455]  deleting dummy control file from v$controlfi le: +DG1/rac/controlfile/current.281.705320591
    [Thread-158] [10:24:1:293] [CloneDBCreationStep.executeImpl:455]  deleting dummy control file from v$controlfil e: +DG2/rac/controlfile/current.265.705320595
    [Thread-158] [10:24:24:628] [CloneDBCreationStep.executeImpl:466]  Enabling restricted session.
    [Thread-158] [10:24:29:60] [CloneDBCreationStep.executeImpl:468]  alter database "rac" open resetlogs;
    [Thread-156] [10:24:58:683] [BasicStep.handleNonIgnorableError:430]  oracle.sysman.assistants.util.UIMessageHan dler@1b8099a:messageHandler
    [Thread-156] [10:24:58:703] [BasicStep.handleNonIgnorableError:431]  ORA-01092: ORACLE instance terminated. Dis connection forced

    alertlog tail contents:
    SMON: enabling cache recovery
    Fri Dec 11 10:24:57 2009
    Errors in file /u01/app/oracle/admin/rac/udump/rac1_ora_5482.trc:
    ORA-00704: bootstrap process failure
    ORA-39700: database must be opened with UPGRADE option
    Fri Dec 11 10:24:57 2009
    Error 704 happened during db open, shutting down database
    USER: terminating instance due to error 704
    Instance terminated by USER, pid = 5482
    ORA-1092 signalled during: alter database "rac" open resetlogs...

  • Register and Generate schema.. please help

    Hi All,
    I'm trying to do Reverse Engineering( Table to Entity).
    I have schema called SCOTT and i want to register and generate SCOTT schema into REPS schema.
    I have a problem with register and Generate the schema SCOTT.
    I'm connecting as REPS.
    I'm writing the code like this...
    begin
    jr_registration.register('SCOTT');
    end;
    begin
    jr_registration.GENERATE('SCOTT');
    end;
    when i run this code, i'm getting lot of unwanted tables into REPS Schema.
    Does anybody Know, where i'm doing mistake.. ?
    Thanks in advance.

    I have given all the privilages, which are in the list.
    And it owns by SCOTT only...
    I'm connecting as a Repositiry OWNER...
    The Interesting part is, it doesn't show any errors..but i couldn't see any tables in the REPS_OWNER schema.
    I'm trying to generate from SCOTT SCHEMA ---> REPS_OWNER
    schema.
    Any clue.. ?
    Thanks in advance.

  • PL/SQL: ORA-04052: error occurred when looking up remote object.

    Hi All,
    I'm getting the following error message while executing a PL/SQL Block.
    PL/SQL: ORA-04052: error occurred when looking up remote object UPLDUSER.filestatushistory@FTS
    ORA-00604: error occurred at recursive SQL level 1
    ORA-03106: fatal two-task communication protocol error
    ORA-02063: preceding line from FTSStatement
    declare
    v_coun number;
    begin
    select count(*) into v_coun
    from updluser.filestatushistory@fts;
    end;Back ground of the situation as follows,
    My DataBase version 10.2.0.3 DB Name :DB1
    Table Owner : UPLDUSER
    Table Name : FILESTATUSHISTORY
    I have a report user on the same database and I have grant all on the above table to report user
    Report User : RPT_FTS
    SQL> GRANT ALL ON FILESTATUSHISTORY_V TO RPT_FTS;Now Please find the below database details where I'm getting subjected error.
    Database version : 9.2.0.8
    DB Name : DB2
    User Name : RPT_REPORTS
    I Have create a dblink from RPT_REPORTS to RPT_FTS on DB1 and the dblink works fine. But getting the above error while running it.
    but When I do the same other 10.2.0.3 db , the above PL/SQL block works fine without any problem.
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Now the strange about this is that I have Created a new table on DB1 db like below;
    SQL> CREATE TABLE UPLDUSER.ABC AS SELECT * FROM FILESTATUSHISTORY;and retry my code on DB2 (9.2.0.8) after changing the table to ABC and it worked. Now I don't know whats wrong with a original table(FILESTATUSHISTORY).
    To over come the problem and a work-a-round method I create a view on the DB1 (RPT_FTS) like the below
    SQL> CREATE VIEW FILESTATUSHISTORY AS SELECT * FROM UPLDUSER.FILESTATUSHISTORY;and was able to run the PL/SQL block Remotely.
    Just wants To know what whould have been the cause for this .
    Cheers
    Kanchana

    Hi Kanchana,
    Perhaps following link of google search has answer to your query
    ORA-04052. The search result contains some useful articles whose URLs I shan't post in the forums.
    HTH!
    *009*

  • ORA-04052: Error occurs when execute the block

    I'm trying to run one block and his query definition uses an active public database link. When I ran the script to block I get the following message:
    ERROR in line 1:
    ORA-04052: error occurred when looking up remote object
    SQ_DSV.temp_tipo_contr@SQ_DSV tc
    ORA-00604: error occurred at recursive SQL level 1
    But when I execute his definition query all is ok, the query works fine.
    I mean, I'm using the following sentence to block:
    declare
    Cursor Tipo_Contr is
    Select tc.rec_id, tc.tipo_contr from SQ_DSV.temp_tipo_contr@SQ_DSV tc;
    begin
    For Reg_Tipo_Contr in Tipo_Contr Loop
    Begin
    Update recursos Set tpcontr_id = Reg_Tipo_Contr.tipo_contr
    where rec_id = Reg_Tipo_Contr.rec_id;
    exception when others then
    dbms_output.put_line(Reg_Tipo_Contr.rec_id || ' Not find');
    end;
    end loop;
    -- Commit;
    end;
    I checked for the GLOBAL_NAMES parameter and it is set to FALSE. Please help me, How can I fix this problem ?
    I'm using Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production running over Win XP for run block.
    Thanks you, Paulo.

    ORA-04052 error occurred when looking up remote object stringstringstringstringstring
    Cause: An error has occurred when trying to look up a remote object.
    Action: Fix the error. Make sure the remote database system has run KGLR.SQL to create necessary views used for querying/looking up objects stored in the database.
    Regards
    Marcio Paiva

  • ORA-00604 ORA-00904 When query partitioned table with partitioned indexes

    Got ORA-00604 ORA-00904 When query partitioned table with partitioned indexes in the data warehouse environment.
    Query runs fine when query the partitioned table without partitioned indexes.
    Here is the query.
    SELECT al2.vdc_name, al7.model_series_name, COUNT (DISTINCT (al1.vin)),
    al27.accessory_code
    FROM vlc.veh_vdc_accessorization_fact al1,
    vlc.vdc_dim al2,
    vlc.model_attribute_dim al7,
    vlc.ppo_list_dim al18,
    vlc.ppo_list_indiv_type_dim al23,
    vlc.accy_type_dim al27
    WHERE ( al2.vdc_id = al1.vdc_location_id
    AND al7.model_attribute_id = al1.model_attribute_id
    AND al18.mydppolist_id = al1.ppo_list_id
    AND al23.mydppolist_id = al18.mydppolist_id
    AND al23.mydaccytyp_id = al27.mydaccytyp_id
    AND ( al7.model_series_name IN ('SCION TC', 'SCION XA', 'SCION XB')
    AND al2.vdc_name IN
    ('PORT OF BALTIMORE',
    'PORT OF JACKSONVILLE - LEXUS',
    'PORT OF LONG BEACH',
    'PORT OF NEWARK',
    'PORT OF PORTLAND'
    AND al27.accessory_code IN ('42', '43', '44', '45')
    GROUP BY al2.vdc_name, al7.model_series_name, al27.accessory_code

    I would recommend that you post this at the following OTN forum:
    Database - General
    General Database Discussions
    and perhaps at:
    Oracle Warehouse Builder
    Warehouse Builder
    The Oracle OLAP forum typically does not cover general data warehousing topics.

Maybe you are looking for

  • French Website "auchandirect.fr" do not work on iOs5.0.1

    When I'm using an iPad in iOS 3.5 the french web site auchandirect.fr works very well. Now i'm in iOS 5 and the web site don't work somme things are missing, like my shopping list. Apple help needed! In french please.

  • Oracle database upgrate

    urrently we are running Oracle Server 7.3.4 Under Unix (SunOS5.7) with access to a Sybase 12.5.0.1 via Oracle-Sybase Transparent Gateway 4.1.1.0.0. For the web services, we use OAS 4.0.8.1. Our web applications are based on Javascript and Oracle PL/S

  • Missing thumbnails after dragging a project into another folder?

    Why would cause whole bunch of photos in an album to not show up in browser/viewer after dragging and dropping from one folder into another? If I click on the root folder where the project is located, all the photos show up again on the browser/viewe

  • Best way to populate fields ARF OR PL/SQL

    I'm building a form that requires data from two tables. The tables have a 1:1 relationship and share the same field as a primary key (I know they should be one table if normalized but unfortunately the tables have to be separate for various reasons).

  • WebProxy Not Rewriting content

    Hi all, I have Web Proxy 4.0.3 in a Solaris 10 SPARC box. WebProxy is operating in reverse mode. I have set rewrite-content-location to true in obj.conf and also made a Content rewrite filter. When the webproxy (www.external.com) fecthes content from