FTPing into XMLType view (ORA-21700)

Hi all,
I have some relational data, which I want to display as XML. To get there I successfully created and registered a XML schema and created a XMLType view. So far so good ... I see all data as XML in this view.
Now I'd like to FTP new XML documents, which are based on this XML schema, into previously created folders. So I wrote an INSTEAD OF trigger to insert the data in my relational tables. When I do a ftp put ..., all I get is ORA-21700 object does not exist or is marked for delete.
Any tips or hints to resolve this problem ?
Any help is appreciated...
Regards Markus

Hi all,
I found out, that SQL inserts are working... So, why does ftp-ing not work ?
Regards Markus

Similar Messages

  • Unable to load into XMLTYPE column--ORA-21700

    HI Gentlemen,
    I have a nice schema-based table and want to insert into it. However, I always get ORA-21700. Which object is marked for delete? I did not mark anything.
    SQL> @createIcdTable
    Tabelle wurde gelöscht.
    Tabelle wurde erstellt.
    SQL> describe icd
    Name                                      Null?    Typ
    ID                                                 CHAR(2)
    XML_DOCUMENT                                       SYS.XMLTYPE(XMLSchema "ICD/i
                                                        cd_root.xsd" Element "ehd")
                                                        STORAGE Object-relational TY
                                                        PE "ICD$ICD_ROOT_TYP"And here is the load script:
    SQL> @loadxmlfileascolumn_int
    Geben Sie einen Wert für source_directory ein: c:\gks\kbv\c\icd\xml
    alt   1: create or replace directory SOURCE_DIR as '&source_directory'
    neu   1: create or replace directory SOURCE_DIR as 'c:\gks\kbv\c\icd\xml'
    Verzeichnis wurde erstellt.
    Geben Sie einen Wert für xmltypetable ein: icd
    alt   4:   INSERT INTO &XMLTypeTable
    neu   4:   INSERT INTO icd
    Geben Sie einen Wert für id ein: 01
    Geben Sie einen Wert für instancedocument ein: test.xml
    alt   5:     VALUES (&id, XMLType(bfilename('SOURCE_DIR', '&InstanceDocument'),
    neu   5:     VALUES (01, XMLType(bfilename('SOURCE_DIR', 'test.xml'),
    declare
    FEHLER in Zeile 1:
    ORA-21700: Objekt nicht vorhanden oder zum Löschen markiert
    ORA-06512: in Zeile 4
    SQL> spool offCould anybody help me how to circumvent this? Or a bug again?
    Thanks, regards
    Miklos HERBOLY
    Edited by: mh**** on Jul 4, 2011 10:31 AM

    HI mdrake,
    Thank you for your reply. I executed the schema registration with gentables=TRUE: the same error occurred. Here are the schema dependencies--I can not find any recursion in them. Note that schema file names end in .ann (for annotated), but registered schema urls's are .xsd names.
    ehd_header_V1.40.ann
         <xs:include schemaLocation="ICD/datentypen_V1.40.xsd"/>
    ehd_root_V1.40.ann
         <xs:include schemaLocation="ICD/ehd_header_V1.40.xsd"/>
         <xs:include schemaLocation="ICD/keytabs_V1.40.xsd"/>
         <xs:import namespace="urn:ehd/icd/001" schemaLocation="ICD/icd_body.xsd"/>
    icd_header.ann
         <xs:include schemaLocation="ICD/ehd_header_V1.40.xsd"/>
    icd_root.ann
         <xs:include schemaLocation="ICD/ehd_root_V1.40.xsd"/>
         <xs:include schemaLocation="ICD/keytabs_V1.40.xsd"/>
         <xs:include schemaLocation="ICD/icd_header.xsd"/>
         <xs:import namespace="urn:ehd/icd/001" schemaLocation="ICD/icd_body.xsd"/>
    keytabs_V1.40.ann
    datentypen_V1.40.ann
    icd_body.ann
    --Then I executed your query, setting NULL to ?, with the following results (I am sorry about the bulky stuff here)
    SQL> @m
    URL                            NAME                             TBL                                                                                                                
    ICD/datentypen_V1.40.xsd       document_relationship.type_cd    ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       related_document                 ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       id                               ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       set_id                           ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       version_nbr                      ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       intended_recipient.type_cd       ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       function_cd                      ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       originator.type_cd               ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       function_cd                      ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       participation_tmr                ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       provider.type_cd                 ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       function_cd                      ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       participation_tmr                ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       group.type_cd                    ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       id                               ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       person_name                      ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       nm                               ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       GIV                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       MID                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       FAM                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       PFX                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       SFX                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       DEL                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       id                               ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       STR                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       HNR                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       POB                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       ZIP                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       CTY                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       STA                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       CNT                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       ADL                              ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       patient.type_cd                  ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       person                           ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       birth_dttm                       ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       administrative_gender_cd         ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       local_header                     ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       id                               ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       interface.nm                     ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       version                          ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       description                      ?                                                                                                                  
    ICD/datentypen_V1.40.xsd       scope.type_cd                    ?                                                                                                                  
    ICD/icd_body.xsd               kapitel_liste                    ?                                                                                                                  
    ICD/icd_body.xsd               diagnosethesaurus_liste          ?                                                                                                                  
    ICD/icd_body.xsd               kapitel                          ?                                                                                                                  
    ICD/icd_body.xsd               nummer                           ?                                                                                                                  
    ICD/icd_body.xsd               von_icd_code                     ?                                                                                                                  
    ICD/icd_body.xsd               bis_icd_code                     ?                                                                                                                  
    ICD/icd_body.xsd               bezeichnung                      ?                                                                                                                  
    ICD/icd_body.xsd               gruppen_liste                    ?                                                                                                                  
    ICD/icd_body.xsd               gruppe                           ?                                                                                                                  
    ICD/icd_body.xsd               von_icd_code                     ?                                                                                                                  
    ICD/icd_body.xsd               bis_icd_code                     ?                                                                                                                  
    ICD/icd_body.xsd               bezeichnung                      ?                                                                                                                  
    ICD/icd_body.xsd               diagnosen_liste                  ?                                                                                                                  
    ICD/icd_body.xsd               diagnose                         ?                                                                                                                  
    ICD/icd_body.xsd               icd_code                         ?                                                                                                                  
    ICD/icd_body.xsd               bezeichnung                      ?                                                                                                                  
    ICD/icd_body.xsd               abrechenbar                      ?                                                                                                                  
    ICD/icd_body.xsd               diagnosen_liste                  ?                                                                                                                  
    ICD/icd_body.xsd               diagnosethesaurus_liste          ?                                                                                                                  
    ICD/icd_body.xsd               kodierrichtlinien_liste          ?                                                                                                                  
    ICD/icd_body.xsd               notationskennzeichen             ?                                                                                                                  
    ICD/icd_body.xsd               geschlechtsbezug                 ?                                                                                                                  
    ICD/icd_body.xsd               geschlechtsbezug_fehlerart       ?                                                                                                                  
    ICD/icd_body.xsd               untere_altersgrenze              ?                                                                                                                  
    ICD/icd_body.xsd               obere_altersgrenze               ?                                                                                                                  
    ICD/icd_body.xsd               altersbezug_fehlerart            ?                                                                                                                  
    ICD/icd_body.xsd               krankheit_in_mitteleuropa_sehr_s ?                                                                                                                  
    ICD/icd_body.xsd               schlüsselnummer_mit_inhalt_beleg ?                                                                                                                  
    ICD/icd_body.xsd               infektionsschutzgesetz_meldepfli ?                                                                                                                  
    ICD/icd_body.xsd               infektionsschutzgesetz_abrechnun ?                                                                                                                  
    ICD/icd_body.xsd               diagnosethesaurus                ?                                                                                                                  
    ICD/icd_body.xsd               hausarztkodierung                ?                                                                                                                  
    ICD/icd_body.xsd               akr_ref                          ?                                                                                                                  
    ICD/ehd_header_V1.40.xsd       id                               ?                                                                                                                  
    ICD/ehd_header_V1.40.xsd       set_id                           ?                                                                                                                  
    ICD/ehd_header_V1.40.xsd       version_nbr                      ?                                                                                                                  
    ICD/ehd_header_V1.40.xsd       document_type_cd                 ?                                                                                                                  
    ICD/ehd_header_V1.40.xsd       service_tmr                      ?                                                                                                                  
    ICD/ehd_header_V1.40.xsd       origination_dttm                 ?                                                                                                                  
    ICD/ehd_header_V1.40.xsd       state                            ?                                                                                                                  
    ICD/ehd_header_V1.40.xsd       interface                        ?                                                                                                                  
    ICD/ehd_root_V1.40.xsd         header                           ?                                                                                                                  
    ICD/ehd_root_V1.40.xsd         body                             ?                                                                                                                  
    ICD/ehd_root_V1.40.xsd         keytabs                          ?                                                                                                                  
    ICD/ehd_root_V1.40.xsd         icd:icd_stammdaten               ?                                                                                                                  
    ICD/icd_header.xsd             id                               ?                                                                                                                  
    ICD/icd_header.xsd             document_type_cd                 ?                                                                                                                  
    ICD/icd_header.xsd             service_tmr                      ?                                                                                                                  
    ICD/icd_header.xsd             origination_dttm                 ?                                                                                                                  
    ICD/icd_header.xsd             interface                        ?                                                                                                                  
    ICD/icd_header.xsd             id                               ?                                                                                                                  
    ICD/icd_header.xsd             interface.nm                     ?                                                                                                                  
    ICD/icd_header.xsd             version                          ?                                                                                                                  
    ICD/icd_header.xsd             description                      ?                                                                                                                  
    ICD/icd_root.xsd               header                           ?                                                                                                                  
    ICD/icd_root.xsd               body                             ?                                                                                                                  
    ICD/icd_root.xsd               keytabs                          ?                                                                                                                  
    ICD/icd_root.xsd               icd:icd_stammdaten               ?                                                                                                                  
    100 Zeilen ausgewählt.
    SQL> spool offWhat else could it be?
    Well, installation did not complain at all, but when I inspect trace.log, there ar lines such as
    PRCT-1400 : Ausführung von getcrshome nicht erfolgreich. Detaillierter Fehler: localnode
    [main] [ 2011-07-01 22:38:00.836 CEST ] [HAUtils.isHASConfigured:412]  Ignoring exception in isHASConfigured: PRCI-1112 : Übergebener Verzeichnisname war Null
    PRCI-1112 : Übergebener Verzeichnisname war Null
    ...Can this interfere with my problem?
    Edited by: mh**** on Jul 9, 2011 1:56 AM

  • Inserting into XMLType View

    I have created an XMLType view with an INSTEAD OF trigger to insert data into the underlying tables. I used your example on XMLType view of Relational Content
    It works great if I have no attributes defined in the root element of the XML document (i.e. xmlns, schemaLocation, etc.). However, if my document contains any of those attributes, it will not load. I have tried creating the view with and without the xml attributes, as well as making sure that the schemaLocation is identical to the one in the document (copied and pasted just to make sure).
    Is there anything that you can point to right away that I'm missing?
    If needed, I can post code for you.
    Thanks!

    Here is the code I used to generate the tables, view, and triggers:
    drop table p_student_demographics;
    create table p_student_demographics -- a
    wiser_id varchar2(8),
    first_name varchar2(15),
    middle_name varchar2(15),
    last_name varchar2(25),
    birthdate date,
    school_id varchar2(7),
    special_ed_teacher varchar2(50)
    drop table p_scorer_info;
    create table p_scorer_info -- b
    test_record_id number,
    scorer_number number,
    name varchar2(80),
    email varchar2(50)
    drop table p_test_record;
    create table p_test_record -- c
    wiser_id varchar2(8),
    test_record_id number,
    grade_tested varchar2(2),
    first_scorer_completed varchar2(3),
    second_scorer_completed varchar2(3)
    drop table p_psw_test_results;
    create table p_psw_test_results -- d
    test_record_id number,
    subject varchar2(7),
    entry_number number,
    complexity varchar2(1),
    performance varchar2(1),
    independence varchar2(1),
    generalization varchar2(1),
    non_scorable varchar2(4)
    drop table p_spe_test_results;
    create table p_spe_test_results -- e
    test_record_id number,
    subject varchar2(7),
    entry_number number,
    item_number number,
    response varchar2(1)
    drop table p_total_scores;
    create table p_total_scores -- f
    test_record_id number,
    subject varchar2(7),
    psw_total_raw_score varchar2(2),
    spe_total_raw_score varchar2(2),
    tas_score varchar2(2),
    tas_portfolio_score varchar2(2),
    tas_spe_score varchar2(2),
    overall_total_raw_score varchar2(2),
    overall_performance_level varchar2(1)
    drop table p_school_info;
    create table p_school_info
    district_id varchar2(7),
    district_name varchar2(80),
    school_id varchar2(7),
    school_name varchar2(80)
    create or replace view paws_alt_test_results
    of xmltype
    xmlschema "http://www.k12.wy.us/public/paws-alt-results-v1.xsd" element "PawsAltResults"
    with object id
    (to_number(extractValue(object_value,'/PawsAltResults/Students/TestRecord/TestRecordId')))
    as
    select xmlelement
    "PawsAltResults",
    xmlelement
    "Students",
    xmlelement
    "StudentInfo",
    xmlelement
    "StudentDemographics",
    xmlelement("WiserId", a.wiser_id),
    xmlelement("FirstName", a.first_name),
    xmlelement("MiddleName", a.middle_name),
    xmlelement("LastName", a.last_name),
    xmlelement("BirthDate", a.birthdate)
    xmlelement("SchoolId", a.school_id),
    xmlelement("SpecialEdTeacher", a.special_ed_teacher),
    xmlelement
    "DocumentCompletedBy",
    xmlelement("FirstScorer", c.first_scorer_completed),
    xmlelement("SecondScorer", c.second_scorer_completed)
    xmlelement
    "FirstScorerInfo",
    xmlelement("Name", b1.name),
    xmlelement("Email", b1.email)
    xmlelement
    "SecondScorerInfo",
    xmlelement("Name", b2.name),
    xmlelement("Email", b2.email)
    xmlelement
    "TestRecord",
    xmlelement("TestRecordId", c.test_record_id),
    xmlelement("GradeTested", c.grade_tested),
    xmlelement
    "Subjects",
    select xmlagg
    xmlelement
    "Subject",
    xmlelement("SubjectName", f.subject),
    xmlelement
    "Psw",
    xmlelement
    "Entries",
    select xmlagg
    xmlelement
    "Entry",
    xmlelement("EntryNumber", x.entry_number),
    xmlelement("Complexity", x.complexity),
    xmlelement("Performance", x.performance),
    xmlelement("Independence", x.independence),
    xmlelement("Generalization", x.generalization),
    xmlelement("NonScorable", x.non_scorable)
    from p_psw_test_results x
    where f.test_record_id = x.test_record_id
    and f.subject = x.subject
    xmlelement("TotalRawScore", f.psw_total_raw_score)
    xmlelement
    "Spe",
    xmlelement
    "Entries",
    select xmlagg
    xmlelement
    "Entry",
    xmlelement("EntryNumber", x.entry_number),
    xmlelement
    "Items",
    select xmlagg
    xmlelement
    "Item",
    xmlelement("ItemNumber", y.item_number),
    xmlelement("Response", y.response)
    from p_spe_test_results y
    where x.test_record_id = y.test_record_id
    and x.subject = y.subject
    and x.entry_number = y.entry_number
    from (select distinct
    test_record_id,
    subject,
    entry_number
    from p_spe_test_results) x
    where f.test_record_id = x.test_record_id
    and f.subject = x.subject
    xmlelement("TotalRawScore", f.spe_total_raw_score)
    xmlelement("TasScore", f.tas_score),
    xmlelement("TasPortfolioScore", f.tas_portfolio_score),
    xmlelement("TasSpeScore", f.tas_spe_score),
    xmlelement("OverallTotalRawScore", f.overall_total_raw_score),
    xmlelement("OverallPerformanceLevel", f.overall_performance_level)
    from p_total_scores f
    where c.test_record_id = f.test_record_id
    xmlelement
    "Districts",
    select xmlagg
    xmlelement
    "DistrictInfo",
    xmlelement("DistrictId", district_id),
    xmlelement("DistrictName", district_name)
    from (select distinct
    district_id,
    district_name
    from p_school_info)
    xmlelement
    "Schools",
    select xmlagg
    xmlelement
    "SchoolInfo",
    xmlelement("DistrictId", district_id),
    xmlelement("SchoolId", school_id),
    xmlelement("SchoolName", school_name)
    from p_school_info
    from p_student_demographics a,
    p_scorer_info b1,
    p_scorer_info b2,
    p_test_record c
    where a.wiser_id = c.wiser_id
    and b1.test_record_id = b2.test_record_id
    and b1.test_record_id = c.test_record_id
    and b1.scorer_number = 1
    and b2.scorer_number = 2;
    create or replace trigger io_ins_paws_alt_results
    instead of insert on paws_alt_test_results
    begin
    insert all
    into p_student_demographics
    (wiser_id, first_name, middle_name, last_name, birthdate, school_id,
    special_ed_teacher)
    values
    (wiser_id, first_name, middle_name, last_name, birthdate, school_id,
    special_ed_teacher)
    into p_scorer_info
    (test_record_id, scorer_number, name, email)
    values
    (test_record_id, 1, name1, email1)
    into p_scorer_info
    (test_record_id, scorer_number, name, email)
    values
    (test_record_id, 2, name2, email2)
    into p_test_record
    (wiser_id, test_record_id, grade_tested, first_scorer_completed,
    second_scorer_completed)
    values
    (wiser_id, test_record_id, grade_tested, first_scorer_completed,
    second_scorer_completed)
    select a.*
    from xmltable
    '/PawsAltResults'
    passing :new.object_value
    columns
    wiser_id varchar2(8) path 'Students/StudentInfo/StudentDemographics/WiserId',
    first_name varchar2(15) path 'Students/StudentInfo/StudentDemographics/FirstName',
    middle_name varchar2(15) path 'Students/StudentInfo/StudentDemographics/MiddleName',
    last_name varchar2(25) path 'Students/StudentInfo/StudentDemographics/LastName',
    birthdate date path 'Students/StudentInfo/StudentDemographics/Birthdate',
    school_id varchar2(7) path 'Students/StudentInfo/SchoolId',
    special_ed_teacher varchar2(50) path 'Students/StudentInfo/SpecialEdTeacher',
    test_record_id number path 'Students/StudentInfo/TestRecord/TestRecordId',
    name1 varchar2(80) path 'Students/StudentInfo/FirstScorerInfo/Name',
    email1 varchar2(50) path 'Students/StudentInfo/FirstScorerInfo/Email',
    name2 varchar2(80) path 'Students/StudentInfo/SecondScorerInfo/Name',
    email2 varchar2(50) path 'Students/StudentInfo/SecondScorerInfo/Email',
    grade_tested varchar2(2) path 'Students/StudentInfo/TestRecord/GradeTested',
    first_scorer_completed varchar2(3) path 'Students/StudentInfo/DocumentCompletedBy/FirstScorer',
    second_scorer_completed varchar2(3) path 'Students/StudentInfo/DocumentCompletedBy/SecondScorer'
    ) a;
    insert all
    into p_psw_test_results
    (test_record_id, subject, entry_number, complexity, performance,
    independence, generalization, non_scorable)
    values
    (test_record_id, subject, entry_number, complexity, performance,
    independence, generalization, non_scorable)
    into p_total_scores
    (test_record_id, subject, psw_total_raw_score, spe_total_raw_score,
    tas_score, tas_portfolio_score, tas_spe_score,
    overall_total_raw_score, overall_performance_level)
    values
    (test_record_id, subject, psw_total_raw_score, spe_total_raw_score,
    tas_score, tas_portfolio_score, tas_spe_score,
    overall_total_raw_score, overall_performance_level)
    select a.test_record_id,
    b.subject,
    b.psw_total_raw_score,
    b.spe_total_raw_score,
    b.tas_score,
    b.tas_portfolio_score,
    b.tas_spe_score,
    b.overall_total_raw_score,
    b.overall_performance_level,
    c.*
    from xmltable
    '/PawsAltResults/Students/StudentInfo/TestRecord'
    passing :new.object_value
    columns
    test_record_id number path 'TestRecordId',
    subjects xmltype path 'Subjects/Subject'
    ) a,
    xmltable
    '/Subject'
    passing a.subjects
    columns
    subject varchar2(7) path 'SubjectName',
    psw_total_raw_score varchar2(2) path 'Psw/Entries/TotalRawScore',
    spe_total_raw_score varchar2(2) path 'Spe/TotalRawScore',
    tas_score varchar2(2) path 'TasScore',
    tas_portfolio_score varchar2(2) path 'TasPortfolioScore',
    tas_spe_score varchar2(2) path 'TasSpeScore',
    overall_total_raw_score varchar2(2) path 'OverallTotalRawScore',
    overall_performance_level varchar2(1) path 'OverallPerformanceLevel',
    entries xmltype path 'Psw/Entries/Entry'
    ) b,
    xmltable
    '/Entry'
    passing b.entries
    columns
    entry_number number path 'EntryNumber',
    complexity varchar2(1) path 'Complexity',
    performance varchar2(1) path 'Performance',
    independence varchar2(1) path 'Independence',
    generalization varchar2(1) path 'Generalization',
    non_scorable varchar2(4) path 'NonScorable'
    ) c;
    insert
    into p_spe_test_results
    (test_record_id, subject, entry_number, item_number, response)
    select a.test_record_id,
    b.subject,
    c.entry_number,
    d.*
    from xmltable
    '/PawsAltResults/Students/StudentInfo/TestRecord'
    passing :new.object_value
    columns
    test_record_id number path 'TestRecordId',
    subjects xmltype path 'Subjects/Subject'
    ) a,
    xmltable
    '/Subject'
    passing a.subjects
    columns
    subject varchar2(7) path 'SubjectName',
    entries xmltype path 'Spe/Entries/Entry'
    ) b,
    xmltable
    '/Entry'
    passing b.entries
    columns
    entry_number number path 'EntryNumber',
    items xmltype path 'Items/Item'
    ) c,
    xmltable
    '/Item'
    passing c.items
    columns
    item_number number path 'ItemNumber',
    response varchar2(1) path 'Response'
    ) d;
    insert
    into p_school_info
    (district_id, district_name, school_id, school_name)
    select a.district_id,
    a.district_name,
    b.school_id,
    b.school_name
    from xmltable
    'PawsAltResults/Districts/DistrictInfo'
    passing :new.object_value
    columns
    district_id varchar2(7) path 'DistrictId',
    district_name varchar2(80) path 'DistrictName'
    ) a,
    xmltable
    'PawsAltResults/Schools/SchoolInfo'
    passing :new.object_value
    columns
    district_id varchar2(7) path 'DistrictId',
    school_id varchar2(7) path 'SchoolId',
    school_name varchar2(80) path 'SchoolName'
    ) b
    where a.district_id = b.district_id;
    end io_ins_paws_alt_results;
    XML document:
    <?xml version="1.0" encoding="UTF-8"?>
    <PawsAltResults xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.k12.wy.us/public/paws-alt-results-v1.xsd" xmlns="http://www.w3.org/2001/XMLSchema">
    <Students>
    <StudentInfo>
    <StudentDemographics>
    <WiserId>12345678</WiserId>
    <FirstName>TestFirst</FirstName>
    <MiddleName>M</MiddleName>
    <LastName>TestLast</LastName>
    <BirthDate>2000-02-02</BirthDate>
    </StudentDemographics>
    <SchoolId>2222222</SchoolId>
    <SpecialEdTeacher>Test Special Ed Teacher</SpecialEdTeacher>
    <DocumentCompletedBy>
    <FirstScorer>Yes</FirstScorer>
    <SecondScorer>No</SecondScorer>
    </DocumentCompletedBy>
    <FirstScorerInfo>
    <Name>Test First Scorer</Name>
    <Email>[email protected]</Email>
    </FirstScorerInfo>
    <SecondScorerInfo>
    <Name>Test Second Scorer</Name>
    <Email>[email protected]</Email>
    </SecondScorerInfo>
    <TestRecord>
    <TestRecordId>1</TestRecordId>
    <GradeTested>08</GradeTested>
    <Subjects>
    <Subject>
    <SubjectName>Reading</SubjectName>
    <Psw>
    <Entries>
    <Entry>
    <EntryNumber>1</EntryNumber>
    <Complexity>1</Complexity>
    <Performance>2</Performance>
    <Independence>3</Independence>
    <Generalization>B</Generalization>
    </Entry>
    </Entries>
    <TotalRawScore>20</TotalRawScore>
    </Psw>
    <Spe>
    <Entries>
    <Entry>
    <EntryNumber>1</EntryNumber>
    <Items>
    <Item>
    <ItemNumber>1</ItemNumber>
    <Response>1</Response>
    </Item>
    <Item>
    <ItemNumber>2</ItemNumber>
    <Response>2</Response>
    </Item>
    </Items>
    </Entry>
    </Entries>
    <TotalRawScore>30</TotalRawScore>
    </Spe>
    <TasScore>10</TasScore>
    <TasPortfolioScore>20</TasPortfolioScore>
    <TasSpeScore>15</TasSpeScore>
    <OverallTotalRawScore>50</OverallTotalRawScore>
    <OverallPerformanceLevel>3</OverallPerformanceLevel>
    </Subject>
    </Subjects>
    </TestRecord>
    </StudentInfo>
    </Students>
    <Districts>
    <DistrictInfo>
    <DistrictId>1111111</DistrictId>
    <DistrictName>Test District Name</DistrictName>
    </DistrictInfo>
    </Districts>
    <Schools>
    <SchoolInfo>
    <DistrictId>1111111</DistrictId>
    <SchoolId>2222222</SchoolId>
    <SchoolName>Test School Name</SchoolName>
    </SchoolInfo>
    </Schools>
    </PawsAltResults>
    Insert statement:
    insert into paws_alt_test_results values (xmltype(bfilename('XMLDIR','test-paws-alt.xml'),nls_charset_id('AL32UTF8')));
    There are no errors shown on the insert statement. It tells me that one row was inserted, but there is no data when looking at the tables (unless I remove the attributes from the root element of the XML file).
    I'm using version 10.2.0.3
    Thanks for your help!

  • XMLTYPE View

    Hello
    How can I insert into XMLTYPE View ?
    Thanks for any help...

    Hello
    How can I insert into XMLTYPE View ?
    Thanks for any help...

  • ORA-21700 error using sys.xmlType in Oracle 9.2

    I'm working on an application which uses the XMLType column in some of its database tables. When we started, we were using Oracle 9.0.1, and this test code works (which emulates how we have to, in some occasions, populate the XMLType column).
    However, we installed Oracle 9.2.0.3 on the same machine and created database instances using this version of Oracle. We didn't upgrade the original 9.0.1 installation (which still exists side-by-side). When we run this code, we get the following exception...
    java.sql.SQLException: ORA-21700: object does not exist or is marked for delete
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1451)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:862)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1846)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1771)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2361)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:422)
    at com.edh.oracle.TransactionTester.testClob(TransactionTester.java:134)
    at com.edh.oracle.TransactionTester.main(TransactionTester.java:251)
    This exception occurs after we've written the data to a Clob and are attempting to call createXML to update the column.
    Is there anything additional I need to do to get this working in Oracle 9.2 again? Thanks.
    Code is:
    * TransactionTester.java
    * Created on 11 October 2002, 14:08
    package com.edh.oracle;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    * @author ehillman
    public class TransactionTester {
    private static String ORACLE_URL = "jdbc:oracle:thin:@wallaby:7012:CT2";
    /** Creates a new instance of TransactionTester */
    public TransactionTester() throws SQLException {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    private void createTables(Connection conn) throws SQLException {
    String createText = "create table SillyData (XML_VALUE XMLTYPE, XML_STORAGE CLOB)";
    Statement stmt = conn.createStatement();
    stmt.execute(createText);
    System.out.println("Tables created");
    private void dropTables(Connection conn) throws SQLException {
    String dropText = "drop table SillyData ";
    Statement stmt = conn.createStatement();
    stmt.execute(dropText);
    System.out.println("Tables dropped");
    private void testClob() throws SQLException, java.io.FileNotFoundException,
    java.io.IOException {
    System.out.println("testClob - START");
    Connection conn = DriverManager.getConnection(ORACLE_URL,
    "ehillman", "ehillman");
    System.out.println("connection received");
    createTables(conn);
    try {
    System.out.println("Loading MyFn.xml");
    java.io.FileReader inputReader = new java.io.FileReader(
    "C:\\Documents and Settings\\ehillman\\.netbeans\\edh test\\oracle jdbc\\com\\edh\\oracle\\MyFn.xml");
    conn.setAutoCommit(false);
    Statement stmt2 = conn.createStatement();
    stmt2.execute("insert into SillyData (XML_STORAGE) values (EMPTY_CLOB())");
    System.out.println("empty row inserted");
    stmt2 = conn.createStatement();
    ResultSet rs = stmt2.executeQuery("select XML_STORAGE from SillyData for update");
    System.out.println("Empty CLOB retireved");
    rs.next();
    java.sql.Clob clobValue = rs.getClob(1);
    oracle.sql.CLOB oraClob = (oracle.sql.CLOB) clobValue;
    System.out.println("casted");
    java.io.Writer writer = oraClob.getCharacterOutputStream();
    char[] buffer = new char[ oraClob.getChunkSize() ];
    for (int charsRead = inputReader.read(buffer); charsRead > -1; charsRead = inputReader.read(buffer)) {
    writer.write(buffer, 0, charsRead);
    writer.close();
    System.out.println("data written to Clob");
    PreparedStatement pState = conn.prepareStatement(
    "update SillyData set XML_VALUE = sys.XMLType.createXML(?)");
    pState.setClob(1, clobValue);
    int result = pState.executeUpdate();
    System.out.println("executeQuery returned " + result);
    } finally {
    dropTables(conn);
    conn.close();
    System.out.println("connection closed");
    System.out.println("testClob - END");
    * @param args the command line arguments
    public static void main(String[] args) {
    try {
    TransactionTester tst = new TransactionTester();
    tst.testClob();
    } catch (Exception ex) {
    ex.printStackTrace();

    I've found this....
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96620/xdb05obj.htm#1032058
    Does this mean that, for a table to use an XMLType column, it has to have a single schema definition for every row in the table?
    This won't fit for what we're doing.... that is, our table stores XML data for each row, but they are all different types of XML... they don't have the same structure,they don't use the same schema.
    Please let me know if I'm missing something

  • ORA-21700 when creating XMLType

    Hi,
    I have an XML document as a CLOB.
    I want to convert this to an XMLType document.
    If I include the encoding (or other 'header' information) with this I get this error:
    ORA-21700: object does not exist or is marked for delete
    Here's an example
    This works OK:
    insert into xml_docs (xml)
    values(
    xmltype.createxml('<?xml version="1.0"?>
    <messages>
    <message id="12345">1</message>
    </messages>'))
    but this gives the ORA-21700 error:
    insert into xml_docs (xml)
    values(
    xmltype('
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE messages SYSTEM "ptsiiisignal14.dtd">
    <messages>
    <message id="12345">1</message>
    </messages>'));
    I've seen other examples on Technet where the encoding is specified for an XMLType
    eg:
    http://otn.oracle.com/sample_code/tech/java/codesnippet/xmldb/HowToLoadLargeXML.html
    so what's going wrong for me?
    This is on a 9.2.0.4.0 database using the 9.2.0.1.0 client.
    Thanks for your help,
    Ben Walker

    I know a little more now:
    This works:
    insert into xml_docs (xml)
    values(
    xmltype('
    <?xml version="1.0" encoding="utf-8"?>
    <messages>
    <message id="12345">1</message>
    </messages>'));
    so it's not the encoding that it's objecting to, but this line:
    <!DOCTYPE messages SYSTEM "ptsiiisignal14.dtd">
    Is createXml trying to validate the XML against the XML and isn't able to find the DTD? If so, can I get it to just check that the XML is well formed and not validate it?
    Any help much appreciated,
    cheers,
    Ben
    PS I know XMLType.createxml has a 'validated' parameter - I'll try and find out what that does.

  • Ora-21700 when updating xmltype column of a table

    Hello,
    Can somebody explain why the following statement gives ora-21700 (object does not exist or is market for delete):
    update translation_message
    set translationxml = XmlType(
    '<NPSREPLY DOMAIN="SWI" OBJECT="SUBSCRIBER" REQUEST="DELETE" RETURNCODE="0" RETURNTYPE="NONE" STATUS="STORED" xmlns="http://saly.bc/nps/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://saly.bc/nps/ NPS_Reply.xsd">
    <SUBREQUEST SEQUENCE="1">
    <ProfileData>
    <ACTION SUBTYPE="PSTN">DEL_CNA_FREE</ACTION>
    <DN>999999999</DN>
    <RETURNCODE>0</RETURNCODE>
    </ProfileData>
    </SUBREQUEST>
    </NPSREPLY>'
    where id = 1926938
    remark:
    when changing
    xsi:schemaLocation="http://saly.bc/nps/ NPS_Reply.xsd
    in
    xsi:schemaLocation="http://saly.bc/nps/NPS_Reply.xsd
    the select is running well.
    I will explain my problem a little bit more:
    The exact oracle error is:
    ora-21700 object does not exist or is marked for delete ORA-06512: at "SYS.XMLTYPE".
    The following peace of xml causes the problem:
    xsi:schemaLocation="http://saly.bc/nps/ NPS_Reply.xsd"
    The statement is running fine if you remove the blank after
    "/nps/ NPS_Repy". So if you use this peace of xml xsi:schemaLocation="http://saly.bc/nps/NPS_Reply.xsd", the statement works fine.
    My question: Wy is the blank not allowed in this peace of xml xsi:schemaLocation="http://saly.bc/nps/ NPS_Reply.xsd"
    The purpose of the blank is to indicate that 'NPS_Reply.xsd' will be located somewhere in "http://saly.bc/nps/". So it can be that 'NPS_Reply.xsd' is found directly under "http://saly.bc/nps/" or some levels lower. According XML standards, the blank is allowed for this purposes.
    regards, Els

    Hi,
    This schema location is only indicative and not used. The xml is generated by an other application and has to be stored in an xmltype column.
    regards, Els

  • ORA-21700: object does not exist or is marked for delete

    Hi,
    I have Oracle 9.2.0.1.0, no patches.
    With very little probablity Package function cause the exception on correct data.
    FUNCTION get_DealPatch(p_ID IN VARCHAR2) RETURN XMLTYPE IS
    lResult XMLType;
    BEGIN
    SELECT XMLElement("deal_update", XMLAttributes(dealID AS "deal_id")
    ,XMLAgg(xmltype(SHORTDESCRIPTIONXML).extract('//deal/*'))
    ) INTO lResult
    FROM deal WHERE dealID=p_ID GROUP BY dealID;
    RETURN lResult;
    END;
    0. Column SHORTDESCRIPTIONXML in Table deal is CLOB and contains correct xml (like <deal>some correct XML here </deal>
    1.requsted record exists, data is ok.
    2.Function randomly (on the same record) throws Exception
    ORA-21700
    Is that problem with Oracle 9.2.0.1.0 XML stuff ?
    Could somebody help me with ideas?
    Thanks in advance.
    Oleg.

    Not having the XDB user and XML DB repository installed can cause ORA-21700 errors. Under certain circumstances creating an XMLType (Which XMLElement() does) can cause the system to try to access the XML DB repository. If this is not present ORA-21700 can result.
    XML DB can be installed by running catqm.sql in /rdbms/admin. See the doc for more info.
    9.2.0.1.0 is not supported, either by Oracle Support or in this forum. A number of extremely serious bugs were fixed in 9.2.0.2.0 and 9.2.0.3.0 meaning that we do not provide customers or forum users with assistance for XML DB issues on databases earlier than 9.2.0.3.0.
    If you do not have a valid support contract you have to upgrade to 10.1.0.2.0, which can be downloaded from http://otn.oracle.com.

  • Insert a XSL document into XMLType

    Hi dear reader
    I want to insert a XSL document into XMLType field , but the length of the XSL is 5900 character and I have problem with loading and executing the INSERT statement in database.
    for solving the load problem , I use binding variable and try to execute it with EXECUTE IMMEDIATE str.
    and get the following error :
    ORA-01704: string literal too long
    please advice;
    thanks

    create directory object DIR_TEMP on the database pointing to the physical path where your xml files are available.
    Note the path should be on the database server and not on the client and also your files should be present on the database server and not client for this to work.
    create table xml_table (id number, xml_data xmltype)
    CREATE OR REPLACE FUNCTION getClobDocument
    ( filename  in varchar2,
      charset   in varchar2 default NULL,
      dir       IN VARCHAR2 default 'DIR_TEMP',
    ) RETURN CLOB deterministic is
      file          bfile := bfilename(dir,filename);
      charContent   CLOB := ' ';
      targetFile    bfile;
      lang_ctx      number := DBMS_LOB.default_lang_ctx;
      charset_id    number := 0;
      src_offset    number := 1 ;
      dst_offset    number := 1 ;
      warning       number;
    BEGIN
      IF charset is not null then
          charset_id := NLS_CHARSET_ID(charset);
      end if;
      targetFile := file;
      DBMS_LOB.fileopen(targetFile, DBMS_LOB.file_readonly);
      DBMS_LOB.LOADCLOBFROMFILE(charContent, targetFile,
      DBMS_LOB.getLength(targetFile), src_offset, dst_offset,
      charset_id, lang_ctx,warning);
      DBMS_LOB.fileclose(targetFile);
      return charContent;
    end;
    insert into xml_table values(1, XMLTYPE(GetClobDocument('purchaseorder.xml')))
    /The function GetClobDocument returns the content of the xml file in CLOB format.
    Before insert this is converted into XMLTYPE.

  • Primary key on view - ORA-20505

    I'm getting this error when I try to update a form that is based on a view:
    ORA-20505: Error in DML: p_rowid=69, p_alt_rowid=VENDOR_ITEM_ID, p_rowid2=, p_alt_rowid2=. ORA-01779: cannot modify a column which maps to a non key-preserved table
    Error Unable to process row of table SH_PURCHASING_VW.
    OK
    Can you tell me how to add a pk to this view? I'd like to use VENDOR_ITEM_ID or a completely new column.
    CREATE OR REPLACE FORCE VIEW "SH_PURCHASING_VW" ("ITEMNO", "VENDNO", "ITEM_DESC", "VEND_NAME", "PRIORITY", "VEND_ITEMNO", "VEND_ITEM_NOTES", "VENDOR_ITEM_ID", "VENDOR_ID", "VEND_NOTES", "ITEM_NOTES_ID", "ITEMNO_N", "ITEM_NOTES") AS
    select     "SH_VENDOR_ITEM"."ITEMNO" as "ITEMNO",
         "SH_VENDOR_ITEM"."VENDNO" as "VENDNO",
         "SH_VENDOR_ITEM"."ITEM_DESC" as "ITEM_DESC",
         "SH_VENDOR_ITEM"."VEND_NAME" as "VEND_NAME",
         "SH_VENDOR_ITEM"."PRIORITY" as "PRIORITY",
         "SH_VENDOR_ITEM"."VEND_ITEMNO" as "VEND_ITEMNO",
         "SH_VENDOR_ITEM"."VEND_ITEM_NOTES" as "VEND_ITEM_NOTES",
         "SH_VENDOR_ITEM"."VENDOR_ITEM_ID" as "VENDOR_ITEM_ID",
         "SH_VENDOR"."VENDOR_ID" as "VENDOR_ID",
         "SH_VENDOR"."VEND_NOTES" as "VEND_NOTES",
         "SH_ITEM_NOTES"."ITEM_NOTES_ID" as "ITEM_NOTES_ID",
         "SH_ITEM_NOTES"."ITEMNO_N" as "ITEMNO_N",
         "SH_ITEM_NOTES"."ITEM_NOTES" as "ITEM_NOTES"
    from     "SH_ITEM_NOTES" "SH_ITEM_NOTES",
         "SH_VENDOR" "SH_VENDOR",
         "SH_VENDOR_ITEM" "SH_VENDOR_ITEM"
    where "SH_VENDOR_ITEM"."VENDNO"="SH_VENDOR"."VENDNO"
    and     "SH_VENDOR_ITEM"."ITEMNO"="SH_ITEM_NOTES"."ITEMNO_N"
    ORDER BY VENDOR_ITEM_ID
    Thanks in advance!

    Here are the updateable columns
    SPICE_HUNTER1 SH_PURCHASING_VW ITEMNO NO NO NO
    SPICE_HUNTER1 SH_PURCHASING_VW VENDNO NO NO NO
    SPICE_HUNTER1 SH_PURCHASING_VW ITEM_DESC NO NO NO
    SPICE_HUNTER1 SH_PURCHASING_VW VEND_NAME NO NO NO
    SPICE_HUNTER1 SH_PURCHASING_VW PRIORITY NO NO NO
    SPICE_HUNTER1 SH_PURCHASING_VW VEND_ITEMNO NO NO NO
    SPICE_HUNTER1 SH_PURCHASING_VW VEND_ITEM_NOTES NO NO NO
    SPICE_HUNTER1 SH_PURCHASING_VW VENDOR_ITEM_ID NO NO NO
    SPICE_HUNTER1 SH_PURCHASING_VW VENDOR_ID NO NO NO
    SPICE_HUNTER1 SH_PURCHASING_VW VEND_NOTES NO NO NO
    VENDOR_ID and ITEM_ID are the pks for those tables. I'm guessing I need to add a VENDOR_ID and an ITEM_ID to the VENDOR_ITEM table, then write a couple of update statements to get those fields popluated with their respective data. I'm reading up on 'key-preserved' tables and it's making sense. You will probably laugh, but I AM the "DBA." I'm actually the report developer for our company and we're trying out APEX to see if we can use it to redo a bunch of old poorly-designed Access databases. I'm flying by the skin of my teeth, the seat of my pants, and a bunch of deep sighs. I went through the basic APEx training about a year ago, am designing tables as I go only through my knowledge of query/report writing and keep coming up against things in APEX that keep me saying, "Huhhhhhhh?"
    Our purchasing department has an old poorly designed Access DB from which they can search vendors or items then see the results on one page. They need to be able to view the three areas of notes based on each search, i.e. they search by item then get this:
    Item # and Description
    Item Specific Notes Text Area
    Vendor # and Name
    Vendor Item Notes Text Area
    Vendor Specific Notes Text Area
    They search by Vendor they get this:
    Vendor # and Name
    Vendor Specific Notes Text Area
    Item # and Description
    Vendor Item NOtes Text Area
    Item Speicfic Notes Text Area
    Then, they need to be able to update those fields with any new information and that needs to update to their respective tables. I'm sure it's easy, and I'm sure it has to do with my LIMITED prowess of setting up my tables and learning that I can't have one form update more than one table (I learned that somewhere on this journey, hence the tries with the view) so I keep getting these ideas of how to do it, then running into snags.
    So thanks for your help!
    Alexandra

  • XMLType view WITH OBJECT ID

    Hallo,
    Can anyone explain me the purpose of the "with object id"-clause in an xmltype view in detail? According to the documentation the oid should uniquely identify each row in the view. But there is no error message if I choose an elements that occurs in multiple rows of the view. It is possible to choose an unavailable path to an ele-ment without any error messages, too ....
    Is it possible to choose a String as the OID too? I always get an "ORA-22973: size of object identifier exceeds maximum size allowed".
    thanxs,
    Vanessa

    object-id should provide a unqiue identifier. It's needed if you want to generate a ref() to the rows in the view (for instance if you want to folder the rows as documents in the xml db repository). It can also be used during query optimization

  • Inserting large xml data into xmltype

    Hi all,
    In my project I need to insert very large XML data into xmltype column.
    My table:
    CREATE TABLE TransDetailstblCLOB ( id number, data_xml XMLType) XmlType data_xml STORE AS CLOB;
    I am using JDBC approach to insert values. It works fine for data less than 4000 bytes when using preparedStatement.setString(1, xmlData). As I have to insert large Xml data >4000 bytes I am now using preparedStatement.setClob() methods.
    My code works fine for table which has column declared as CLOB expicitly. But for TransDetailstblCLOB where the column is declared as XMLTYPE and storage option as CLOB I am getting the error : "ORA-01461: can bind a LONG value only for insert into a LONG column".
    This error means that there is a mismatch between my setClob() and column. which means am I not storing in CLOB column.
    I read in Oracle site that
    When you create an XMLType column without any XML schema specification, a hidden CLOB column is automatically created to store the XML data. The XMLType column itself becomes a virtual column over this hidden CLOB column. It is not possible to directly access the CLOB column; however, you can set the storage characteristics for the column using the XMLType storage clause."
    I dont understand its stated here that it is a hidden CLOB column then why not I use setClob()? It worked fine for pure CLOB column (another table) then Why is it giving such error for XMLTYPE table?
    I am struck up with this since 3 days. Can anyone help me please?
    My code snippet:
    query = "INSERT INTO po_xml_tab VALUES (?,XMLType(?)) ";
              //query = "INSERT INTO test VALUES (?,?) ";
         // Get the statement Object
         pstmt =(OraclePreparedStatement) conn.prepareStatement(query);
         // pstmt = conn.prepareStatement(query);
         //xmlData="test";
    //      If the temporary CLOB has not yet been created, create new
         temporaryClob = oracle.sql.CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
         // Open the temporary CLOB in readwrite mode to enable writing
         temporaryClob.open(CLOB.MODE_READWRITE);
         log.debug("tempClob opened"+"size bef writing data"+"length "+temporaryClob.getLength()+
                   "buffer size "+temporaryClob.getBufferSize()+"chunk size "+temporaryClob.getChunkSize());
         OutputStream out = temporaryClob.getAsciiOutputStream();
         InputStream in = new StringBufferInputStream(xmlData);
    int length = -1;
    int wrote = 0;
    int chunkSize = temporaryClob.getChunkSize();
    chunkSize=xmlData.length();
    byte[] buf = new byte[chunkSize];
    while ((length = in.read(buf)) != -1) {
    out.write(buf, 0, length);
    wrote += length;
    temporaryClob.setBytes(buf);
    log.debug("Wrote lenght"+wrote);
         // Bind this CLOB with the prepared Statement
         pstmt.setInt(1,100);
         pstmt.setStringForClob(2, xmlData);
         int i =pstmt.executeUpdate();
         if (i == 1) {
         log.debug("Record Successfully inserted!");
         }

    try this, in adodb works:
    declare poXML CLOB;
    BEGIN
    poXML := '<OIDS><OID>large text</OID></OIDS>';
    UPDATE a_po_xml_tab set podoc=XMLType(poXML) WHERE poid = 102;
    END;

  • How to load the .xml file list from 'C:\Drag_list\Modified' into xmltype tb

    Hi all experts,
    I am in Oracle Enterprise Manager 11g 11.2.0.1.0.
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 22 11:40:23 2011
    is there anyone know why
    SQL> create or replace directory XMLDIR as '/xdb/faq/testdata'
    2 /
    SQL> set long 10000 pages 200 lines 150
    SQL> --
    SQL> select xmltype(bfilename('XMLDIR','2003.xml'),nls_charset_id('AL32UTF8'))
    2 from dual
    worked. but
    SQL> create or replace directory XMLDIR as 'C:\Drag_list\Modified';
    SQL> select xmltype(bfilename('XMLDIR','2011.xml'),nls_charset_id('AL32UTF8'))
    from dual
    did not work?
    IS there any way I can load the .xml file list from 'C:\Drag_list\Modified' into xmltype table?
    Thanks.

    did not work?Generally we'll need a bit more info than "it didn't work", was there an ora-X error message? What was the error?
    Assuming you're on *nix a 'C:\<folder name>\...' directory spec just plain won't work, the directory has to point to a valid storage location on the database server host.
    Try a host command (at the database server) and make sure the .xml file name and location is valid, in sqlplus a "bang" (exclamation) runs a host command, i.e.:
    SQL> !ls -l /xdb/faq/testdata
    ... usr grp ... 2003.xml
    ...But if you are on windows, its the `host` command:
    SQL> host dir c:\drag_list\modified
    mm/dd/yyyy ... 2011.xml
    ...  The create directory ... as ... must point to a valid storage location for it to work, at least that is step one.

  • SharePoint 2013---How to convert current left Navigation into tree view

    Hi All,
    I want to convert current left navigation into tree view in SharePoint 2013. When we click on Modify Navigation and set headers and links; I need that should be convert into tree view. All headers should be expandable to thier links.
    I just want tree view on navigation headers and links. not for all site and subsites which we can enabled from site settings --> Modify All Site settings --> Tree view
    Please help me Master Page editing on Navigation Generation.. Thanks in advance!
    Regards,
    Anna

    Hi Anna,
    If you want to replace the Quick Launch part with the custom treeview web part in master page, you can comment out or remove the quick launch code block "<!--SPM:<SharePoint:SPNavigationManager id="QuickLaunchNavigationManager.....>....<>-->",
    then insert the custom web part snippet code in proper location in seattle master page, then all pages inheriting the seattle master page will have this web part.
    Note, please back up the master page before customizing the original master page for recovery.
    http://msdn.microsoft.com/en-us/library/office/jj862341(v=office.15).aspx
    http://www.sharepointpals.com/post/Add-snippets-in-Page-layout-using-design-manager
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] 
    Daniel Yang
    TechNet Community Support

  • I have 2 screens at work and 1 screen at home. I was working on a power point presentation on 2 monitors. My window is now "stuck" when I Power Point. I cannot drag it back to a display or find any way to move it back into my view. Help!!!

    I have 2 screens at work and 1 screen at home. I was working on a power point presentation on 2 monitors with the presentation on monitor externally hooked up to my computer. My window is now "stuck" when I open Power Point. I cannot drag it back to a display or find any way to move it back into my view. Help!!!

    Here is what worked for me:
      My usb hub, being usb2, was too fast. I moved the wire to a usb port directory on my pc. That is a usb1 port which is slow enough to run your snyc.

Maybe you are looking for