Mainframe data loaded into Oracle tables - Test for low values using PL/SQL

Mainframe legacy data has been copied straight from the legacy tables into mirrored tables in Oracle. Some columns from the mainframe data had 'low values' in them. These columns were defined on the Oracle tables as varchar2 types. In looking at the data, some of these columns appear to have data that looks like little square boxes, not sure but maybe that is the way Oracle interprets the 'low values' in the original data into varchar. When I run a select to find all rows where this column is not null, it selects these columns. In the results of the select statement, the columns appear to be blank, however, in looking at the data in the column using SQL Developer, I can see the odd 'square boxes'. My guess is that the select statement is detecting that something exists in this column. Long story short, some how I am going to have to test this legacy data on the Oracle table using Pl/Sql to test for 'low values'. Does anyone have any suggestions on how I could do this????? Help! The mainframe data we are loading into these tables is loaded with columns with low values.
I am using Oracle 11i.
Thanks
Edited by: ncsthbell on Nov 2, 2009 8:38 AM

ncsthbell wrote:
Mainframe legacy data has been copied straight from the legacy tables into mirrored tables in Oracle. Not a wise thing to do. Mainframe operating systems typically use EBCDIC and Unix and Windows servers use ASCII. The endian is also different (big endian vs little endian).
Does anyone have any suggestions on how I could do this????? As suggested, use the SQL function called DUMP() to see the actual contents (in hex) of these columns.

Similar Messages

  • Extracting explanations from planning app and loading into Oracle table

    Hi All,
    I had a requirement where I had to extract data from a planning application through ODI 11g and load it into Oracle RDBMS.
    I used essbase as my source in technology (since planning data is stored on essbase side) and oracle as my target.
    Now the data is getting extracted from essbase side and is getting loaded into Oracle table through ODI.
    Now the client requires that they want to extract the explanations or text values also from planning application and load them into Oracle table.
    How this can be achieved?Is there a table on the sql side(since sql database is being used at back end for planning app) which stores the explanations,if yes please let me know which table it is.
    Kindly help me with this requirement.

    Hi,
    IKM SQL Control Append is perfect if you don't need incremental updates. If you need it, go for IKM Oracle Incremental Update (MERGE) or something like that.
    Regards,
    JeromeFr

  • Data Load to Oracle Tables.

    Dear User,
    I have a requirement where I need to create a new Apex application that will allow the Planning department to create Item Lists and Locations lists. They will build the lists based on values (location or Item) that they paste from their Spreadsheets into the Apex App.
    Location list will be in the below Format.
    "02-05-07-14-15-19-20-21-23-25-27-28-44-47-53-54-61-63-65-66-68-69-74-75-77-79-81-85-86-87-89-90-92-95-96-97-98-99-101-103-105-107-111-112-116-119-120-127-130-133-139-143-147"
    And Item List will be in the below Format.
    7310468
    1009521
    4490033
    4490156
    4490318
    4490334
    4490059
    4490083
    I need to load the Location List Data and Item_list Data into two different tables "Loc_List_stage" and "Item_list_stage". Every Location should be on a different line and same with the Item List.
    Any Help or suggestion will be appreciated.
    Thanks!
    NS

    Hi,
    Go to: SQL Workshop -> Utilities -> Data Workshop
    In the Data Load section choose: Text Data
    Load To : Existing table
    Load From: Copy and paste
    Next choose the schema in which your table is present in which you want to load data
    and then select the table name.
    Then copy and paste the data to be uploaded and then can upload the data.
    See if it works!
    Regards,
    Kiran

  • How to make data loaded into cube NOT ready for reporting

    Hi Gurus: Is there a way by which data loaded into cube, can be made NOT available for reporting.
    Please suggest. <removed>
    Thanks

    See, by default a request that has been loaded to a cube will be available for reporting. Bow if you have an aggregate, the system needs this new request to be rolled up to the aggregate as well, before it is available for reporting...reason? Becasue we just write queries for the cube, and not for the aggregate, so you only know if a query will hit a particular aggregate at its runtime. Which means that if a query gets data from the aggregate or the cube, it should ultimately get the same data in both the cases. Now if a request is added to the cube, but not to the aggregate, then there will be different data in both these objects. The system takes the safer route of not making the 'unrolled' up data visible at all, rather than having inconsistent data.
    Hope this helps...

  • Master data Load from Oracle table

    Hi,
    My master data comes from an Oracle table. The table has both attributes and texts combined. How do I load the Master data into the text and attribute info objects thru Direct Upload of Master Data?
    Is it necessary to go in for Flexible Upload in this case?
    Regards

    Hi,
    you can create two views on the table. One for the text and the other one for the attributes. Create your datasources on these views and assign them to your infoobject.
    regards
    Siggi

  • How can I load string type fielt into oracle table as a date?

    I have a date field in oracle table(target) and my source is ms sql server. In my source table I have string type field include date data like '20150501'. I wanna load that data into oracle as a date field. In my target table this field type is date. But I cant load that data. It seems empty.I use convert function and its format is mssql format. How can I achive this? thanks in advance

    시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]시흥 QIQ-9529-1551 정왕동출장안마 ‡ 정왕동출장마사지 월곶출장안마]

  • Incorrect data value when insert into oracle table

    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.

    user11432758 wrote:
    Would like to ask expert here, how could I insert data into oracle table where the value is 03 ? The case is like that,  the column was defined as varchar2(50) data type, and I have a csv file where the value is 03 but when load into oracle table the value become 3 instead of 03.
    implicit datatype conversion to NUMBER can result in leading zero to be eliminated.
    How do I ask a question on the forums?
    https://forums.oracle.com/message/9362002#9362002

  • Importing SAS Datasets into Oracle Tables

    Is there a way to load SAS Data sets into Oracle Tables through SQL loader/SQL Dvlpr Migration Workbench/DataPump?
    MS Access has facility to import SAS Datasets into its .mdb files,
    but Would greatly appreciate if anyone could suggest a direct load into Oracle
    Volume : 0.4 M records
    Thanks a bunch!

    Hello,
    Datapump can use Dump from Datapump only. So, I don't think this utility could help you.
    SQL*Loader could be useful if you can extract from SAS a formated file (for instance CSV file).
    Oracle SQL Developer can help you to migrate data from MS Access to Oracle.
    Please, find below a useful link about how to migrate data from SAS to Oracle:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:87316000346302739
    Hope this help.
    Best regards,
    Jean-Valentin

  • Loading data from .csv file into Oracle Table

    Hi,
    I have a requirement where I need to populate data from .csv file into oracle table.
    Is there any mechanism so that i can follow the same?
    Any help will be fruitful.
    Thanks and regards

    You can use Sql Loader or External tables for your requirement
    Missed Karthick's post ...alredy there :)
    Edited by: Rajneesh Kumar on Dec 4, 2008 10:54 AM

  • Load Huge data into oracle table

    Hi,
    I am using oracle 11g Express Edition, I have a file of .csv forma, Which has a data of size 500MB which needs to be uploaded into oracle table.
    Please suggest which would be the best method to upload the data into table. Data is employee ticket history which is of huge data.
    How to do the mass upload of data into oracle table need experts suggestion on this requirement.
    Thanks
    Sudhir

    Sudhir_Meru wrote:
    Hi,
    I am using oracle 11g Express Edition, I have a file of .csv forma, Which has a data of size 500MB which needs to be uploaded into oracle table.
    Please suggest which would be the best method to upload the data into table. Data is employee ticket history which is of huge data.
    How to do the mass upload of data into oracle table need experts suggestion on this requirement.
    Thanks
    SudhirOne method is to use SQL Loader (sqlldr)
    Another method is to define an external table in Oracle which is allowing you to view your big file as a table in database.
    You may want to have a look at this guide: Choosing the Right Export/Import Utility and this Managing External Tables.
    Regards.
    Al
    Edited by: Alberto Faenza on Nov 6, 2012 10:24 AM

  • Load xml data into oracle table

    Hi,
    How to load the xml data in to oracle table plz guide in this context
    thanks

    Use the DBMS_XMLSAVE.INSERTXML procedure.
    It works fine.

  • XML data into Oracle Tables. XML file on Application Server.Oracle Apps R12

    Hi All,
    My Database version : 11.2.0.2.0
    I have an XML file which needs to be loaded into the Database Tables. How ever i do not want to use the XMLTYPE as given below
    insert into test1 (
    SELECT PrcDate, PmtType, PmtStatus, PmtTypeCount, PmtTypeAmt
    FROM XMLTABLE(
    '/WFPaymentAck/RejectedDom1ACH'
    PASSING XMLTYPE( BFILENAME('ECX_UTL_LOG_DIR_OBJ','wf_test_xml.XML'), NLS_CHARSET_ID('UTF8') )
    COLUMNS
    PrcDate VARCHAR2(2000) PATH '@PrcDate' ,
    PmtType VARCHAR2(2000) PATH '@PmtType' ,
    PmtStatus VARCHAR2(100) PATH '@PmtStatus' ,
    PmtTypeCount VARCHAR2(100) PATH 'PmtTypeCount' ,
    PmtTypeAmt VARCHAR2(100) PATH 'PmtTypeAmt'
    Because this way the XML file needs to reside on the DB server.
    I am looking into other option of loading the XML file into a CLOB column of a table and reading it from that column.
    I did a couple of tests and feel that this way also the XML file has to reside on the Database Server itself. I am not sure if this is correct or if there is any problem with our TEST instance.
    ++Can anyone let me know if i need to have the XML file on the DB server instead of the Application server to load into a CLOB column of table ??++
    ++Or++
    ++Is there any other workaround for me to load XML into Oracle Tables, while having the XML file on Application Server.++
    Your immediate help is appreciated. I need to get past this ASAP.
    Thanks in Advance.
    VJ

    1) Are you asking me to create a folder on Database directory which points to a folder on the Apps server ?I suggest creating an Oracle directory object (a database object) pointing to a real location (folder) on Application server.
    we DONOT want a hand shake between the DB Server and the APPS server.I don't see where the problem is.
    I'm not familiar with Apps R12 but there's no doubt the two servers are already communicating, at least App server should be able to access the DB for the whole thing to run.
    As I said :
    One way or another, the data has to make its way to the database, there's no workaround to that.How do you imagine the data will end up in a database table if it doesn't come to the DB server?
    There's no magical method out there, both servers have to communicate at some point.
    About client-server approaches (client being here the App server), you can read about accessing the XML DB repository in the XML DB Developer's Guide : http://download.oracle.com/docs/cd/E11882_01/appdev.112/e23094/toc.htm
    Other option : SQL*Loader can load a CLOB, or an XMLType column too
    Edited by: odie_63 on 19 déc. 2011 20:22

  • SQL Loader - Loading Text File into Oracle Table that has carriage returns

    Hi All,
    I have a text file that I need to load into a table in Oracle using SQL Loader. I'm used to loading csv or comma delimited files into Oracle so I'm not sure what the syntax is when it comes to loading a text file that essentially has one value per row and each row is separated by a carriage return. So when you open the text file, the records look like this:
    999999999 <CRLF>
    888888889 <CRLF>
    456777777 <CRLF>
    456555535 <CRLF>
    345688888 <CRLF>
    So each row is separated by a hard return and I need to tell sql loader that the hard return or next row is the next value to insert into the table. Below is an example of a control file I tend to use as a template for loading csv files but I need to modify it to accomodate this new structure.
    OPTIONS (DIRECT=TRUE,ROWS=100000)
    UNRECOVERABLE
    LOAD DATA
    INFILE 'C:\input.txt'
    BADFILE 'C:\input.bad'
    APPEND
    INTO TABLE TEST_TABLE
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    COLUMN_1
    How to I modify the control file above to use hard returns as the field/row delimiter for my text file?
    Thanks

    Hi there,
    Obviously my intention wasn't to post the same message 4 times....I pressed the "Submit Message" button but the submission hung and I pressed it a few times and finally it worked but it created several versions of my post. You need to allow users the ability to delete there own postings...I was looking for this option but didn't have it.
    Sorry

  • How to store XML data into Oracle Table

    I had trouble to store XML data into Oracle Table with XDK (Oracle 8.1.7 ). The error is:
    C:\XDK_Java_9_2\xdk\demo\java\Test>java testInsert Dept.xml
    <Line 1, Column 1>: XML-0108: (Fatal Error) Start of root element expected.
    Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: Start of root element expected.
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2263)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1333)
    at testInsert.main(testInsert.java:8)
    Here is my xml file:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <DEPTNO>10</DEPTNO>
    <DNAME>ACCOUNTING</DNAME>
    <LOC>NEW YORK</LOC>
    </ROW>
    <ROW num="2">
    <DEPTNO>20</DEPTNO>
    <DNAME>RESEARCH</DNAME>
    <LOC>DALLAS</LOC>
    </ROW>
    <ROW num="3">
    <DEPTNO>30</DEPTNO>
    <DNAME>SALES</DNAME>
    <LOC>CHICAGO</LOC>
    </ROW>
    <ROW num="4">
    <DEPTNO>40</DEPTNO>
    <DNAME>OPERATIONS</DNAME>
    <LOC>BOSTON</LOC>
    </ROW>
    </ROWSET>
    and here is structure of table:
    Name Null? Type
    DEPTNO NOT NULL NUMBER(2)
    DNAME VARCHAR2(14)
    LOC VARCHAR2(13)
    and here is my Java Code:
    import java.sql.*;
    import oracle.xml.sql.dml.OracleXMLSave;
    public class testInsert{
         public static void main(String[] args) throws SQLException{
              Connection conn = getConnection();
              OracleXMLSave sav = new OracleXMLSave(conn,"scott.tmp_dept");
              sav.insertXML(args[0]);
              sav.close();
              conn.close();
         private static Connection getConnection()throws SQLException{
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@amt-ebdev01:1521:mydept","scott","tiger");
              return conn;
    Could you help me ? Thanks !

    The problem is that you need to pass avalid URL , Document...
    Please try this code instead:
    import java.net.*;
    import java.sql.*;
    import java.io.*;
    import oracle.xml.sql.dml.OracleXMLSave;
    public class testInsert
    public static void main(String[] args) throws SQLException{
    Connection conn = getConnection();
    OracleXMLSave sav = new OracleXMLSave(conn,"scott.temp_dept");
    URL url = createURL(args[0]);
    sav.insertXML(url);
    sav.close();
    conn.close();
    private static Connection getConnection()throws SQLException{
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@dlsun1982:1521:jwxdk9i","scott","tiger");
    return conn;
    // Helper method to create a URL from a file name
    static URL createURL(String fileName)
    URL url = null;
    try
    url = new URL(fileName);
    catch (MalformedURLException ex)
    File f = new File(fileName);
    try
    String path = f.getAbsolutePath();
    // This is a bunch of weird code that is required to
    // make a valid URL on the Windows platform, due
    // to inconsistencies in what getAbsolutePath returns.
    String fs = System.getProperty("file.separator");
    if (fs.length() == 1)
    char sep = fs.charAt(0);
    if (sep != '/')
    path = path.replace(sep, '/');
    if (path.charAt(0) != '/')
    path = '/' + path;
    path = "file://" + path;
    url = new URL(path);
    catch (MalformedURLException e)
    System.out.println("Cannot create url for: " + fileName);
    System.exit(0);
    return url;

  • Insert XML data into oracle table

    I want to insert xml data returned by the VB code into oracle table.
    As a prequisite I have installed the XDK capabilities for Oracle by installing JServer & running
    SQL scripts catxsu.sql,xmlparserv2.jar,load.sql to load the XMLSQL Utility (DBMS_XMLQuery) into the database.
    I have also granted following privileges to the user.
    Grant users access to XMLParser and XMLDom packages:
         grant execute on xmldom to public;
         grant execute on xmlparser to public;
         create public synonym xmldom for sys.xmldom;
         create public synonym xmlparser for sys.xmlparser;
    But still i am not able to create procedure which will accept input parameter as an XML document coming from front end which in turn will insert that record into simple oracle table . I am using Oracle 8.1.7
    Thanks in advance

    Would you specify the database version?
    Since DBMS_XMLSave requires DOM, you normally need to divide the huge XML before insertion.

Maybe you are looking for