create a relational view received the error: ORA-19276: XPST0005 - XPath step Brown

Hi expert,
I'm using Oracle XML DB 11.2.0.1.0.
I'm schema successfully registered and generated a DOCUMENT table.
I have succfully inserted 12 at this table .xml files.

SQL > SELECT OBJECT_VALUE FROM document;

OBJECT_VALUE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<? XML version = "1.0" encoding = "UTF-8"? > <? XML-stylesheet href = "http://www.accessdata.fda.gov/spl/stylesheet/spl.xsl" type = "text/xsl"? >
"< document xmlns =" "urn: hl7 - org:v3" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "urn: hl7 - org:v3 http://localhost:8080/home/DEV/xsd/spl.xsd" & gt;
< root id = "03d6a2cd-fdda-4fe1-865d-da0db9212f34" / >
< code = '51725-0' codeSystem = "2.16.840.1.113883.6.1" displayName = "REGISTRATION OF ESTABLISHMENTS" / >
< / component >
< / document >

then I tried to create a relational view of create base on inserted one .xml file I got the error:

ERROR at line 3:
ORA-19276: XPST0005 - step XPath specifies an invalid element/attribute name: (text)

someone he knows what wrong?

Thank you very much!

Cow

Published by: cow on February 15, 2011 20:58

Published by: cow on February 21, 2011 06:59

Hello

You declare the default namespace of the document:

...
XMLTable(
  XMLNamespaces(default 'urn:hl7-org:v3'),
  '$p/document'
  PASSING doc.OBJECT_VALUE as "p"
  COLUMNS
...

Tags: Database

Similar Questions

  • create / relational view received the error

    Hi expert,

    I'm in Oracle Enterprise Manager 11 g 11.2.0.1.0.
    SQL * more: Production of release 11.2.0.1.0 killed him Feb 22 11:40:23 2011

    I have an .xml file in a table of xmltype: DOCUMENT

    <? XML version = "1.0" encoding = "UTF-8"? > <? XML-stylesheet href = "http://www.accessdata.fda.gov/spl/stylesheet/spl.xsl" type = "text/xsl"? >
    "< document xmlns =" "urn: hl7 - org:v3" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "urn: hl7 - org:v3 http://localhost:8080/home/DEV/xsd/spl.xsd" & gt;
    < root id = "5ca4e3cb-7298-4948-8cc2-58e71ad32694" / >
    < code = '51725-0' codeSystem = "2.16.840.1.113883.6.1" displayName = "REGISTRATION OF ESTABLISHMENTS" / >
    < effectiveTime value = "20100730" / >

    ........................................................
    < / contactParty >
    < / assignedOrganization >
    < performance >
    < actDefinition >
    < code = "C43360" codeSystem = "2.16.840.1.113883.3.26.1.1" displayName = "manufacturing" / >
    < / actDefinition >
    < / performance >
    < / assignedEntity >
    < / assignedOrganization >
    < / assignedEntity >
    < / representedOrganization >
    < / assignedEntity >
    < / author >
    < item >
    < structuredBody / >
    < / component >
    < / document >

    I tried to create a relational view using the code below.
    I got following error:
    ERROR on line 1:
    ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name:
    (author ='urn: hl7 - org:v3')

    y does it can someone help me.
    Thank you!

    Published by: cow on March 18, 2011 14:14

    Hello

    You have the wrong Xpath by passing the XML fragment to the 2nd XMLTable.

    SELECT master.registrationID, master.code, detail.*
    FROM DOCUMENT doc,
         XMLTable(
          XMLNamespaces(default 'urn:hl7-org:v3'),
          '/document'
          PASSING doc.OBJECT_VALUE
          COLUMNS
            registrationID VARCHAR2(50) PATH 'id/@root',
            code           VARCHAR2(10) PATH 'code/@code',
            orgID          NUMBER(10)   PATH 'author/assignedEntity/representedOrganization/assignedEntity/assignedOrganization/id/@extension',
            orgROOT        VARCHAR2(15) PATH 'author/assignedEntity/representedOrganization/assignedEntity/assignedOrganization/id/@root',
            orgNAME        VARCHAR2(50) PATH 'author/assignedEntity/representedOrganization/assignedEntity/assignedOrganization/name',
            orgADDRstreet  VARCHAR2(20) PATH 'author/assignedEntity/representedOrganization/assignedEntity/assignedOrganization/contactParty/addr/streetAddressLine',
            orgADDRcity    VARCHAR2(20) PATH 'author/assignedEntity/representedOrganization/assignedEntity/assignedOrganization/contactParty/addr/city',
            orgADDRstate   VARCHAR2(20) PATH 'author/assignedEntity/representedOrganization/assignedEntity/assignedOrganization/contactParty/addr/state',
            orgADDRzip     VARCHAR2(15) PATH 'author/assignedEntity/representedOrganization/assignedEntity/assignedOrganization/contactParty/addr/postalCode',
            orgADDRcountry VARCHAR2(20) PATH 'author/assignedEntity/representedOrganization/assignedEntity/assignedOrganization/contactParty/addr/country',
            orgPHONE       VARCHAR2(20) PATH 'author/assignedEntity/representedOrganization/assignedEntity/assignedOrganization/contactParty/telecom[1]/@value',
            orgEMAIL       VARCHAR2(40) PATH 'author/assignedEntity/representedOrganization/assignedEntity/assignedOrganization/contactParty/telecom[2]/@value',
            contactPerson  VARCHAR2(20) PATH 'author/assignedEntity/representedOrganization/assignedEntity/assignedOrganization/contactParty/contactPerson/name',
            assignedEntity XMLTYPE      PATH 'author/assignedEntity/representedOrganization/assignedEntity/assignedOrganization/assignedEntity'
         ) master
       , XMLTable(
          XMLNamespaces(default 'urn:hl7-org:v3'),
          '/assignedEntity'
          PASSING master.assignedEntity
          COLUMNS
            RSN_XML_POS     FOR ORDINALITY,
            orgID2          NUMBER(10)   PATH 'assignedOrganization/id[1]/@extension',
            orgROOT2        VARCHAR2(15) PATH 'assignedOrganization/id[1]/@root',
            orgID2_d        NUMBER(10)   PATH 'assignedOrganization/id[2]/@extension',
            orgROOT2_d      VARCHAR2(20) PATH 'assignedOrganization/id[2]/@root',
            orgNAME2        VARCHAR2(50) PATH 'assignedOrganization/name',
            orgADDRstreet2  VARCHAR2(20) PATH 'assignedOrganization/addr/streetAddressLine',
            orgADDRcity2    VARCHAR2(20) PATH 'assignedOrganization/addr/city',
            orgADDRstate2   VARCHAR2(20) PATH 'assignedOrganization/addr/state',
            orgADDRzip2     VARCHAR2(15) PATH 'assignedOrganization/addr/postalCode',
            orgADDRcountry2 VARCHAR2(20) PATH 'assignedOrganization/addr/country',
            orgADDRstreet3  VARCHAR2(20) PATH 'assignedOrganization/contactParty/addr/streetAddressLine',
            orgADDRcity3    VARCHAR2(20) PATH 'assignedOrganization/contactParty/addr/city',
            orgADDRstate3   VARCHAR2(20) PATH 'assignedOrganization/contactParty/addr/state',
            orgADDRzip3     VARCHAR2(15) PATH 'assignedOrganization/contactParty/addr/postalCode',
            orgADDRcountry3 VARCHAR2(20) PATH 'assignedOrganization/contactParty/addr/country',
            orgPHONE3       VARCHAR2(20) PATH 'assignedOrganization/contactParty/telecom[1]/@value',
            orgEMAIL3       VARCHAR2(40) PATH 'assignedOrganization/contactParty/telecom[2]/@value',
            contactPerson3  VARCHAR2(20) PATH 'assignedOrganization/contactParty/contactPerson/name'
         ) detail
    ;
    
  • What deletion XMLSchema received the error ORA-04022 no waiting asked, but had to wait to lock the dictionary objects

    I recorded a XMLschem in the Oracle XDB repository to load the XML file into the oracle tables using storage relational object. In this process, I'm trying to remove the xmlschema to sign up again with a few changes in the XSD file, but I'm not able to remove it and I get the error ORA 04022 no waiting asked, but had to wait to lock the dictionary objects... Before that, I deleted the xmlschem 2 - 3 times and it worked fine. But now I have this error.

    I tried to remove it with "DELETE_CASCADE" and also tried "DELETE_CASCADE_FORCE" and in both cases, I get the same error.

    I've waited 2-3 days and then retried still had the same error.

    Could you please help me to solve this problem.

    Here is the screenshot of the error

    Delete Schema No wait error.JPG

    I also tried to purge the schema, as shown below, but I get the error access denied. I'm stuck here, could not move before working on it.

    Select * from dba_xml_schemas, where qual_schema_url like '% HPO484% '; -1B01B74F95BE1C91E0540021287E70DC

    BEGIN

    DBMS_XMLSCHEMA. PURGESCHEMA (schema_id = > '1B01B74F95BE1C91E0540021287E70DC');

    END;

    It throws below error

    ORA-31050: access denied

    ORA-06512: at "XDB". DBMS_XMLSCHEMA", line 109

    ORA-06512: at line 1

    Could you please help me with this.

    Thank you

    Reva

    Is it possible to reproduce the problem?

    You have a table that references the schema?

    Check with your DBA if there is no locking assets library.

  • has received the error ORA-44416: invalid ACL, while trying to enable network services

    Hi guys I got the ERROR ORA-44416 after the activation of services network in 11 GR 2 to send emails, so I ran this command found just as shown below in the Oracle document library

    SELECT THE ACL, PRINCIPAL

    OF NACL, XDS_ACE ACE DBA_NETWORK_ACLS

    WHERE HOST = ' *' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL AND

    NACL. ACLID = ACE. ACLID AND

    ARE NOT (SELECT NULL FROM ALL_USERS WHERE USERNAME = MAIN);

    That returned a result of

    no selected line

    What could this mean

    The installation is done on a localhost and the APEX version is 4.2.2 browser is mozilla fire fox

    ORA-44416 means that the ACL that you tried to create to refer to a valid principle - that is, the user does not exist.

    The SQL code that you included above seems to be looking for associated ACL principles which are more database users. I don't see a direct link between this request and the ORA-44416.

    What was your original script of ACL?

    Also, because it is a question of database rather APEX you might get a better answer on the forums of the database.

  • When you try to create a system image, receive the error code 0 x 81000019

    Get the error code when you try to create a system image on a 900 + GB hard drive with 900 GB of free space. Keeps telling me that there is not enough space to create the image of the shadow. I'm trying the disk image has only 40 GB of data. What is going on? Using Windows 7 64 bit Pro.

    Many hours of searching the Web for answers about a year ago, said that relatively few people have this problem and proposed solutions in the forums have been complex, machine dependent and seem to fail for most of the people who have tried a fix...

    So when I gave up and called Microsoft... they told me to take my problem to anyone assembled my computer...

    The man who built my machine told me not to worry, simply store all my files on the cloud, as he does...

    So now I store my important stuff on a spare drive, we have installed in the box, go to live with the inability to make appropriate backups and restore points...

    All my old computers is standard backups without any hassle... Just this new machine with Win7.

    (The only "new" thing was a disc SSD C... can't believe it would make one difference either, other than speed... and many people use them in 2011...)

  • XMLQuery, XMLExists, XMLCast ORA-19276: XPST0005 invalid element

    My goal is to create relational views over XML data.
    I'm having trouble with the syntax XMLExists and XMLQuery.
    I work through the examples in the release of 11 g Oracle XML Developers Guide 2 (11.2) suitable for my schema and instance.
    The error is ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name:
    Any suggestions on how to navigate in the path of the item XMLExists, XMLQuery and XMLCast?
    It is a matter of follow-up to XML file too large or too large XML element
    PHARMA@scidev> select * from v$version;
    BANNER
    -------------------------------------------------------
    Oracle Database 11g Release 11.2.0.2.0 - Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    -The XMLDB is installed and running.
    VAR SCHEMAURL VARCHAR2(700)
    --
    begin
            :SCHEMAURL := 'http://lims.drugbank.ca/docs/drugbank.xsd';
    end;
    /
    
    DECLARE
        V_XMLSCHEMA XMLTYPE := xmltype(bfilename('XMLPHARMA', 'drugbank.xsd'),nls_charset_id('AL32UTF8'));
    BEGIN
            DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XMLSCHEMA);
            DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDOM(V_XMLSCHEMA);
            DBMS_XMLSCHEMA_ANNOTATE.setSQLType(V_XMLSCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'BondType',DBMS_XDB_CONSTANTS.XSD_ELEMENT,'references','CLOB',TRUE);
            DBMS_XMLSCHEMA_ANNOTATE.setSQLType(V_XMLSCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'PartnerType',DBMS_XDB_CONSTANTS.XSD_ELEMENT,'references','CLOB',TRUE);
            DBMS_XMLSCHEMA_ANNOTATE.setSQLType(V_XMLSCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'DrugType',DBMS_XDB_CONSTANTS.XSD_ELEMENT,'general-references','CLOB',TRUE);
            DBMS_XMLSCHEMA_ANNOTATE.setSQLType(V_XMLSCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'SequenceType',DBMS_XDB_CONSTANTS.XSD_ELEMENT,'chain','CLOB',TRUE);
    
           DBMS_XMLSCHEMA.registerSchema(
              SCHEMAURL => :SCHEMAURL,
              SCHEMADOC => V_XMLSCHEMA,
              LOCAL     => TRUE,
              GENTYPES  => TRUE,
              GENTABLES => TRUE);
    END;
    / 
    
    CREATE TABLE drugs_xmltype OF XMLTYPE
      XMLSCHEMA "http://lims.drugbank.ca/docs/drugbank.xsd"
      ELEMENT "drugs"
    /
    
    SELECT table_name FROM user_xml_tables;
    TABLE_NAME
    ------------------------------
    DRUGS_XMLTYPE
    1 row selected.
    SELECT COUNT(*) FROM user_nested_tables;
           COUNT(*)
    ---------------
                 36
    1 row selected.
    
    INSERT INTO drugs_xmltype
    VALUES(XMLType(bfilename('XMLPHARMA', 'drugbank.xml'),nls_charset_id('AL32UTF8')))
    ;
    1 row created.
    commit;
    Commit complete.
    
    desc drugs_xmltype
     Name                                                                          Null?    Type
     ----------------------------------------------------------------------------- -------- ----------------------------------------------------
    TABLE of SYS.XMLTYPE(XMLSchema "http://lims.drugbank.ca/docs/drugbank.xsd" Element "drugs") STORAGE Object-relational TYPE "drugs1609_T"
    
    BEGIN 
                  DBMS_STATS.GATHER_SCHEMA_STATS (
                    ownname => 'PHARMA',
              estimate_percent => 100
              );
    END;
    /
    generated by XMLDB schema document
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" targetNamespace="http://drugbank.ca" xmlns="http://drugbank.ca" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="true" xdb:flags="2105639" xdb:schemaURL="http://lims.drugbank.ca/docs/drugbank.xsd" xdb:schemaOwner="PHARMA" xdb:numProps="177">
    ...snip
      <xs:complexType name="DrugType" xdb:maintainDOM="false" xdb:SQLType="DrugType1543_T" xdb:SQLSchema="PHARMA">
        <xs:sequence>
          <xs:element name="drugbank-id" type="xs:string" xdb:propNumber="5488" xdb:global="false" xdb:SQLName="drugbank-id" xdb:SQLType="VARCHAR2" xdb:memType="1" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
          <xs:element name="name" type="xs:string" xdb:propNumber="5489" xdb:global="false" xdb:SQLName="name" xdb:SQLType="VARCHAR2" xdb:memType="1" xdb:MemInline="true" xdb:SQLInline="true" xdb:JavaInline="true"/>
    ...snip
      <xs:element name="drugs" xdb:defaultTable="" xdb:propNumber="5446" xdb:global="true" xdb:SQLName="drugs" xdb:SQLType="drugs1609_T" xdb:SQLSchema="PHARMA" xdb:memType="258" xdb:defaultTableSchema="PHARMA">
        <xs:complexType xdb:maintainDOM="false" xdb:SQLType="drugs1609_T" xdb:SQLSchema="PHARMA">
          <xs:sequence>
            <xs:element name="drug" type="DrugType" minOccurs="0" maxOccurs="unbounded" xdb:propNumber="5443" xdb:global="false" xdb:SQLName="drug" xdb:SQLType="DrugType1543_T" xdb:SQLSchema="PHARMA" xdb:memType="258" xdb:MemInline="false" xdb:SQLInline="true" xdb:JavaInline="false" xdb:SQLCollType="drug1610_COLL" xdb:SQLCollSchema="PHARMA"/>
    document instance
    <drugs xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" 
              xmlns="http://drugbank.ca" 
              xs:schemaLocation="http://drugbank.ca http://lims.drugbank.ca/docs/drugbank.xsd">
      <drug type="biotech" created="2005-06-13 07:24:05 -0600" version="3.0" updated="2010-11-25 15:36:58 -0700">
        <drugbank-id>DB00001</drugbank-id>
    ...snip
    XMLTable works closely with XMLNamespaces to 1 row by drugs, tables nested with fields and tables nested with a single field
    the XMLNamespaces with example is based off of this thread create a relational view received the error: ORA-19276: XPST0005 - XPath step Brown
    CREATE OR REPLACE VIEW pharma.drugs_vw AS
    SELECT d.*
    FROM drugs_xmltype dx, XMLTable(XMLNamespaces(default 'http://drugbank.ca'), 
        '/drugs/drug' 
        PASSING dx.OBJECT_VALUE COLUMNS
        drugbank_id        VARCHAR2(20)   PATH 'drugbank-id',
        drug_name               VARCHAR2(50)   PATH 'name',
        description        VARCHAR2(4000) PATH 'description',
        cas_number         VARCHAR2(20)   PATH 'cas-number',
        general_references VARCHAR2(4000) PATH 'general-references',
        synthesis_reference VARCHAR2(4000) PATH 'synthesis-reference',
        indication         VARCHAR2(4000) PATH 'indication',
        pharmacology       VARCHAR2(4000) PATH 'pharmacology',
        mechanism_of_action VARCHAR2(4000) PATH 'mechanism-of-action',
        toxicity            VARCHAR2(4000) PATH 'toxicity',
        biotransformation   VARCHAR2(4000) PATH 'biotransformation',
        absorption          VARCHAR2(4000) PATH 'absorption',
        half_life           VARCHAR2(4000) PATH 'half-life',
        protein_binding     VARCHAR2(4000) PATH 'protein-binding',
        route_of_elimination VARCHAR2(4000) PATH 'route-of-elimination',
        volume_of_distribution VARCHAR2(4000) PATH 'volume-of-distribution',
        clearance           VARCHAR2(4000) PATH 'clearance'    
    ) d
    ORDER BY d.drugbank_id
    ;
    
    PHARMA@scidev> select drugbank_id, drug_name from drugs_vw where rownum <= 5;
    
    DRUGBANK_ID          DRUG_NAME
    -------------------- --------------------------------------------------
    DB00001              Lepirudin
    DB00002              Cetuximab
    DB00003              Dornase Alfa
    DB00004              Denileukin diftitox
    DB00005              Etanercept
    
    5 rows selected.
    Elapsed: 00:00:00.89
    
    CREATE OR REPLACE VIEW pharma.packager_vw AS
    SELECT dt.drugbank_id, dt.cas_number, pack.*
    FROM drugs_xmltype dx, 
        XMLTABLE(XMLNamespaces(DEFAULT 'http://drugbank.ca'), '/drugs/drug' 
                PASSING dx.OBJECT_VALUE COLUMNS
                    drugbank_id        VARCHAR2(20)   PATH 'drugbank-id',
                    cas_number         VARCHAR2(20)   PATH 'cas-number',
                    packager XMLTYPE PATH 'packagers/packager') dt,
        XMLTABLE(XMLNamespaces(DEFAULT 'http://drugbank.ca'), '/packager' 
                PASSING dt.packager COLUMNS 
                    packager_name VARCHAR2(30) PATH 'name',
                    packager_url VARCHAR2(30) PATH 'url') pack
    ORDER BY dt.drugbank_id
    ;
    
    PHARMA@scidev> select drugbank_id, packager_name from packager_vw where rownum <= 5;
    
    DRUGBANK_ID          PACKAGER_NAME
    -------------------- ------------------------------
    DB00001              Bayer Healthcare
    DB00001              Berlex Labs
    DB00002              Cardinal Health
    DB00002              ImClone Systems Inc.
    DB00002              Catalent Pharma Solutions
    
    
    CREATE OR REPLACE VIEW pharma.secondary_accession_number_vw AS
    SELECT dt.drugbank_id, dt.cas_number, sa.*
    FROM drugs_xmltype dx, 
        XMLTABLE(XMLNamespaces(DEFAULT 'http://drugbank.ca'), '/drugs/drug' 
                PASSING dx.OBJECT_VALUE COLUMNS
                    drugbank_id        VARCHAR2(20)   PATH 'drugbank-id',
                    cas_number         VARCHAR2(20)   PATH 'cas-number',
                    secondary_accession_number XMLTYPE PATH 'secondary-accession-numbers/secondary-accession-number') dt,
        XMLTABLE(XMLNamespaces(DEFAULT 'http://drugbank.ca'), '/secondary-accession-number' 
                PASSING dt.secondary_accession_number COLUMNS
                    secondary_accession_number VARCHAR2(20) PATH '/') sa
    ORDER BY dt.drugbank_id
    ;
    PHARMA@scidev> select drugbank_id, secondary_accession_number from secondary_accession_number_vw where rownum <= 5;
    
    DRUGBANK_ID          SECONDARY_ACCESSION_
    -------------------- --------------------
    DB00001              BTD00024
    DB00001              BIOD00024
    DB00002              BTD00071
    DB00002              BIOD00071
    DB00003              BTD00001
    
    5 rows selected.
    Elapsed: 00:00:00.34
    Copy the following code generates error
    ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name: (drugs)
    SELECT OBJECT_VALUE
    FROM drugs_xmltype
    WHERE XMLExists('/drugs/drug[drugbank-id="DB00001"]' PASSING OBJECT_VALUE);
    
    -- ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name: (drug)
    SELECT OBJECT_VALUE
    FROM drugs_xmltype
    WHERE XMLExists('/drug[drugbank-id="DB00001"]' PASSING OBJECT_VALUE);
    
    -- ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name: (drug)
    SELECT OBJECT_VALUE
    FROM drugs_xmltype
    WHERE XMLExists('drug[drugbank-id="DB00001"]' PASSING OBJECT_VALUE);
    
    -- ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name: (drugs)
    SELECT XMLQuery('/drugs/drug/drugbank-id' 
        PASSING OBJECT_VALUE RETURNING CONTENT)
    FROM drugs_xmltype;
    
    -- ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name: (XMLDATA)
    SELECT XMLQuery('/XMLDATA/drug/drugbank-id' 
        PASSING OBJECT_VALUE RETURNING CONTENT)
    FROM drugs_xmltype;
    
    -- ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name: (drugs)
    SELECT XMLCast(XMLQuery('/drugs/drug/drugbank-id' PASSING OBJECT_VALUE RETURNING CONTENT)
                AS VARCHAR2(10)) "DBID"
    FROM drugs_xmltype;
    
    -- ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name: (drug)
    SELECT XMLCast(XMLQuery('/drug/drugbank-id' PASSING OBJECT_VALUE RETURNING CONTENT)
                AS VARCHAR2(10)) "DBID"
    FROM drugs_xmltype;
    
    -- here the XMLTable works (returns the whole XML file), but the XMLExists fails
    -- ORA-00936: missing expression on the DEFAULT, which is a reserved word
    -- I assume that XMLNamespaces is not allowed for XMLExists. 
    SELECT dbid.COLUMN_VALUE
    FROM drugs_xmltype dx, XMLTABLE(XMLNamespaces(DEFAULT 'http://drugbank.ca'), '/drugs/drug' 
        PASSING dx.OBJECT_VALUE) dbid
    WHERE XMLEXISTS(XMLNamespaces(DEFAULT 'http://drugbank.ca'), '$d/drugs/drug[drugbank-id="DB00014"]' PASSING OBJECT_VALUE as "d");
    ;

    Namespace declarations...

    See example here xmlexists: Namespace in XMLEXISTS statement

  • HELP-immediate execution in PL/SQL has received the error ORA-00904: invalid identifier

    What is the problem with the following codes from PL/SQL (actually it comes to Oracle Metalink Note: 313175.1):
    ===========
    declare
    cursor c1 is select * from $ semantic;
    v_statement VARCHAR2 (255);
    v_nc number (10);
    v_nt number (10);
    Start
    immediate execution
    "select count (*) from $ semantics" in v_nc;
    immediate execution
    ' select count (distinct s_table_name) of semantics$ "in v_nt;
    dbms_output.put_line
    ('Edit' | v_nc |) 'columns ' | v_nt | "tables");
    to r1 c1 loop
    v_statement: = 'ALTER TABLE ' | R1.s_owner | '.' || R1.s_table_name;
    v_statement: = v_statement | «change (' |)» R1.s_column_name | ' ';
    v_statement: = v_statement | R1.s_data_type | ' (' | r1.s_char_length;)
    v_statement: = v_statement | ' CHAR))';
    immediately run v_statement;
    end loop;
    dbms_output.put_line ('Done');
    end;
    /
    =====
    Executed once the codes as sysdba against 10gr 2 database, I got this error:
    From build to select columns to change
    Editing columns 4428 35249
    declare
    *
    ERROR on line 1:
    ORA-00904: invalid identifier
    ORA-06512: at line 22

    I see nothing wrong with the line of "immediate execution". I appreciate your help!

    Thank you.

    Hello
    Try to print the offending instruction using exception, I used small test cases by changing the pl/sql block, you may need to change to respond to all other types of data in this table.

    CREATE TABLE semantics$
    AS
       SELECT USER AS owner,
              table_name,
              data_type AS s_data_type,
              column_name,
              data_length AS s_char_length
       FROM cols
       WHERE table_name = 'MY_OBJECTS';
    
    DECLARE
       CURSOR c1
       IS
          SELECT *
          FROM semantics$;
    
       v_statement   VARCHAR2 (255);
       v_nc          NUMBER (10);
       v_nt          NUMBER (10);
    BEGIN
       EXECUTE IMMEDIATE 'select count(*) from semantics$' INTO v_nc;
    
       EXECUTE IMMEDIATE 'select count(distinct table_name) from semantics$'
          INTO v_nt;
    
       DBMS_OUTPUT.put_line(   'ALTERing '
                            || v_nc
                            || ' columns in '
                            || v_nt
                            || ' tables');
    
       FOR r1 IN c1
       LOOP
          v_statement   := 'ALTER TABLE ' || r1.owner || '.' || r1.table_name;
          v_statement   := v_statement || ' modify (' || r1.column_name || ' ';
          v_statement   :=
             v_statement || r1.s_data_type || '(' || r1.s_char_length;
    
          IF (r1.s_data_type = 'NUMBER')
          THEN
             v_statement   := v_statement || '))';
          ELSE
             v_statement   := v_statement || ' CHAR))';
          END IF;
    
          DBMS_OUTPUT.put_line (v_statement);
    
          -- EXECUTE IMMEDIATE v_statement;
       END LOOP;
    
       DBMS_OUTPUT.put_line ('Done');
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line ('Statement = ' || v_statement);
          DBMS_OUTPUT.put_line (SUBSTR (SQLERRM, 1, 200));
          RAISE;
    END;
    

    _ Output

    ALTERing 13 columns in 1 tables
    ALTER TABLE MY_OBJECTS modify (OWNER VARCHAR2(30 CHAR))
    ALTER TABLE MY_OBJECTS modify (OBJECT_NAME VARCHAR2(30 CHAR))
    ALTER TABLE MY_OBJECTS modify (SUBOBJECT_NAME VARCHAR2(30 CHAR))
    ALTER TABLE MY_OBJECTS modify (OBJECT_ID NUMBER(22))
    ALTER TABLE MY_OBJECTS modify (DATA_OBJECT_ID NUMBER(22))
    ALTER TABLE MY_OBJECTS modify (OBJECT_TYPE VARCHAR2(19 CHAR))
    ALTER TABLE MY_OBJECTS modify (CREATED DATE(7 CHAR))
    ALTER TABLE MY_OBJECTS modify (LAST_DDL_TIME DATE(7 CHAR))
    ALTER TABLE MY_OBJECTS modify (TIMESTAMP VARCHAR2(19 CHAR))
    ALTER TABLE MY_OBJECTS modify (STATUS VARCHAR2(7 CHAR))
    ALTER TABLE MY_OBJECTS modify (TEMPORARY VARCHAR2(1 CHAR))
    ALTER TABLE MY_OBJECTS modify (GENERATED VARCHAR2(1 CHAR))
    ALTER TABLE MY_OBJECTS modify (SECONDARY VARCHAR2(1 CHAR))
    Done
    

    Concerning

    Published by: OrionNet on January 5, 2009 23:53

    Published by: OrionNet on January 5, 2009 23:55

  • Create the error ORA-04021: timeout period exceeded while waiting to lock object

    Hello

    I get the following error when I try to deploy the mapping.
    Create the error ORA-04021: timeout period exceeded while waiting to lock object.
    I use OWB 10.2.0.4.36

    All the world is facing this problem? Kindly help me in this regard.

    Thank you
    Siva

    Hi Siva,

    It's probably a blocking problem.

    Select "alter system kill session"'"
    || TO_CHAR (l.session_id)
    || ','
    || to_char(s.Serial#)
    || '''; ' kill_session
    o.object_name
    l.oracle_username
    l.os_user_name
    || Chr (10)
    || '('
    || s.Terminal
    || ')' os_user_name
    v $ session s
    , v$ locked_object l
    dba_objects o
    where s.sid = l.session_id
    and l.object_id = o.object_id
    /

    The above should give you the session id

    Then use SYSTEM account to kill the session
    alter system kill session "";

    Thank you
    Fati

  • We try to update the software on a computer and continue to receive the error 1719:

    We try to update the software on a computer and continue to receive the Error Message 1719: "Installer cannot access the Windows service". We tried to repair Windows install several times by the cancellation of registration registration without success. Windows Installer continues to block the update of the program

    We tried to install a new version of Kaspersky and have met the above problems.

    Hi Jug,

    Thanks for posting the question on the Microsoft Community Forums. I understand that while trying to update the software, you get an error 1719: "could access the Windows service install.

    This question is can be caused due to:

    You install or remove a program that uses Microsoft Installer Service to install a program on your computer. The Windows Installer Service is not running. The Windows Installer registry settings may be damaged or wrong.

    I suggest you check out the link to the troubleshooting steps.

    Error "The Windows Installer could access the Service" when you install or update programs on Windows 7 or Windows Vista.

    http://support.Microsoft.com/kb/2642495

    WARNING:

    To do: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    322756 http://windows.microsoft.com/en-us/windows-vista/Back-up-the-registry

    How to back up and restore the registry in Windows.

    If still the problem persists after you perform the steps of troubleshooting from the link and if you have questions related to Windows, please do not hesitate to answer us, we will be happy to help you.

    Thank you.

  • Receive the error message "the instruction at"0 x 00424590"referenced memory at"0 x 00000004", the memory could not be"written"." Error is received before the Windows logon prompt

    Receive the error referenced memory before you receive the logon prompt Windows session during the boot process.  Have replaced the RAM on the computer.  Windows Xp SP3.

    If anyone can identify the update that they think that may be the cause of the problem, you can navigate to the uninstall folder and determine what files have been updated.  If they can not start (except in the Recovery Console), you can also sort updates the date by using the dir command in the folder c:\windows (all $NtUninstall records).

    Problem is who writes all updates with Patch Tuesday comes around (say... it's today!-be prepared for positions "broken Windows my computer updates" start coming!).

    For example:

    When you install an update, first installation makes a copy of the files he wants to replace in the $ $NtUninstallKBnnnnnn... folder.

    That's why you can uninstall the update later.  Running uninstall the update will sometimes remove the updated files, then copy the original return files.  Sometimes uninstalling copy just the original preupdate on top of the most recent files.  It can also remove some registry keys, so Windows Update do not think you have more (look at the spuninst.inf file).

    Look at this update of security for example (KB950762) that updates c:\windows\system32\drivers\rmcast.sys:

    If you have installed, it will create this folder:

    c:\windows\$NtUninstallKB950762$

    You will have the front update file c:\windows\system32\dllcache\rmcast.sys in this folder since the installation of the update makes a copy of the original file for you.

    Then look at the file spuninst.txt spuninst folder and you will see what will happen if you need to uninstall the update:

    DEL "c:\windows\$hf_mig$\kb950762\sp3qfe\rmcast.sys".
    COPY 'C:\WINDOWS\$NtUninstallKB950762$\rmcast.sys' 'c:\windows\system32\dllcache\rmcast.sys '.
    COPY 'C:\WINDOWS\$NtUninstallKB950762$\rmcast.sys' 'c:\windows\system32\drivers\rmcast.sys '.
    COPY 'C:\WINDOWS\$NtUninstallKB950762$\spuninst\spuninst.txt' 'C:\WINDOWS\$NtUninstallKB950762$\spuninst\spuninst.tag '.

    In this case, uninstalling just copy the original file on top of the files that have been applied in the update, the spunint.inf updates registry tips and that's all.

    Notice that it also replaces the file in the dllcache folder too - c:\windows\system32\drivers\rmcast.sys is one of the 3498 drop that PAM cares everything (it's number 2500 in the list).  In dllcache files are backup files.

    If you were to access your drivers folder and rename c:\windows\system32\drivers\rmcast.sys to rmcast.lem, almost before you can Flash the 'missing' file will be replaced with the copy in the dllcache folder and you will see this in the event log:

    Event type: Information
    Event source: Windows File Protection
    Event category: no
    Event ID: 64002
    Description:
    File replacement was attempted on the protected system file c:\windows\system32\drivers\rmcast.sys. This file was restored to the original version to maintain system stability. The file version of the system file is 5.1.2600.5598.

    It is WFP in action and this means that WFP is working!

  • Adobe Player/Flash receives the error notice that he not use 32-bit 64-bit

    problems when you try to view things through Adobe Player/Flash receives the error notice that it uses 32-bit 64-bit not, I try to follow the instructions how to fix problem with on any what success iohow to use

    Help please, problem with the Windows Vista, 64-bit computer.

    Whenever I want to display items through opinion of get Adobe Player/Flash that he not use 32 bits 64 bits, I try to follow the instructions.

    I'd appreciate it, step by step instructions how to solve the problem, cannot view images, videos, etc. via internet.

    Thank you

    Marty 720

    http://social.answers.Microsoft.com/forums/en-us/InternetExplorer/thread/babaa5f8-FF06-4EA2-aef6-a9416d65f981

    Read all the foregoing by PA bear MVP.

    See you soon.

    Mick Murphy - Microsoft partner

  • get the error ORA-04088

    Hello

    I created a trigger to trigger the error if a trial off to enter data in a column that is attached to a number sequence.
    This trigger works, but with errors, these errors become after trying to insert values into the table.

    The errors are:

    Insert into test2 values(24,'horse','hyderabad',30); - 30 here is worth attempting to enter the column use
    Error report:
    SQL error: ORA-20101: insertion of the value to enter the not allowed... It will take the auto-numbering
    ORA-06512: at "SCOTT. TRI_UNQID', line 11
    ORA-04088: error during execution of trigger ' SCOTT. TRI_UNQID'


    My trigger is
    create or replace
    trigger tri_unqid
    before insert on test2 
    for each row
    declare
    v_number number(2);
    ins_exp exception;
    begin
    if :new.regid is not null  then
    raise ins_exp;
    else 
    select unqid.nextval into v_number from dual;
    :new.regid:=v_number;
    end if;
    exception
    when ins_exp then
    raise_application_error(-20101,'inserting the regid value not allowed.. it will take auto number');
    end tri_unqid;
    Output:
    It's the execution and throw my exception and other... I am not able to solve...
    and another point is if it is inserted successfully with errors, then it's values are inserted into the table at the front not the end of the records... How is it going...

    can any body explain

    Thank you
    Baba

    Published by: BluShadow on April 11, 2013 10:26
    fixed {noformat}
    {noformat} tags.  The "code" in the tag is enclose in "{" and "}", not "&lt;" and "&gt;"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    It's the execution and throw my exception and other... I am not able to solve...

    This is because there is no problem.

    Check your error message

    
    SQL Error: ORA-20101: inserting the regid value not allowed.. it will take auto number
    ORA-06512: at "SCOTT.TRI_UNQID";, line 11
    ORA-04088: error during execution of trigger 'SCOTT.TRI_UNQID' 
    

    Read from the bottom up. Oracle means

    1. a SCOTT trigger. TRI_UNQID caused an error
    2. the error occurred on line number 11
    3. the error message is ' insertion of the value to enter the not allowed... " It will take auto number.

    Why oracle has to say what trigger or procedure caused the error? Because there might be several trigger or procedure that may generate the same error if a user just need to know what is causing the error. And a line number is always helpful for debugging.

    So everything is good here. There is no problem to solve.

    and another point is if it is inserted successfully with errors, then it's values are inserted into the table at the front not the end of the records... How is it going...

    In a HEAP organized table this is SO forward or back (order of the lines is not relevant). If you want to display the records in an orderly manner use the ORDER BY Clause in the SELECT statement.

    So all is good here as well.

  • Get the error ora-02021

    I'm trying to truncate a table but oracle throws the error ORA-02021: DDL operations are not allowed on a remote database.

    02021, 00000, "DDL operations are not allowed on a remote database"
    * Cause: An attempt was made to use a DDL operation on a remote database.
    For example, "CREATE TABLE tablename@remotedbname... ».
    * Action: To change the remote database structure, you must connect to the
    remote database with the appropriate privileges.


    I'm pretty sure you have the appropriate privileges.

    You can even call a procedure:
    dbms_utility.exec_ddl_statement@DB_LINK exec ('your stmt');

  • EMCA fails with the error "ORA-01034: ORACLE is not available.

    Hello
    10g R2 on AIX I have the following error:
    emca -config dbcontrol db -repos create
    ......................................................
    .....................................................
    Password for DBSNMP user:
    Invalid username/password. [ORA-01034: ORACLE not available]
    And that's because all oracle processes are runing with:
    ORACLE_HOME=/U00/Oracle/product/10.2.0/Db_1/

    EMCA fails with the error "ORA-01034: ORACLE is not available" and "Name of user and password invalid." For DBSNMP user [ID 550484.1]
    It is said:
    +<moderator edit - removed MOS content>+
    Can I do the reverse and in the script of the emca, add "/" at the end of ORACLE_HOME=/u00/oracle/product/10.2.0/db_1
    ??
    Thank you.

    Edited by moderator - content removed from MOS

    Hi user;

    First of all please do not post details here, its against to oracle interoperability metalink, ID is sufficient for us. Secondly, yes you can, first to save $ORACLE_HOME/bin/emca script like

    CP $ORACLE_HOME/bin/emca $ORACLE_HOME/bin/emca_org

    to change the file number and test

    Respect of
    HELIOS

  • Get the error ORA-12518 with DG4ODBC to link with SQL Server

    Hi all

    We have recently updated a test area to 11g 2 on a windows 64-bit platform and now when you install our links database with our sql servers that we receive an error "ORA-12518'.»

    Listener.ora


    LISTENERPCIS =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = WILTS-ORCL4)(PORT = 1522))
    )

    SID_LIST_LISTENERPCIS =
    (SID_LIST =
    (SID_DESC =
    (PROGRAM = dg4odbc)
    (SID_NAME = PCIS)
    (ORACLE_HOME = c:\oracle\product\11.2.0\db_1)
    )
    )

    tnsnames.ora


    SIPC =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP) (HOST = WILTS-ORCL4)(PORT = 1522))
    )
    (CONNECT_DATA =
    (SID = PCIS)
    (HS = OK)
    )
    )

    All help appericated

    See you soon
    David

    Your Oracle_Home in the Listenerpcis of the Oracle Listener setting does not match the House reported in the status of the listener:

    In config you have published, you must:

    SID_LIST_LISTENERPCIS =
    (SID_LIST =
    (SID_DESC =
    (PROGRAM = DG4ODBC)
    (SID_NAME = PCIS)
    (ORACLE_HOME = c:\oracle\product\11.2.0\db_1)
    )
    )

    but the listener status:
    C:\ORACLE\PRODUCT\11.2.0\DBhome_1

    Please correct the Oracle_Home adjustment in the listener.ora file - and then stop and restart the listener.

Maybe you are looking for

  • Scanning from 120 my desire and my Mac OS 10.7.5

    Can not scan wireless or usb. When I go to the HP utility and click scan to the computer, it crashes. Have done this several times. When I use USB it says unable to connect to web services. What can I do? Thank you

  • Satellite C850 - where can I get and Win7 installation .iso of?

    Hi guys,. I searched and found a lot of threads, but have not really found a solution. I bought C850 with Win7-64-home-premium preinstalled for my wife.First I wanted to decline Microsoft EULA and claim the money for Win7 license, but I thought that

  • How can I fix my task manager

    open my task today Manager and his blank don't know why thinks that my son did something for her or can not someone help please tyvm

  • Update for windows update does not work

    Yesterday (24/06/2014), Microsoft has released an update for windows update, which according to them was necessary in order to receive new updates. It is installed without any problem, except that it doesn't work. I tried the fixit tool, but who find

  • How to remove the project using sql with the proper sequence

    HelloTried to delete the project failed with query according to the sequence shown below. But get error when running below final sql script (delete from epub_process where of the project = '?')SQL error: ORA-02292: integrity constraint (PUB.) PROC_HI