ORA-03113 when inserting a CLOB value cast as an XMLType of a SELECT query in a table

I have a table that contains a CLOB column with pseudo-XML in it. I want to keep these data in an XMLType column so that I can take advantage of some of the built-in XML features of Oracle to analyze more easily.

The source table is defined as:

CREATE TABLE "TSS_SRM_CBEBRE_LOGS_V"

( ) NUMBER of 'INCIDENT_ID',

ACTIVATE THE "EVENT_TYPE" VARCHAR2 (100 BYTE) NOT NULL,

VARCHAR2 (100 BYTE) "EVENT_KEY."

ACTIVATE THE 'CREATION_DATE' STAMP (6) NOT NULL,

ACTIVATE THE 'CREATED_BY' VARCHAR2 (100 BYTE) NOT NULL,

'LOG_MSG' CLOB) ;


The target table (to test this problem) is defined as:

CREATE TABLE 'TESTME '.

("LOG_MSG" "XMLTYPE"

)

My query is:

Insert / * + APPEND * / into testme ("LOG_MSG")

Select XMLTYPE.createXML ("LOG_MSG") as "TSS_SRM_CBEBRE_LOGS_V" b LOG_MSG;

In SQL * Developer, my error is: error report:

SQL error: No more data to read from socket

In SQL * MORE and Toad, my error is:

ORA-03113: end of file on communication channel

Process ID: 13903

Session ID: serial number 414: 32739

Thank you!

I made an ALTER SESSION SET EVENTs = 10046 trace name forever, context level 12'; and ran the query. At the bottom of the trace file, I found the two following exceptions of ORA-07445:

* 13:43:32.760 2013-08-15

Exception [type: SIGSEGV, SI_KERNEL (general_protection)] [ADDR:0 x 0] [PC:0 x 2652500, LpxMemFree () + 200] [flags: 0x0, count: 1]

Incident 493726 created the dump file: /u01/app/oracle/diag/rdbms/gtcdwd1/gtcdwd1/incident/incdir_493726/gtcdwd1_ora_8577_i493726.trc

[ORA-07445: exception encountered: core dump [LpxMemFree () + 200] [SIGSEGV] [ADDR:0 x 0] [PC:0 x 2652500] [SI_KERNEL (general_protection)]]

Incident 493727 created the dump file: /u01/app/oracle/diag/rdbms/gtcdwd1/gtcdwd1/incident/incdir_493727/gtcdwd1_ora_8577_i493727.trc

[ORA-07445: exception encountered: core dump [dbgtrReserveSpace () + 77] [SIGSEGV] [ADDR:0 x 0] [PC:0x938E91F] [SI_KERNEL (general_protection)]]

ORA-07445: exception encountered: core dump [LpxMemFree () + 200] [SIGSEGV] [ADDR:0 x 0] [PC:0 x 2652500] [SI_KERNEL (genres

ksdbgcra: base of writing to the directory file ' / u01/app/oracle/diag/rdbms/gtcdwd1/gtcdwd1/cdump ".

If I replace the XMLTYPE molded with the xmlparse function, I get the error ORA-19010 you mentioned. Read more in the Oracle documentation, I see that it says that I can not insert XML fragments into an XMLType column. I can use sys_XMLGen to create a well-formed document.

http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28369/xdb13gen.htm#i1026349

We'll see!

Tags: Database

Similar Questions

  • Managed pilot throws ORA-01483 or ORA-01461 when inserting the CLOB

    I think I found a bug in the driver managed to ODAC 12 c Release 3 (12.1.0.2.1). It is similar to that examined in problem with Managed ODP.NET driver update nclob raises ORA-01483, but also happens with shorter CLOB. Maye added challenge is therefore necessary.

    I'm trying to insert two strings to the CLOB columns in addition to the other columns. Although I try to insert the same data, a different error is thrown depending on the order of the parameters.

    If I first bind the shorter string, the error is:

    ORA-01483: invalid length for the DATE or NUMBER variable binding

    If I bind the longer string first, the error is:

    ORA-01461: can bind to a LONG value only for insert into a LONG column

    Please see the archive attached to a solution of the sample that reproduces the two errors.

    The system environment:

    • The driver is fully managed from ODAC 12 c Release 3 (12.1.0.2.1) - the pilot who requires that the instant client does not show this problem.
    • .NET framework 4.5.2
    • Windows 7 SP1 x 64
    • Server: 11.2.0.4.0 running on Windows Server 2008 R2 x 64

    Unfortunately, this errors occur quite often in my application and prevent me to move to the managed pilot, so a bug in output or workaround would be greatly appreciated.

    Hello

    As I wrote above, 20361140 patch resolves the issue.

    Patch 20684004 (DB Windows Bundle Patch 12.1. 0.2.4) and hotfix 20684157 (Windows Bundle Patch 12.1.0.2.5 DB) does not contain the fix. They do not contain an updated ODP.NET file.

    The right patch 21020286 (DB Windows Bundle Patch 12.1. 0.2.6) once again does not contain the fix. This is the latest version of ODP.NET I know. His version of product is 4.121.2. 20150515

    I would also like to see a NuGet package update. Handling everything patches manually, it is really a pain.

    Edit: as written below, an updated NuGet package was released. There the 12.1.22 version

  • ORA-03113 "reading" XML of CLOB

    Hello

    I use XMLTable for reading XML to insert data into the DB table. I have:

    PROCEDURE IMPORT_XML)

    p_plik VARCHAR2,

    p_tp_id NUMBER,

    number of p_commit_po: = 500) IS

    l_blob_id TERYT_PLIKI.tp_blob_id%type;

    l_blob BLOB;

    XMLTYpe l_teryt_xml;

    L_Name varchar2 (100);

    l_type varchar2 (100);

    l_date varchar2 (100);

    -l_part varchar2 (100);

    XMLType l_rows;

    l_commit number (6);

    l_cnt_rows NUMBER: = 0;

    procedure do_commit is

    Start

    l_commit: = l_commit + 1;

    l_cnt_rows: = l_cnt_rows + 1;

    If l_commit > = p_commit_po then

    commit;

    l_commit: = 0;

    end if;

    end do_commit;

    BEGIN

    -# variable l_BLOB contains BLOB from a column of table #.

    Err.d ("convert BLOB CLOB type...', 'IMPORT_XML', 70 ');

    declare

    dest_lob CLOB.

    src_lob BLOB;

    the sum integer: = DBMS_LOB. LOBMAXSIZE;

    dest_offset integer: = 1;

    offset integer: = 1;

    number of blob_csid: = nls_charset_id ('AL32UTF8');

    lang_context integer: = 0;

    the warning integer: = DBMS_LOB. WARN_INCONVERTIBLE_CHAR;

    Start

    dest_lob: = empty_Clob();

    DBMS_LOB. CREATETEMPORARY (dest_lob, false);

    DBMS_LOB. OPEN (dest_lob, DBMS_LOB. LOB_READWRITE);

    DBMS_LOB. OPEN (l_blob, DBMS_LOB. LOB_READONLY);

    DBMS_LOB. () CONVERTTOCLOB

    dest_lob,

    l_blob,

    amount,

    dest_offset,

    offset,

    blob_csid,

    lang_context,

    (caveat);

    DBMS_LOB. Close (l_blob);

    l_teryt_xml: = XMLType (dest_lob);

    commit;

    DBMS_LOB. FREETEMPORARY (dest_lob);

    end;

    l_rows: = l_teryt_xml.extract('/teryt/catalog/row');

    l_commit: = 0;

    If l_name = "TERC" then

    Err.d ("name =" |) L_Name, cm, 80);

    for r in (SELECT x.*

    FROM XMLTable ('/ rank ' ADOPTION l_rows)

    ["COLUMNS"WOJ"PATH of the VARCHAR2 (20) ' col[@name="WOJ "]',

    ["VARCHAR2 (20)"POW"PATH" col[@name="POW"]',

    ["Path"GMI"VARCHAR2 (20) ' col[@name="GMI "]',

    PATH of VARCHAR2 (2) "RODZ" "col[@name="RODZ"]',"

    PATH of VARCHAR2 (50) "NAME" "col[@name="NAZWA"]',"

    PATH of VARCHAR2 (50) "NAZDOD" "col[@name="NAZDOD"]',"

    "[" "STAN_NA PATH" VARCHAR2 (10) ' col[@name="STAN_NA"] "

    ) x

    ) loop

    INSERT INTO TERYT_TERC (WOJ, POW, GMI, RODZ, NAME, NAZDOD, STAN_NA, TP_ID)

    VALUES (r.WOJ, r.POW, r.GMI, r.RODZ, r.NAZWA, r.NAZDOD, r.STAN_NA, P_TP_ID);

    do_commit;

    end loop;

    elsif l_name = "SIMC" then

    Err.d ("name =" |) L_Name, cm, 80);

    for r in (SELECT x.*

    FROM XMLTable ('/ rank ' ADOPTION l_rows)

    "WOJ" VARCHAR2 COLUMNS (3) path "col[@name="WOJ"]',"

    ["" POW"VARCHAR2 (3) path" col[@name="POW"]',

    "GMI" VARCHAR2 (3) PATH "col[@name="GMI"]',"

    PATH of VARCHAR2 (2) "RODZ_GMI" "col[@name="RODZ_GMI"]',"

    ["" RM"VARCHAR2 (3) path" col[@name="RM"]',

    "MZ' VARCHAR2 (3) PATH" col[@name="MZ"]', "

    PATH of VARCHAR2 (60) "NAME" "col[@name="NAZWA"]',"

    "SYM' VARCHAR2 (7) PATH" col[@name="SYM"]', "

    PATH of VARCHAR2 (7) "SYMPOD" "col[@name="SYMPOD"]',"

    PATH of VARCHAR2 (10) "STAN_NA" "col[@name="STAN_NA"]"

    ) x

    ) loop

    INSERT INTO TERYT_SIMC (WOJ, POW, GMI, RODZ_GMI, RM, MZ, NAME, SYMBOL, SYMPOD, STAN_NA, TP_ID)

    VALUES (r.WOJ, r.POW, r.GMI, r.RODZ_GMI, r.RM, r.MZ, r.NAZWA, r.SYM, r.SYMPOD, r.STAN_NA, P_TP_ID);

    do_commit;

    end loop;

    elsif l_name = "ULIC" then

    Err.d ("name =" |) L_Name, cm, 80);

    for r in (SELECT x.*

    FROM XMLTable ('/ rank ' ADOPTION l_rows)

    "WOJ" VARCHAR2 COLUMNS (3) path "col[@name="WOJ"]',"

    ["" POW"VARCHAR2 (3) path" col[@name="POW"]',

    "GMI" VARCHAR2 (3) PATH "col[@name="GMI"]',"

    PATH of VARCHAR2 (2) "RODZ_GMI" "col[@name="RODZ_GMI"]',"

    "SYM' VARCHAR2 (7) PATH" col[@name="SYM"]', "

    PATH of VARCHAR2 (7) "SYM_UL" "col[@name="SYM_UL"]',"

    PATH of VARCHAR2 (5) "CECHA" "col[@name="CECHA"]',"

    PATH of VARCHAR2 (50) "NAZWA_1" "col[@name="NAZWA_1"]',"

    PATH of VARCHAR2 (50) "NAZWA_2" "col[@name="NAZWA_2"]',"

    PATH of VARCHAR2 (10) "STAN_NA" "col[@name="STAN_NA"]"

    ) x

    ) loop

    INSERT INTO TERYT_ULIC (WOJ, POW, GMI, RODZ_GMI, SYM, SYM_UL, CECHA, NAZWA_1, NAZWA_2, STAN_NA, TP_ID)

    VALUES (r.WOJ, r.POW, r.GMI, r.RODZ_GMI, r.SYM, r.SYM_UL, r.CECHA, r.NAZWA_1, r.NAZWA_2, r.STAN_NA, P_TP_ID);

    do_commit;

    end loop;

    elsif l_name = "WMRODZ" then

    Err.d ("name =" |) L_Name, cm, 80);

    for r in (SELECT x.*

    FROM XMLTable ('/ rank ' ADOPTION l_rows)

    "RM" VARCHAR2 COLUMNS (5) path "col[@name="RM"]',"

    PATH of VARCHAR2 (50) "NAZWA_RM" "col[@name="NAZWA_RM"]',"

    PATH of VARCHAR2 (10) "STAN_NA" "col[@name="STAN_NA"]"

    ) x

    ) loop

    INSERT INTO TERYT_WMRODZ (RM, NAZWA_RM, STAN_NA, TP_ID)

    VALUES (r.RM, r.NAZWA_RM, r.STAN_NA, P_TP_ID);

    do_commit;

    end loop;

    end if;

    validation work;


    When I'm loading file of type "SIMC" (the file size is approximately 32 MB), all right.

    When I am trying to load the "NEW" type (size file is about 80 MB), there's an ORA-03113.


    The problem is with the LOOP SELECTION, because

    Err.d ("name =" |) L_Name, cm, 80);

    connects name = ULIC


    What can I do to fix this?

    My DB is: Oracle Database 11 g Release 11.2.0.4.0 - 64 bit Production

    As Jason said, there are a bunch of useless stuff in there:

    -The VALIDATION inside the loop: do not do, commit only once, after that the job is done.

    -FOR lines: do not do this, use only one (possibly multi-table) INSERT SELECT.

    -BLOB CLOB conversion: not necessary, use the XMLTYPE constructor.

    -Extract from the XML document, that the work of the intermediate parties do in the whole structure directly.

    Basically, your procedure can be simplified to this couple of statements:

    -- insert XML into a temporary binary XMLType table, for performance :
    insert into tmp_xml values ( xmltype(l_blob, nls_charset_id('AL32UTF8')) );
    
    -- multitable insert into the target tables :
    INSERT FIRST
    WHEN l_name = 'TERC' THEN INTO
      TERYT_TERC (WOJ, POW, GMI, RODZ, NAZWA, NAZDOD, STAN_NA, TP_ID)
      VALUES (WOJ, POW, GMI, RODZ, NAZWA, NAZDOD, STAN_NA, P_TP_ID)
    WHEN l_name = 'SIMC' THEN INTO
      TERYT_SIMC (WOJ, POW, GMI, RODZ_GMI, RM, MZ, NAZWA, SYM, SYMPOD, STAN_NA, TP_ID)
      VALUES (WOJ, POW, GMI, RODZ_GMI, RM, MZ, NAZWA, SYM, SYMPOD, STAN_NA, P_TP_ID)
    WHEN l_name = 'ULIC' THEN INTO
      TERYT_ULIC (WOJ, POW, GMI, RODZ_GMI, SYM, SYM_UL, CECHA, NAZWA_1, NAZWA_2, STAN_NA, TP_ID)
      VALUES (WOJ, POW, GMI, RODZ_GMI, SYM, SYM_UL, CECHA, NAZWA_1, NAZWA_2, STAN_NA, P_TP_ID)
    WHEN l_name = 'WMRODZ' THEN INTO
      TERYT_WMRODZ (RM, NAZWA_RM, STAN_NA, TP_ID)
      VALUES (RM, NAZWA_RM, STAN_NA, P_TP_ID)
    SELECT x.*
    FROM tmp_xml t
       , XMLTable('/teryt/catalog/row'
           PASSING t.object_value
           COLUMNS "WOJ"      VARCHAR2(20) PATH 'col[@name="WOJ"]',
                   "POW"      VARCHAR2(20) PATH 'col[@name="POW"]',
                   "GMI"      VARCHAR2(20) PATH 'col[@name="GMI"]',
                   "RODZ"     VARCHAR2(2)  PATH 'col[@name="RODZ"]',
                   "NAZWA"    VARCHAR2(50) PATH 'col[@name="NAZWA"]',
                   "NAZDOD"   VARCHAR2(50) PATH 'col[@name="NAZDOD"]',
                   "STAN_NA"  VARCHAR2(10) PATH 'col[@name="STAN_NA"]',
                   "RODZ_GMI" VARCHAR2(2)  PATH 'col[@name="RODZ_GMI"]',
                   "RM"       VARCHAR2(3)  PATH 'col[@name="RM"]',
                   "MZ"       VARCHAR2(3)  PATH 'col[@name="MZ"]',
                   "SYM"      VARCHAR2(7)  PATH 'col[@name="SYM"]',
                   "SYMPOD"   VARCHAR2(7)  PATH 'col[@name="SYMPOD"]',
                   "SYM"      VARCHAR2(7)  PATH 'col[@name="SYM"]',
                   "SYM_UL"   VARCHAR2(7)  PATH 'col[@name="SYM_UL"]',
                   "CECHA"    VARCHAR2(5)  PATH 'col[@name="CECHA"]',
                   "NAZWA_1"  VARCHAR2(50) PATH 'col[@name="NAZWA_1"]',
                   "NAZWA_2"  VARCHAR2(50) PATH 'col[@name="NAZWA_2"]',
                   "NAZWA_RM" VARCHAR2(50) PATH 'col[@name="NAZWA_RM"]'
         ) x
    ;
    

    where TMP_XML is defined as follows:

    create global temporary table tmp_xml of xmltype
    xmltype store as securefile binary xml;
    
  • Stuck with ORA-30937 when inserting XML in the table...

    Hello

    We are in 10 gr 2 (10.2.0.3.0)

    I've never been so far with XMLs...
    and I followed as well as Marc can messages and XML and relational views:
    DB XML FAQ
    View relational content XML.
    XMLType view relational content

    I have saved the schema, renamed tables XMLTYPE that I needed...
    but when I try to insert my XML data in the XMLTYPE, I get this error:
    ORA-30937: no schema definition for 'WORKBENCH_PROJECT' (namespace ") in parent ' / '.


    I think I need to display the xml, xsd, and code as well:

    XML is:
    <? XML version = "1.0"? >
    < WORKBENCH_PROJECT >
    < BaseCalendars >
    < calendar
    name = "Standard" lastUpdatedDate = "2001-07 - 10 T 09: 04:08" >
    < / calendar >
    < calendar
    name = "Tunbase" lastUpdatedDate = "" 2008-02 - 21 T 12: 01:30 ' lastUpdatedBy = "sacchaud" > "
    < days >
    < day departure = '2008-01-01' isWorkDay = "false" / >
    < day departure = finishing '2008-03-20' = '2008-03-21' isWorkDay = "false" / >
    < day departure = "2008-04-09" isWorkDay = "false" / >
    < day departure = '2008-05-01' isWorkDay = "false" / >
    < day departure = '2008-07-25' isWorkDay = "false" / >
    < day departure = '2008-08-13' isWorkDay = "false" / >
    < day departure = "2008-11-07" isWorkDay = "false" / >
    < / days >
    < / calendar >
    < calendar
    name = 'SPAIN-BASE' lastUpdatedDate = "" 2008-11 - 28 T 10: 11:53 ' lastUpdatedBy = "ashwkulk" > "
    < days >
    < day departure = '2008-01-01' isWorkDay = "false" / >
    < day departure = "2008-01-07" isWorkDay = "true" >
    < go >
    < Shift start = "08:00:00" complete ="12:00:00" / > "
    < Shift start = "13:00:00" complete ="17:00:00" / > "
    < / travel >
    < / day >
    < day departure = '2008-03-20' isWorkDay = "true" >
    < go >
    < Shift start = "08:00:00" complete ="12:00:00" / > "
    < Shift start = "13:00:00" complete ="17:00:00" / > "
    < / travel >
    < / day >
    < day departure = '2008-03-21' isWorkDay = "false" / >
    < day departure = '2008-05-01' isWorkDay = "false" / >
    < day departure = '2008-08-15' isWorkDay = "false" / >
    < day departure = '2008-10-13' isWorkDay = "true" >
    < go >
    < Shift start = "08:00:00" complete ="12:00:00" / > "
    < Shift start = "13:00:00" complete ="17:00:00" / > "
    < / travel >
    < / day >
    < day departure = "2008-12-08" isWorkDay = "false" / >
    < day departure = '2008-12-25' isWorkDay = "false" / >
    < day departure = '2009-01-01' isWorkDay = "false" / >
    < day departure = "2009-01-06" isWorkDay = "false" / >
    < day departure = '2009-04-10' isWorkDay = "false" / >
    < day departure = '2009-05-01' isWorkDay = "false" / >
    < day departure = '2009-10-12' isWorkDay = "false" / >
    < day departure = "2009-12-08" isWorkDay = "false" / >
    < day departure = '2009-12-25' isWorkDay = "false" / >
    < / days >
    < / calendar >
    < / BaseCalendars >
    < PoolResources >
    < PoolResource
    resourceType = '0' inputTypeCode = '0' ADO = "FGASNIER" userFlag2 = "false" userFlag1 = "false".
    fullName = "Gasnier Florian" firstName = "Florian" isExternal = "false" isActive = 'true '.
    ResourceID = "FGASNIER" managerUserName = "PIDUPUIS" employmentType = "3" userNumber2 = "0.0".
    userNumber1 = '0,0' userText2 = 'POWEO' userText1 = "' UDDI EUC + ' openForTimeEntry = 'true'"
    emailAddress = '[email protected]' LastName As String = "Gasnier" isRole = "false" trackMode = "2" >
    < Calendar CalendrierBase = 'FRANCE' >
    < days >
    < day departure = '2008-12-26' isWorkDay = "false" / >
    < day departure = "2009-03-23" Finish = "2009-03-25" isWorkDay = "false" / >
    < / days >
    < / calendar >
    < curve name = 'availability' type = '1' default = "1.0" / >
    < / PoolResource >
    < PoolResource
    resourceType = '0' inputTypeCode = '0' ADO = "mmazelei" userFlag2 = "false" userFlag1 = "false".
    fullName = "Kounde, Guillaume" firstName = "Guillaume" isExternal = "false" isActive = 'true '.
    ID = "GKOUNDE" managerUserName = "PIDUPUIS" employmentType = "3" userNumber2 = "0.0".
    userText3 = "RE7' userNumber1 = '0,0' userText2 = 'Poweo' userText1 =" ' UDDI EUC + ' openForTimeEntry = 'true' "
    emailAddress = '[email protected]' LastName As String = "Kounde" isRole = "false" trackMode = "2" >
    < Calendar CalendrierBase = 'FRANCE' >
    < days >
    < / days >
    < / calendar >
    < curve name = 'availability' type = '1' default = "1.0" / >
    < / PoolResource >
    < / PoolResources >
    <>projects
    < project
    UID = "AJWF [& quot;" / A_ "'? & quot; GW:R'! '''? "P" ' 0 "baseTime =" "2008-10 - 02T 17: 33:10" closed = 'false' "
    Active = 'true' approved = 'false' userText2 = 'Poweo' userText1 = '& amp; "D EUC +" start = "" 2008-10 - 02T 08: 00:00 ""
    openForTimeEntry = 'true' format = '0' trackMode = '2' lastUpdatedDate = "" 2009-03 - 09 T 17: 25:03 ""
    "baseFinish =" "2008-10 - 02T 17: 00:00" end = "2012-12 - 31 T 17: 00:00 ' baseStart =" "2008-10 - 02 T 08: 00:00" "
    priority = "10" finishImposed = "true" cpmType = "0" name = 'ID-ID-Poweo recipe' startImposed = 'false '.
    program = 'false' lastUpdatedBy = "lletaill" >
    baseline <>
    < baseline
    Description = "P.Dupuis pilgrims © ation" code = 'Main' name = "ReferencePrincipale20081002" "
    current = "true" / >
    < / basic lines >
    < resources >
    < resource
    requestStatus = '1' lastUpdatedBy = "JRATAJAK" resourceID = "lletaill" openForTimeEntry = "true".
    lastUpdatedDate = "" 2009-01 - 06 T 16: 10:59 "bookingStatus ="15">"
    < curve name = "allowance" type = "1" default = "1.0" / >
    < curve name = 'rate' type = '1' default = "1.0" >
    <>segments
    "< start of the segment =" ' 1900-01 - 01 T 00: 00:00 "Finish =" 2008-10 - 02 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    "< start of the segment =" "2008-10 - 02T 00: 00:00" end = "2010-01 - 01 T 00: 00:00" rate = "0.008880555555555555" >
    < / segment >
    "< start of the segment =" "2010-01 - 01 T 00: 00:00" Finish = "2013-01 - 01 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    "< start of the segment =" "2013-01 - 01 T 00: 00:00" Finish = "2079-06 - 03 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    < / segments >
    < / curve >
    < / resource >
    < resource
    requestStatus = '1' lastUpdatedBy = "EDAUDIFF" resourceID = "EDAUDIFF" availTo = "" 2009-02 - 14 T 00: 00:00 ""
    openForTimeEntry = "false" lastUpdatedDate = "" 2009-02 - 16 T 15: 09:50 "bookingStatus ="15">"
    < curve name = "allowance" type = "1" default = "1.0" / >
    < curve name = 'rate' type = '1' default = "1.0" >
    <>segments
    "< start of the segment =" ' 1900-01 - 01 T 00: 00:00 "Finish =" 2008-10 - 02 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    "< start of the segment =" "2008-10 - 02T 00: 00:00" end = "2010-01 - 01 T 00: 00:00" rate = "0.008880555555555555" >
    < / segment >
    "< start of the segment =" "2010-01 - 01 T 00: 00:00" Finish = "2013-01 - 01 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    "< start of the segment =" "2013-01 - 01 T 00: 00:00" Finish = "2079-06 - 03 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    < / segments >
    < / curve >
    < BaselineDetails >
    < BaselineDetail
    "Start =" "2008-10 - 02T 08: 00:00 ' baselineCode = 'Main' Finish =" 2008-10 - 02 T 17: 00:00.
    costSum = "1283.2" usageSum = "144000.0" duration = "1.0" >
    < curve name = "costCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "0.04455555555555556" / >
    < / segments >
    < / curve >
    < curve name = "usageCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "5.0" / >
    < / segments >
    < / curve >
    < / BaselineDetail >
    < / BaselineDetails >
    < / resource >
    < resource
    requestStatus = '1' lastUpdatedBy = "JRATAJAK" resourceID = "JZARIOUH" availTo = "" 2010-12 - 31 T 17: 00:00 ""
    "openForTimeEntry ="true"availFrom =" "2009-01 - 05 T 00: 00:00" lastUpdatedDate = "2009-01 - 05 T 15: 19:32.
    bookingStatus = "15" >
    < curve name = "allowance" type = "1" default = "1.0" / >
    < curve name = 'rate' type = '1' default = "1.0" >
    <>segments
    "< start of the segment =" ' 1900-01 - 01 T 00: 00:00 "Finish =" 2008-10 - 02 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    "< start of the segment =" "2008-10 - 02T 00: 00:00" end = "2010-01 - 01 T 00: 00:00" rate = "0.008880555555555555" >
    < / segment >
    "< start of the segment =" "2010-01 - 01 T 00: 00:00" Finish = "2013-01 - 01 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    "< start of the segment =" "2013-01 - 01 T 00: 00:00" Finish = "2079-06 - 03 T 00: 00:00 ' rate '0.0' = >
    < / segment >
    < / segments >
    < / curve >
    < / resource >
    < / resource >
    < task
    UID = "AJ; & apos; Y6'? 1_'' ' ? & quot; GW:R'! '''? ' "P" ' 0 "baseTime =" "2008-10 - 02T 17: 33:10" start = "2009-02 - 16 T 08: 00:00.
    proxy = 'false' critical = "false" status = '0' lastUpdatedDate = "" 2009-03 - 09 T 17: 25:03 "outlineLevel = '3'"
    "baseFinish =" "2008-10 - 02T 17: 00:00" end = "2009-02 - 16 T 17: 00:00 ' summary = 'false' baseStart =" "2008-10 - 02 T 08: 00:00" "
    baselineDuration = "1.0" milestone = "false" name = "RE7 - awareness" fixed = "false".
    Locked = 'false' key = 'false' lastUpdatedBy = "lletaill" percComp = "0,0" unexpected = "false" >
    <>assignments
    < assignment
    status = '0' lastUpdatedBy = "lletaill" actualWork = "0,0" ResourceID = "EDAUDIFF" start = "" 2009-02 - 16 T 08: 00:00 ""
    baselineWork = "144000.0" unplanned = "false" estPattern = "3" actualThrough = "" 2009-02 - 16 T 00: 00:00 ""
    «Finish = "" 2009-02 - 16 T 17: 00:00 "="144000.0"remainingWork lastUpdatedDate =" 2009-03 - 09 T 17: 25:03»
    estMax = "1.0" >
    < curve name = "basic" type '2' default = '0.0' = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "5.0" >
    < calendar >
    < days >
    < day dayOfWeek = 'SUN' isWorkDay = "false" / >
    < day dayOfWeek = 'MY' isWorkDay = "true" >
    < go >
    < Shift start = "08:00:00" complete ="12:00:00" / > "
    < Shift start = "13:00:00" complete ="17:00:00" / > "
    < / travel >
    < / day >
    < day dayOfWeek = 'SAT' isWorkDay = "false" / >
    < / days >
    < / calendar >
    < / segment >
    < / segments >
    < / curve >
    < BaselineDetails >
    < BaselineDetail
    "Start =" "2008-10 - 02T 08: 00:00 ' baselineCode = 'Main' Finish =" 2008-10 - 02 T 17: 00:00.
    costSum = "1283.2" usageSum = "144000.0" duration = "1.0" >
    < curve name = "costCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "0.04455555555555556" / >
    < / segments >
    < / curve >
    < curve name = "usageCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "5.0" / >
    < / segments >
    < / curve >
    < / BaselineDetail >
    < / BaselineDetails >
    < / assignment >
    < / assignments >
    < BaselineDetails >
    < BaselineDetail
    "Start =" "2008-10 - 02T 08: 00:00 ' baselineCode = 'Main' Finish =" 2008-10 - 02 T 17: 00:00.
    costSum = "1283.2" usageSum = "144000.0" duration = "1.0" >
    < curve name = "costCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "0.04455555555555556" / >
    < / segments >
    < / curve >
    < curve name = "usageCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "5.0" / >
    < / segments >
    < / curve >
    < / BaselineDetail >
    < / BaselineDetails >
    < / task >
    < / tasks >
    < BaselineDetails >
    < BaselineDetail
    "Start =" "2008-10 - 02T 08: 00:00 ' baselineCode = 'Main' Finish =" 2008-10 - 02 T 17: 00:00.
    costSum = "2566.4" usageSum = "288000.0" duration = "1.0" >
    < curve name = "costCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "0.08911111111111111" / >
    < / segments >
    < / curve >
    < curve name = "usageCurve" type = "2" default "0,0" = >
    <>segments
    "< start of the segment =" "2008-10 - 02T 08: 00:00" end = "2008-10 - 02 T 17: 00:00" rate = "10.0" / >
    < / segments >
    < / curve >
    < / BaselineDetail >
    < / BaselineDetails >
    < / project >
    < / project >
    < / WORKBENCH_PROJECT >

    -------------------------------
    XSD is (it was automatically generated by the "Stylus Studio" tools... so I changed a few stuffs up):
    <? XML version = "1.0" encoding = "UTF-8"? >
    < xsd: Schema targetNamespace = "http://www.oracle.com/xsd/projet.xsd."
    container = "http://www.w3.org/2001/XMLSchema" elementFormDefault = "unqualified".
    xmlns:xdb = "http://xmlns.oracle.com/xdb".
    xdb:storeVarrayAsTable = 'true '.
    xmlns = "http://www.oracle.com/xsd/projet.xsd" >
    < xsd: element name = "WORKBENCH_PROJECT" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT ref = "BaseCalendars" / >
    < xsd: ELEMENT ref = "PoolResources" / >
    < xsd: ELEMENT ref = "Projects" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "BaseCalendars" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Calendar" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "PoolResources" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "PoolResource" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "PoolResource" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT ref = "Calendar" / >
    < xsd: ELEMENT ref = "Curve" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = "category" / >
    < xsd: attribute name = "emailAddress" / >
    < xsd: attribute name = "employmentType" use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "FirstName" type = "xsd:NCName" / >
    < xsd: attribute name = "full name" use = "required" / >
    < xsd: attribute name = "hireDate" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "inputTypeCode" type = "xsd: Integer" / >
    < xsd: attribute name = "isActive" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "isExternal" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "isRole" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "lastName" use = "required" / >
    < xsd: attribute name = "managerUserName" type = "xsd:NCName" / >
    < xsd: attribute name = "ADO" use = "required" type = "xsd:NCName" / >
    < xsd: attribute name = use "openForTimeEntry" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "Resource ID" use = "required" / >
    < xsd: attribute name = "resourceType" use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = use "trackMode" = "required" type = "xsd: Integer" / >
    < xsd: attribute name = use "userFlag1" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "userFlag2" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "userNumber1" type = "xsd: Decimal" / >
    < xsd: attribute name = "userNumber2" type = "xsd: Decimal" / >
    < xsd: attribute name = "userText1" / >
    < xsd: attribute name = "userText2" type = "xsd:NCName" / >
    < xsd: attribute name = "userText3" type = "xsd:NCName" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Projects" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT ref = "Project" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Project" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT ref = "Baselines" / >
    < xsd: ELEMENT ref = "Resources" / >
    < xsd: ELEMENT ref = "Tasks" / >
    < xsd: ELEMENT ref = "BaselineDetails" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = use "UID" = "required" / >
    < xsd: attribute name = "active" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "authorized" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "baseFinish" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "baseStart" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "baseTime" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "closed" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "cpmType" = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "finishImposed" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use 'format' = "required" type = "xsd: Integer" / >
    < xsd: attribute name = use "lastUpdatedBy" = "required" type = "xsd:NCName" / >
    < xsd: attribute name = "lastUpdatedDate" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "name" use = "required" / >
    < xsd: attribute name = use "openForTimeEntry" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "priority" use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "programs" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "startImposed" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "trackMode" = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "userText1" use = "required" / >
    < xsd: attribute name = use "userText2" = "required" type = "xsd:NCName" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Base lines" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT ref = "Baseline" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "basic" >
    < xsd: complexType >
    < xsd: attribute name = "code" use = "required" type = "xsd:NCName" / >
    < xsd: attribute name = "use" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "description" use = "required" / >
    < xsd: attribute name = "name" use = "required" type = "xsd:NCName" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Resources" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Resource" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Resource" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Curve" / >
    < xsd: ELEMENT minOccurs = '0' ref = "BaselineDetails" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = "availFrom" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "availTo" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "bookingStatus" = "required" type = "xsd: Integer" / >
    < xsd: attribute name = use "lastUpdatedBy" = "required" type = "xsd:NCName" / >
    < xsd: attribute name = "lastUpdatedDate" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "openForTimeEntry" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = 'requestStatus' use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "Resource ID" use = "required" type = "xsd:NCName" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Tasks" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Task" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Task" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = '0' ref = "Assignments" / >
    < xsd: ELEMENT minOccurs = '0' ref = "BaselineDetails" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = use "UID" = "required" / >
    < xsd: attribute name = "baseFinish" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "baseStart" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "baseTime" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "baselineDuration" type = "xsd: Decimal" / >
    < xsd: attribute name = "category" / >
    < xsd: attribute name = "critical" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use 'fixed' = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use 'key' = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = use "lastUpdatedBy" = "required" type = "xsd:NCName" / >
    < xsd: attribute name = "lastUpdatedDate" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use 'locked' = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "milestone" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "name" use = "required" / >
    < xsd: attribute name = "outlineLevel" use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = use "percComp" = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = using the "proxy" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "status" use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "summarized" use = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "unexpected" use = "required" type = "xsd: Boolean" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Assignments" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Assignment" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Assignment" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = "0" maxOccurs = "unbounded" ref = "Curve" / >
    < xsd: ELEMENT minOccurs = '0' ref = "BaselineDetails" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = use "actualThrough" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "actualWork" = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = "baselineWork" type = "xsd: Decimal" / >
    < xsd: attribute name = use "estMax" = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = use "estPattern" = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "Finish" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "lastUpdatedBy" = "required" type = "xsd:NCName" / >
    < xsd: attribute name = "lastUpdatedDate" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "pendActSum" type = "xsd: Decimal" / >
    < xsd: attribute name = "pendEstSum" type = "xsd: Decimal" / >
    < xsd: attribute name = use "remainingWork" = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = "Resource ID" use = "required" type = "xsd:NCName" / >
    < xsd: attribute name = "DΘmarrer" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "status" use = "required" type = "xsd: Integer" / >
    < xsd: attribute name = "unexpected" use = "required" type = "xsd: Boolean" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Calendar" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = '0' ref = 'Days' / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = "CalendrierBase" / >
    < xsd: attribute name = "lastUpdatedBy" type = "xsd:NCName" / >
    < xsd: attribute name = "lastUpdatedDate" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "name" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Days" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = "0" maxOccurs = "unbounded" ref = "Day" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Day" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = '0' ref = "Travel" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = "dayOfWeek" type = "xsd:NCName" / >
    < xsd: attribute name = "Finish" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "isWorkDay" = "required" type = "xsd: Boolean" / >
    < xsd: attribute name = "DΘmarrer" type = "xsd:NMTOKEN" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Travel" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Shift" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Shift" >
    < xsd: complexType >
    < xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Curve" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = '0' ref = "Segments" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = "default" use = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = "name" use = "required" type = "xsd:NCName" / >
    < xsd: attribute name = use "enter" = "required" type = "xsd: Integer" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Segments" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Segment" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "Segment" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT minOccurs = '0' ref = "Calendar" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "rate" use = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "BaselineDetails" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT ref = "BaselineDetail" / >
    < / xsd: SEQUENCE >
    < / xsd: complexType >
    < / xsd: element >
    < xsd: element name = "BaselineDetail" >
    < xsd: complexType >
    < xsd: SEQUENCE >
    < xsd: ELEMENT maxOccurs = "unbounded" ref = "Curve" / >
    < / xsd: SEQUENCE >
    < xsd: attribute name = use "baselineCode" = "required" type = "xsd:NCName" / >
    < xsd: attribute name = use "costSum" = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = "duration" use = "required" type = "xsd: Decimal" / >
    < xsd: attribute name = "complete" use = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = "Use DΘmarrer" = "required" type = "xsd:NMTOKEN" / >
    < xsd: attribute name = use "usageSum" = "required" type = "xsd: Decimal" / >
    < / xsd: complexType >
    < / xsd: element >
    < / xsd: Schema >


    ---------------------------
    Here is the procedure for registration of the scheme and rename XMLTYPE tables:
    PROCEDURE install_schema (p_schema IN VARCHAR2)
    IS

    l_res BOOLEAN;
    l_nested_table_name VARCHAR2 (50);
    l_parent_table_name VARCHAR2 (50);
    l_iot_index_name VARCHAR2 (50);
    l_continue BOOLEAN: = TRUE;

    BEGIN

    BEGIN
    -load XSD/XML in the table
    sipmo_XML_utils.charger_xml ('XSD_DIR', p_schema);
    EXCEPTION
    WHILE OTHERS THEN
    dbms_output.put_line (' error loading of in, err ='|) SQLERRM);
    l_continue: = FALSE;
    END;

    IF l_continue = TRUE
    THEN
    -Diagram of the removal
    BEGIN
    dbms_output.put_line ('deleteSchema in progress...) ');
    -"projet.xsd".
    () DBMS_XMLSCHEMA.deleteSchema
    SCHEMAURL = > 'http://www.oracle.com/xsd/ ' | p_schema
    , DELETE_OPTION = > dbms_xmlschema. DELETE_CASCADE_FORCE);
    EXCEPTION
    WHILE OTHERS THEN
    dbms_output.put_line (' ko deleteSchema ' |) SQLERRM);
    NULL;
    END;
    END IF; -l_continue = TRUE

    -Removal of resources:
    IF l_continue = TRUE
    THEN
    IF (dbms_xdb.existsResource ('/ public /'| p_schema))
    THEN
    DBMS_XDB.deleteResource ('/ public /'| p_schema);
    END IF;
    l_res: = dbms_xdb.createResource ('/ public /'| p_schema, BFILENAME ('XSD_DIR', p_schema));

    IF l_res
    THEN
    dbms_output.put_line ('createresource OK');
    ON THE OTHER
    dbms_output.put_line ('createresource KO');
    END IF;
    END IF; -l_continue = TRUE

    -Schema of creation of the:
    IF l_continue = TRUE
    THEN
    BEGIN
    dbms_output.put_line ('REGISTERSCHEMA in progress...) ');
    DBMS_XMLSCHEMA. REGISTERSCHEMA)
    SCHEMAURL = > 'http://www.oracle.com/xsd/ ' | p_schema
    , SCHEMADOC = > BFILENAME ('XSD_DIR', p_schema)
    , CSID = > NLS_CHARSET_ID ('AL32UTF8')
    local = > TRUE
    , genTypes = > TRUE
    , genBean = > FALSE
    genTables = > TRUE);

    EXCEPTION
    WHILE OTHERS THEN
    dbms_output.put_line (' ko REGISTERSCHEMA ' |) SQLERRM);
    l_continue: = FALSE;
    END;
    END IF; -l_continue = TRUE
    COMMIT;

    IF p_schema = "projet.xsd".
    AND l_continue = TRUE
    THEN
    dbms_output.put_line (' XML rename tables ' | p_schema);

    -First... the enventuelle dropper table main "WORKBECH_PROJECT."
    BEGIN
    EXECUTE IMMEDIATE ' drop table 'WORKBENCH_PROJECT "";
    EXCEPTION
    WHILE OTHERS THEN
    NULL;
    END;

    -Resource table
    Select table_name
    in l_nested_table_name
    of user_nested_tables
    where parent_table_column = ' "XMLDATA". "" "" PoolResources '. "" PoolResource' '
    and parent_table_name like '% WORKBENCH_PROJECT ';

    EXECUTE IMMEDIATE "Rename" ' | "" l_nested_table_name | "" "to PROJET_RESSOURCES ';

    Select index_name
    in l_iot_index_name
    from user_indexes
    where table_name = 'PROJET_RESSOURCES '.
    and index_type = 'IOT - TOP';

    Index of IMMEDIATE'alter EXECUTE ' ' |. ' l_iot_index_name |' "and rename it PROJET_RESSOURCES_I1';

    -Table projects/tasks
    Select table_name
    in l_nested_table_name
    of user_nested_tables
    where parent_table_column = ' "XMLDATA". "Projects '." "Project '." "" Task"". "" The task""
    and parent_table_name like '% WORKBENCH_PROJECT ';

    EXECUTE IMMEDIATE "Rename" ' | "" l_nested_table_name | "" "to PROJET_TACHES ';

    Select index_name
    in l_iot_index_name
    from user_indexes
    where table_name = 'PROJET_TACHES '.
    and index_type = 'IOT - TOP';

    EXECUTE IMMEDIATE ' alter index ' ' |. ' l_iot_index_name |' "and rename it PROJET_TACHES_I1';

    -Table of the project/tasks/Activities and (+ main table)
    Select table_name, parent_table_name
    in l_nested_table_name
    l_parent_table_name
    of user_nested_tables
    where parent_table_column = ' "XMLDATA". "Projects '." "Project '." "" "" BaselineDetails '. "" "" "BaselineDetail '." " Curve"'
    and parent_table_name like '% WORKBENCH_PROJECT ';

    EXECUTE IMMEDIATE "Rename" ' | "" l_nested_table_name | "" "to PROJET_ACTIVITES ';

    Select index_name
    in l_iot_index_name
    from user_indexes
    where table_name = 'PROJET_ACTIVITES '.
    and index_type = 'IOT - TOP';

    EXECUTE IMMEDIATE ' alter index ' ' |. ' l_iot_index_name |' "and rename it PROJET_ACTIVITES_I1';

    -Main table WORKBENCH_PROJECT
    EXECUTE IMMEDIATE "Rename" ' | "" l_parent_table_name | "" "to WORKBENCH_PROJECT ';


    dbms_output.put_line ('rename XML tables... end');
    ON THE OTHER
    dbms_output.put_line (' rename XML tables...) NOT DONE ");"
    END IF; -p_schema = "projet.xsd".

    END install_schema;


    ---------------------------------------
    Here is the procedure of inserting data into XMLTYPE table (where I get the error)

    * insert into WORKBENCH_PROJECT values (xmltype (bfilename('XML_DIR','P21002635_2.xml'), nls_charset_id ('AL32UTF8'))); *

    + In my idea, I think I should load the full XML in my table XMLTYPE WORKBENCH_PROJECT... +.
    and more and then interrogate him with better performance... more

    --------------------------------------

    Note that the same XML file is already loaded into a table containing an XMLTYPE column...
    So, I really wonder if I need to do both?

    ----------------------------------------

    In any case, I hope that you will be able to help me... and that my explanation is clear...

    Thanks in advance,
    Olivier

    Oliver

    I don't know where you got the impression that I said that the DOM would be better. It will be definitely worse. The only advantage of the evaluation of DOM based (or functional) is that it can handle a much wider range of XQuery and XPath expressions. However there is nothing in what I saw in your examples the SQL execution path is not be be able to manage the only way you get the performance you need is to get the work of path of execution of SQL. To get the job of re - write, you will need to avoid wildcards and get the fix for the bug.

    I hate to disappoint you, but your XML schema is actually quite simple, it is certainly not in a class, that I would not complex, for recording results in a hierarchical structure very simple, unique, with 42 nested tables, if you want to see an example of something I would consider as complex search the Web for the FpML or NIEM schemas , recording these patterns result in recursive structures with multiple nested tables 1000!

    I see nothing in your XML schema that would make the use of wildcard characters required (with the exception of running in this bug). For tasks and Instance/tasks / * are identical in your use case as a tasks element can contain one or more elements of task, not do I see anything that would make me think that some how transform XML CSV would make it easier to load.

    My number 1 recommendation is to apply the 10.2.0.4.0 patch or upgrade to GR 11, 1 material. According to your deadlines, you can also consider 11 GR 2 beta.

    -Mark

    Published by: mdrake on April 10, 2009 14:28

  • trimmed values when inserting in the column

    Hi Experts,
    I tried to insert the '% t & U' value in a column in oracle table database, but the value '% t' is getting inserted into the column. string once % skiped. Can someone tell me why this happened?

    Thank you
    SQL> create table test_string(str varchar2(10));
    
    Table created.
    
    SQL> insert into test_string values('T%&U' );
    Enter value for u:
    old   1: insert into test_string values('T%&U' )
    new   1: insert into test_string values('T%' )
    
    1 row created.
    
    SQL> select * from test_string;
    
    STR
    ----------
    T%
    
    SQL> set define off
    SQL> insert into test_string values('T%&U' );
    
    1 row created.
    
    SQL> select * from test_string;
    
    STR
    ----------
    T%
    T%&U
    
  • error ORA-03113 with XMLTABLE inside the subquery or view

    I get ORA-03113 error if I use a XMLTABLE result within one subquery of another query (if XMLTABLE inline or view). Code below to reproduce that - simplified and now rather meaningless - but produces the same error. Someone at - he seen this error re. XMLTABLE or know bugs in metalink on that? I couldn't find anything. I'll have to use deprecated table (xmlsequence) instead, which does not receive this error.


    -TABLE DROP TEST
    CREATE TABLE TEST (ID number (10), CUST_REF varchar2 (50 char), XMLDATA XMLTYPE);

    INSERT INTO TEST (ID, CUST_REF, XMLDATA) VALUES (1, 'XYZ',
    XMLTYPE ("<?") XML version = "1.0" encoding ="utf-16"? >
    < TESTXML
    xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance".
    xmlns = "urn: ABC - 123:TESTXML" >
    < collection >
    < TRANSACTION_COLLECTION >
    < TRANSACTION >
    < RECORD_ID > 1 < / RECORD_ID >
    < TRANSACTION_ID > 7791786 < / TRANSACTION_ID >
    < AMOUNT > 335 < / AMOUNT >
    < TYPE > I < / TYPE >
    DR < DC > < /DC >
    < / TRANSACTION >
    < / TRANSACTION_COLLECTION >
    < / collections >
    ((< / TESTXML > '));

    COMMIT;

    CREATE VIEW TEST_XMLVIEW
    AS
    SELECT
    ID,
    CUST_REF,
    xmltbl. RECORD_ID,
    xmltbl. TRANSACTION_ID,
    xmltbl. AMOUNT,
    xmltbl. TYPE,
    xmltbl. DC
    OF THE TEST,
    XMLTable (XMLNamespaces (DEFAULT "urn: ABC - 123:TESTXML'"),)
    "/ TESTXML/collections/TRANSACTION_COLLECTION/TRANSACTION" TEST PASSING. XMLDATA
    COLUMNS
    "RECORD_ID" number (10) path "RECORD_ID."
    "TRANSACTION_ID" VARCHAR (200 CHAR) PATH "TRANSACTION_ID"
    "DC' VARCHAR (200 CHAR) PATH"DC. "
    "TYPE' VARCHAR (200 CHAR) PATH"TYPE. "
    ('AMOUNT' NUMBER (38.8) PATH 'QUANTITY')
    AS xmltbl;


    WITH SUM_AMOUNTS (ID, CUST_REF, SUM_1, SUM_2, SUM_3)
    AS
    (SELECT ID, CUST_REF, FLAT AS FLAT AS SUM_2, FLAT + FLAT AS SUM_3, SUM_1)
    OF TEST_XMLVIEW
    GROUP BY ID, CUST_REF)
    Select
    ID,
    CUST_REF,
    SUM_1,
    SUM_2,
    SUM_3
    of SUM_AMOUNTS;


    Version information:
    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE Production 11.2.0.2.0
    AMT for 64-bit Windows: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    Someone at - he seen this error re. XMLTABLE or know bugs in metalink on that? I couldn't find anything.

    Really?

    Go to the directory path and look for the relevant trace or incident file.
    On my system, I can see something like this:

    ORA-07445: exception encountered: core dump [evaopn3()+656] [ACCESS_VIOLATION] [ADDR:0x0] [PC:0x234A5B6] [UNABLE_TO_READ] []
    

    Copy / paste this line into the ORA-00600/ORA-07445 on My Oracle Support search tool and search for your version.
    Read this article:

    * ORA-7445 (evaopn3) [860969.1 ID] *.

    and at the bottom of the page, among the associated bugs known, this one:

    Bug 12724375 : ORA-7445 [evaopn3] XQuery with GROUP BY *.

  • ORA - 01461:can bind a LONG value only for insert in a LONG column. After upgrade to 11g

    After update, oracle 11g, we get the system error when you try to insert the text string in the NCLOB type column.

    ORA - 01461:can bind a LONG value only for insert in a LONG column.

    This has not happened on an earlier version of Oracle.

    I did some testing and found that, if a string more then 2000 we get this error.

    How to solve this problem?

    Thank you

    I found a solution. I had to update ODP.NET to 2.112.1.0 version.

  • table name not valid error when inserting values into a table

    I use the following statement to insert values into a table:

    curs. Execute ("INSERT INTO _ * '%s' * _ VALUES ((SELECT MAX (REC_ID) + 1 OF GSAP_MSG_IN), (SELECT MAX (gsap_msg_id) + 1 OF GSAP_MSG_IN), 'SHELLSAP', sysdate, '%s', EMPTY_BLOB(), 1, SYSDATE, EMPTY_BLOB (), SYSDATE)" %(*table_name*,file_extension)) ")

    whence table_name the following statement

    table_name = ' config.staging_db_tablesNames ['in_msgs]

    as I created a configuration file for all parameters that can change. The value of the table in the audit using a print command is correctly, but when put in the query above to run the insert statement gives an error. The following is the summary of comprehensive performance where you can see the table name as

    $ python gsapscnr.py
    Vote for the data files in/home/mh/inbox /...

    GSAP_MSG_IN
    Traceback (most recent call changed):
    File "gsapscnr.py", line 147, in it?
    poll_for_data()
    File "gsapscnr.py", line 86, in poll_for_data
    Sorter = load_details_first)
    File "gsapscnr.py", line 42, survey
    curs. Execute ("INSERT INTO '%s' VALUES ((SELECT MAX (REC_ID) + 1 OF GSAP_MSG_IN), (SELECT MAX (gsap_msg_id) + 1 OF GSAP_MSG_IN), 'SHELLSAP', sysdate, '%s', EMPTY_BLOB(), 1, SYSDATE, EMPTY_BLOB (), SYSDATE)" %(table_name,file_extension)) ")
    cx_Oracle.DatabaseError: ORA-00903: invalid table name

    Can anyone help with this problem please. I'm passing the value of the table in a bad way. Also if anyone can suggest a good tutorial for paythong programming using cx_Oracle.

    Concerning

    Print the SQL string that you establish, cut and paste it this output in SQL * more and see if it runs. This may show you that you should remove the single quotes around the name of the table %s in the Python file.

  • error when inserting the values too much or miss comma

    Hai All

    during the insertion, I got an error when inserting

    I have a table called T1 and declared as date I need to insert the current date and time in this column


    So I converted a varchar column and concat with time and iam trying to insert when inserting I got error


    insert into dail_att (respondent) values (to_date (to_char (attend_date, 'ddmmyyyy') |)) ("0815',"ddmmyyyy hh24");


    Concerning

    Srikkanth.M

    Hello
    Please let us know

    Desc dail_att;
    

    and the sample values in

    attend_date
    

    (There is also a ')' missing in your SQL, correct SQL would be

    INSERT INTO DAIL_ATT
                (INTIME
                )
         VALUES (TO_DATE (TO_CHAR (ATTEND_DATE, 'ddmmyyyy') || '0815',
                          'ddmmyyyy hh24'
                         )
                );
    

    * 009 *.

    Published by: 009 on March 18, 2010 21:23

  • "case when not m [1] is present then" outputs ORA-03113

    I find that ' case when not m [1] is present then ' outputs ORA-03113:
    Why?
    SQL> select * from v$version;
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    select * from dual model
     dimension by(0 as d)
     measures(1 as m)
     rules(
     m[any] = case when not m[1] is present then 1 end);
    ORA-03113:
    Below a is the alterNative solution.
    select * from dual model
     dimension by(0 as d)
     measures(1 as m)
     rules(
     m[any] = case when presentv(m[1],1,0) = 0 then 3 end);
    
    D  M
    -  -
    0  3

    [Bug 6530708| https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_id=6530708&p_database_id=BUG]

    SY.

  • When inserted null value should not

    Hello:

    I installed my application on apex.oracle.com. I hope someone can help me with a problem. I'm having is with an agenda: P17_APPLICATION_KEY. When I click on my "submit" button, the insert statement is insert a null value into this field when it should not. When you select an organization, you will see the application key in the column of the report.

    The application number is 48367.
    The page number is 17.
    The username is TestUser.
    The password is test.

    Tables and data are also configured. If you need to look at the charts, the schema is HCB.

    Can someone take a look at my application and help me understand why the value of application_key which is in the report is not displayed in my table, HISA_AGREEMENTS_DOC?

    Thank you very much for the help.

    Hello

    I had a glance through your application, and even if you are referring to P17_application_key in your insert statement, if you look at your state of session on page 17, you will see that p17_application_key is infact null.

    In your code, the page element is set to the value of the database, but it is not really filled from anywhere.

    You can change the report "APPLICATION_KEY" of "Standard report column" column to "Display text (saved state)" and who then reference it in your insert instead of your page statement, article P17_application_key.

    -L' Roamer.

  • ORA-43856 when using DBMS_LOB. FRAGMENT_DELETE

    BANNER
    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE Production 11.2.0.3.0
    AMT for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production

    We are pulling a CLOB value on a table and then trying to shave the first line using DBMS_LOB. FRAGMENT_DELETE. However, once reached this call, Oracle throws the error: ORA-43856: not supported for operation SECUREFILE LOB LOB type.

    I was unable to find anything on the web, although I see that Dan Morgan is facing problems with this call as well (Oracle 12 c DBMS_LOB demos).

    "Clearly there is a problem here so I open an SR to MOS (February 5, 2014) '

    I don't see any solution (or any what section of the knowledge base of SUPPORT. ORACLE.COM).

    Here is a code snippet:

    FUNCTION PROCESS_UPLOADED_FILE (ac_UploadedFileID IN SPAN_PARAMETER_WEB_UPLOAD. UPLOAD_ID % TYPE ( )

    RETURN VARCHAR2

    IS

    CURSOR lcsr_GetFilePayload IS

    SELECT FILE_PAYLOAD

    OF SPAN_PARAMETER_WEB_UPLOAD

    WHERE UPLOAD_ID = ac_UploadedFileID

    UPDATE OF THE FILE_PAYLOAD;

    lclb_FilePayload CLOB.

    ln_ReturnPos NUMBER: = - 1;

    ln_StartPos NUMBER: = 1;

    BEGIN

    OPEN lcsr_GetFilePayload.

    SEEK lcsr_GetFilePayload INTO lclb_FilePayload;

    CLOSE Lcsr_GetFilePayload;

    -Ignore the first line because it's a header

    ln_ReturnPos: = DBMS_LOB. InStr (lob_loc = > lclb_FilePayload,)

    model = > Chr (10),

    offset = > ln_StartPos)-1;

    ln_StartPos: = (ln_ReturnPos + 2);

    DBMS_LOB. FRAGMENT_DELETE (lclb_FilePayload, 1, ln_StartPos);

    -ERROR EXERCISE HERE

    ...

    END;

    Someone has some ideas (or workarounds)?

    Thank you

    -Joe

    We are pulling a CLOB value on a table and then trying to shave the first line using DBMS_LOB. FRAGMENT_DELETE. However, once reached this call, Oracle throws the error: ORA-43856: not supported for operation SECUREFILE LOB LOB type.

    The error seems clear enough to me.

    You can perform operations of FRAGMENT if the CLOB using no storage SECUREFILE.

    By default, LOB columns are created as BASICFILE LOB.

    You are most likely in this case. You can check for your table using, for example, DBMS_METADATA. GET_DDL.

    Example of work using SECUREFILE:

    SQL > create table (test_clob)

    integer id 2

    3, doc clob

    4)

    craft store 5 (doc) as navigation;

    Table created.

    SQL > insert into test_clob values (1, to_clob ('head' |)) Chr (10) | ((' ABC'));

    1 row inserted.

    SQL > commit;

    Validation complete.

    SQL > select doc from test_clob where id = 1;

    DOC

    --------------------------------------------------------------------------------

    head

    ABC

    SQL >

    SQL > declare

    2

    slider 3 c is

    4. Select doc

    test_clob 5

    6 where id = 1

    7 for the update;

    8

    9 v_doc clob.

    number of 10 v_returnpos: = - 1;

    Number 11 v_startpos: = 1;

    12

    13. begin

    14

    Open from 15 c;

    16 fetch c into v_doc;

    17 close c;

    18

    19. ignore the first line because it's a header

    20 v_returnpos: = dbms_lob.instr (lob_loc-online v_doc

    21, model-online Chr (10)

    22, offset-online v_startpos).

    23

    24 dbms_lob.fragment_delete (v_doc, v_returnpos, 1);

    25

    26 end;

    27.

    PL/SQL procedure successfully completed.

    SQL > select doc from test_clob where id = 1;

    DOC

    --------------------------------------------------------------------------------

    ABC

    Is therefore:

    -Re-create the table using SECUREFILE (needs a time out)

    -migrate columns LOB using DBMS_REDEFINITION

    Or, if you cannot perform all these operations, the solution is to copy the data after the first line in an another CLOB and to update the table with the new.

  • ERROR "ora-01422" during insertion in the table?

    Hello

    I have created the dynamic action of PL/SQL to insert data but founded by page_item

    
    
     declare 
    x_found_pages number;
    x_auth_id number;
    x_user_id number;
     begin
     x_user_id := :P41_USR_ID; -- this is my page_item _____ successful run When change it to number value .. !
    
    
    
    
          select count(V_APP_PAGES.PAGE_ID) into x_found_pages
          from V_AUTH_DTL V_AUTH_DTL,V_APP_PAGES V_APP_PAGES 
          where V_AUTH_DTL.PAGE_ID!=V_APP_PAGES.PAGE_ID
          and  V_AUTH_DTL.USR_ID = x_user_id;
       
          select T_AUTH.ID into x_auth_id 
          from T_AUTH_DTL T_AUTH_DTL,T_AUTH T_AUTH 
          where T_AUTH_DTL.AUTH_ID=T_AUTH.ID
          and T_AUTH.USR_ID = x_user_id;
    
    
    -- Checking...? 
      if x_found_pages > 0 then
    
            for i in (select V_APP_PAGES.PAGE_ID
               from V_AUTH_DTL V_AUTH_DTL,V_APP_PAGES V_APP_PAGES 
               where V_AUTH_DTL.PAGE_ID!=V_APP_PAGES.PAGE_ID
               and  V_AUTH_DTL.USR_ID = x_user_id)
        
      loop
      insert into T_AUTH_DTL (AUTH_ID,PAGE_ID) values (x_auth_id,i.PAGE_ID);
      end loop;
    
        end if;
    
     end;
    
    
    
    

    Please help me to avoid the ERROR "ora-01422" when running code in the dynamic action...

    Thank you...

    AMR Abdeen wrote:

    I have created the dynamic action of PL/SQL to insert data but founded by page_item

    1. declare
    2. number of x_found_pages;
    3. number of x_auth_id;
    4. number of x_user_id;
    5. Start
    6. x_user_id: =: P41_USR_ID; -It is my page_item _ successfully performed when change to value the number...!
    7. SELECT count (V_APP_PAGES. Page_id) in x_found_pages
    8. of V_AUTH_DTL V_AUTH_DTL, V_APP_PAGES V_APP_PAGES
    9. where V_AUTH_DTL. PAGE_ID! = V_APP_PAGES. PAGE_ID
    10. and V_AUTH_DTL. USR_ID = x_user_id;
    11. Select T_AUTH.ID from x_auth_id
    12. of T_AUTH_DTL T_AUTH_DTL, T_AUTH T_AUTH
    13. where T_AUTH_DTL. AUTH_ID = T_AUTH.ID
    14. and T_AUTH. USR_ID = x_user_id;
    15. -Checking...?
    16. If x_found_pages > 0 then
    17. I'm in (select V_APP_PAGES. PAGE_ID
    18. of V_AUTH_DTL V_AUTH_DTL, V_APP_PAGES V_APP_PAGES
    19. where V_AUTH_DTL. PAGE_ID! = V_APP_PAGES. PAGE_ID
    20. and V_AUTH_DTL. USR_ID = x_user_id)
    21. loop
    22. insert into T_AUTH_DTL (AUTH_ID, PAGE_ID) values (x_auth_id, i.PAGE_ID);
    23. end loop;
    24. end if;
    25. end;

    Please help me to avoid the ERROR "ora-01422" when running code in the dynamic action...

    The error is explicit:

    ORA-01422: exact fetch returns more than number of lines

    Cause: The exact extraction specified number is less than the rows returned.

    Action: Rewrite the query or change the number of rows requested

    This would imply the query in line 16 as County dissociated in the previous one will always return only one row.

    Run

    select T_AUTH.ID into x_auth_id
    from T_AUTH_DTL T_AUTH_DTL,T_AUTH T_AUTH
    where T_AUTH_DTL.AUTH_ID=T_AUTH.ID
    and T_AUTH.USR_ID = :x_user_id
    

    in the workshop of SQL by using the P41_USR_ID value in the variable link to find out how many rows it returns.

    It is likely that the entire block can be replaced by a single INSERT statement. If you provide instructions CREATE TABLE, INSERT statements to create sample data and a clear definition of the requirements that we try to do.

    What is the point of the inclusion of tables aliases that are exactly the same as the names of the tables?

  • ORA-03113 end of file on communication channel error

    Hello

    I am trying to create a table that looks like the following:

    create table test as
    with a as
    (
    ..
    ),
    b as
    (
    ..),
    ab_percentage as
    (
    ..
    ),
    c as
    (
    ..
    ),
    d as
    (
    ..),
    cd_percentage as
    (
    ..
    ),
    e as
    (
    select * from ab_percentage UNION cd_percentage
    )
    select * from e;
    
    

    When I run the script, I get the following error:

    Oracle error: ORA-03113

    end of file on communication channel

    Cause: The connection between the Client and the process server was broken.

    Action: There was a communication error that requires further investigation. First, check for network problems and review the SQL * Net configuration. In addition, review the file alert.log for possible errors. Finally, a test to see if the server process is dead and if a trace file has been generated at the time of the failure.

    I use:

    TOAD for Oracle Base 11.5.1.2

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    PL/SQL Release 11.2.0.1.0 - Production

    CORE 11.2.0.1.0 Production

    AMT for Linux: Version 11.2.0.1.0 - Production

    NLSRTL Version 11.2.0.1.0 - Production

    Please help me understand this!

    Thank you!

    Hello

    2632048 wrote:

    Hello

    I am trying to create a table that looks like the following:

    1. create the test table
    2. with one also
    3. (
    4. ..
    5. ),
    6. b as
    7. (
    8. ..),
    9. ab_percentage as
    10. (
    11. ..
    12. ),
    13. c as
    14. (
    15. ..
    16. ),
    17. d as
    18. (
    19. ..),
    20. cd_percentage as
    21. (
    22. ..
    23. ),
    24. e as
    25. (
    26. Select * from ab_percentage UNION cd_percentage
    27. )
    28. Select * e;

    That has nothing to do with the problem of the ORA-03113, but what value is Sub question e add?

    Why can't let you the lines 23, 24, 25, 27 and 28 above, so that the request ends

    cd_percentage as

    (

    ...

    )

    Select * from ab_percentage UNION select * from cd_percentage;

    ?

  • Validate the XML column when inserting

    Hello

    I'm on 11 GR 2.

    I have a table

    create table root_table (id number, text xmltype);

    I tried to sign up:

    Start

    dbms_xmlschema.registerSchema ('test', xmltype)

    "' < xs: schema xmlns: XS ="http://www.w3.org/2001/XMLSchema"xmlns:xdb ="http://xmlns.oracle.com"elementFormDefault ="unqualified">

    < name XS: complexType 'RootType' = >

    < xs: SEQUENCE >

    < xs: element name = "Required" / >

    < xs: element name = "Énumération" >

    < xs:simpleType >

    < xs:restriction base = "XS: String" >

    < xs:enumeration value = 'A' / >

    < xs:enumeration value = 'B' / >

    < xs:enumeration value = 'C' / >

    < / xs:restriction >

    < / xs:simpleType >

    < / xs: element >

    < xs: element name = "MinLength" >

    < xs:simpleType >

    < xs:restriction base = "XS: String" >

    < xs:minLength value = "4" / >

    < xs:maxLength value = "20" / >

    < / xs:restriction >

    < / xs:simpleType >

    < / xs: element >

    < xs: element name = "MaxLength" >

    < xs:simpleType >

    < xs:restriction base = "XS: String" >

    < xs:minLength value = "1" / >

    < xs:maxLength value = "4" / >

    < / xs:restriction >

    < / xs:simpleType >

    < / xs: element >

    < xs: element name = "MaxOccurs" type = "xs: String" maxOccurs = "2" / >

    < xs: element name = "MinOccurs" minOccurs = '2' maxOccurs = "2" / >

    < xs: element name = "Optional" type = "xs: String" minOccurs = "0" / >

    < / xs: SEQUENCE >

    < / xs: complexType >

    < xs: element name = "root" type = "RootType" xdb:defaultTable = "ROOT_TABLE" / >

    ((< / xs: Schema > '));

    end;

    /

    table should point to the table where the XML column is default, I guess that

    is the 'root' in the same line a reference to the name of the xmltype column?

    Now - how do I ensure the XML I have insert in the column "change" is validated against the schema above?

    concerning

    Mette


    For both options, save the diagram with these options (you can substitute the url of course):

    Start

    () dbms_xmlschema.registerSchema

    schemaURL-online "test.xsd.

    schemaDoc-online xmltype (bfilename ('TEST_DIR', 'test.xsd'), 873)

    local-online true

    genTypes-online fake

    genTables-online fake

    enableHierarchy-online dbms_xmlschema. ENABLE_HIERARCHY_NONE

    options-online dbms_xmlschema. REGISTER_BINARYXML

    );

    end;

    /

    Then the #1 option:

    create table root_table)

    Identification number

    text xmltype

    )

    XMLType column can store as xml binary securefile

    XmlSchema 'test.xsd' element 'root '.

    ;

    SQL > insert into root_table values (1,

    2 xmlparse (document

    3'

    4

    5    A

    6 XXXX

    7 12345

    8

    9

    10

    11  ')

    (12);

    insert into root_table values (1,

    *

    ERROR on line 1:

    ORA-31061: error XDB: XML error event

    ORA-19202: an error has occurred in the processing of XML

    LSX-00222: "12345" is too long (maximum is 4)

    SQL >

    SQL > insert into root_table values (1,

    2 xmlparse (document

    3'

    4

    5    A

    6 XXXX

    7 1234

    8

    9

    10

    11 ')

    (12);

    insert into root_table values (1,

    *

    ERROR on line 1:

    ORA-31061: error XDB: XML error event

    ORA-19202: an error has occurred in the processing of XML

    LSX-00213: only 1 occurrences of the 'MinOccurs' particle, the minimum is 2

    SQL > insert into root_table values (1,

    2 xmlparse (document

    3'

    4

    5    D

    6 XXXX

    7 1234

    8

    9

    10

    11

    12  ')

    (13);

    insert into root_table values (1,

    *

    ERROR on line 1:

    ORA-31061: error XDB: XML error event

    ORA-19202: an error has occurred in the processing of XML

    LSX-00290: invalid enumeration choice "D".

    SQL > insert into root_table values (1,

    2 xmlparse (document

    3'

    4

    5    A

    6 XXXX

    7 1234

    8

    9

    10

    11

    12  ')

    (13);

    1 line of creation.

    For the #2 option:

    create table root_table2)

    Identification number

    text xmltype

    )

    XMLType column can store it as clob securefile

    ;

    create or replace trigger root_table2_biu_t

    before the insert or update

    on root_table2

    for each line

    declare

    doc xmltype: =: new.tekst.createSchemaBasedXML ('test.xsd');

    Start

    doc.schemaValidate ();

    end;

    /

    SQL > insert into root_table2 values (1,

    2 xmlparse (document

    3'

    4

    5    D

    6 XXXX

    7 1234

    8

    9

    10

    11

    12  ')

    (13);

    insert into root_table2 values (1,

    *

    ERROR on line 1:

    ORA-31154: invalid XML document

    ORA-19202: an error has occurred in the processing of XML

    LSX-00290: invalid enumeration choice "D".

    ORA-06512: at "SYS." XMLTYPE", line 354

    ORA-06512: at DEV. "" ROOT_TABLE2_BIU_T ", line 4

    ORA-04088: error during execution of trigger ' DEV. ROOT_TABLE2_BIU_T'

    Both options will perform a validation of strict type.

    There are other possible configurations, such as CLOB based on a storage schema, but this approach is now obsolete.

    If you are only interested in whether the XML instance is valid or not, you can also use a constraint check with the XMLisValid function.

Maybe you are looking for