SQLLoader Issue

Hi ,
I am trying to load a flat file by sqlloader
My database is oracle 11g on unix server.
In my control file for the load is specified the character set to
CHARACTERSET UTF8
So the following data got converted to
e.g Beyoncé > Beyonc�
I then changed the character set to
CHARACTERSET WE8EBCDIC500
Now the data was not loaded at all.
How can I load the following type of data as is
Beyoncé > Beyoncé
Please let me know
Rgds
S

Deja vu.
Duplicate question.
Re: SQL Loader Issue

Similar Messages

  • Updating a table from two nodes simultaneously using sqlloader- Issues..

    Hi,
    I have a two node RAC. I have a table called PARTS1, has an PK+Index on PART column, Again this has a sequence. Now I am loading data on PARTS1 table using sqlloader from both nodes at the same time. What issues will come?
    Since one column of this table has a PK+Sequence+Index, there will be a contention issue with the block while updating records.. am I right? What other isues might appear here?
    Thanks in advance,
    Lily.

    user7993571 wrote:
    Consider two databases
    db10gA and db10gB which is having a db link from A to B
    There is a user A in db10gA
    and another user B in db10gB
    the user require to insert,update,delete records of user B tables
    so how is the DML privileges are granted to user A to perform these tasks at db10gB database
    whether it is the type of db link decides to do these tasks
    whether any synonym created at db10gA side might help to do the jobUser A will act on behalf of the user who has created the DBLINK; for example if you have created the DBLINK with a user having a DBA role; and grant the DBLINK access to A, A can act on behalf of the DBA who has created the DBLINK.

  • SQLLOADER issues with Network Drive

    Hi ,
    I am running Oracle 10g in my PC ( Windows XP Professional ) in D Drive. I have created Oracle Directory and mapped to Network Drive Z: I have created external table successfully with this Directory. When i run select statement, i am getting the below error. All the permissions have given on Network Drive.
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file TBL006.txt in DI_EXTERNAL_TABLE not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    ORA-06512: at line 1
    Kindly advice me on the above issue, if you know the solution.
    Thanks in Advace
    Hanimi Reddy

    There is no solution.
    Oracle simply has never supported networked drives, because you would need to run Oracle using the domain administrator account.
    This poses security risks.
    You need to copy the file to a local drive.
    Sybrand Bakker
    Senior Oracle DBA

  • SQLLoader issues of Oracle RAC with ASM

    One of our client wants to use Oracle RAC with ASM for our application, i just want to know if there would be any two-phased commit transactions and SQL*Loader issues in ASM.
    Database is Oracle 10g

    ASM works only at storage layer and has nothing to do with:
    - distributed transactions
    - client executable that connects to database instance: SQL*Loader, SQL*Plus, etc.
    RAC has also nothing to do with distributed transactions: a RAC database is a single database with multiple instances but still a single database; there is no need to use distributed transactions because you have a RAC database.
    Edited by: P. Forstmann on 24 févr. 2011 13:27
    Edited by: P. Forstmann on 24 févr. 2011 13:31

  • SqlLoader issue from which path i have to execute the SqlLoader Command

    Hi,
    I created .ctl file and moved the file on the server.
    My problem is from which path i have to execute the SqlLoader command.
    Logged into putty, /home/mydirectory
    executed the command: sqlldr userid=apps/apps@p012 control=nstock_active.ctl
    but i get, command not found.
    Could you suggest me.
    Thanks.

    Srini,
    here is my full .ctl file
    LOAD DATA
    INSERT INTO TABLE XXCIV_INV
    APPEND
    --REPLACE
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    PO_NUM "Ltrim(Rtrim(:PO_NUM))",
    PO_LINE_NUM "Ltrim(Rtrim(:PO_LINE_NUM))",
    ITEM_NUMBER "Ltrim(Rtrim(:ITEM_NUMBER))",
    RECEIPT_NUMBER "Ltrim(Rtrim(:RECEIPT_NUMBER))",
    RECEIPT_LINE_NUM "Ltrim(Rtrim(:RECEIPT_LINE_NUM))",
    RECEIVED_QTY "Ltrim(Rtrim(:RECEIVED_QTY))",
    PO_QTY "Ltrim(Rtrim(:PO_QTY))",
    ID "Ltrim(Rtrim(:ID))",
    ITEM_ID "Ltrim(Rtrim(:ITEM_ID))",
    TRACE_TYPE "Ltrim(Rtrim(:TRACE_TYPE))",
    LOT_NUMBER "Ltrim(Rtrim(:LOT_NUMBER))",
    INVENTORY_ID "Ltrim(Rtrim(:INVENTORY_ID))",
    OBJECT "Ltrim(Rtrim(:OBJECT))",
    BATCH "Ltrim(Rtrim(:BATCH))",
    CREATION_DATE "NVL(TO_DATE(REPLACE(Ltrim(Rtrim(substr(:CREATION_DATE,1,9))),'NULL'),'MM/DD/RRRR'),TO_DATE(SYSDATE))",
    CREATED_BY "Ltrim(Rtrim(:CREATED_BY))",
    LAST_UPDATE_DATE "NVL(TO_DATE(REPLACE(Ltrim(Rtrim(substr(:LAST_UPDATE_DATE,1,9))),'NULL'),'MM/DD/RRRR'),TO_DATE(SYSDATE))",
    LAST_UPDATED_BY "Ltrim(Rtrim(:LAST_UPDATED_BY))",
    REQUEST_ID "Ltrim(Rtrim(:REQUEST_ID))",
    MFG "Ltrim(Rtrim(:MFG))",
    FILE_NAME "Ltrim(Rtrim(:FILE_NAME))",
    ROW_ID "Ltrim(Rtrim(:ROW_ID))"
    begindata
    0,1,R5531251-02,NA,1,1,8000,10000,WR551251-002,D2,,CMPX0001596,CMPX0001596,0,7/27/2011 14:00,-1,7/27/2011 14:00,-1,-1,HI,,
    0,1,R5534149-01,NA,1,1,3000,10000,WR5534149-001,D2,,HCMPX0001597,HCMPX0001597,0,7/27/2011 14:00,-1,7/27/2011 14:00,-1,-1,CHI,,

  • Strange sqlloader loader issue with carriage return in Unix

    Oracle 10g
    Solaris
    Hi All, I'm having issues in running some data into a table via sqlloader. The data was extracted using concatanated SQL with a | delimiter. sql script was executed in the shell to produce the data file.
    eg
    a,b,c|
    d,e,f|
    The control file specifies a string terminator as "str '|\n'" but when i run the sqlloadr command on the unix box I states that
    no terminator found after TERMINATED and ENCLOSED field.
    Ive tried it with \n\r same sort of issue.
    The strange scneario i encountered was when I just specified "str '|'" as I read unix would default to \n, the weird thig was that my 6 records DID load into the table succesfully but a bad file was produced with a | character in it and the log file specfied that it tried to load 7 records where 6 were succesfull and 1 failed even though I only had 6 record to play with in the 1dst place.
    Any ideas / thoughts greatly appreciated?!
    Kind regards
    Satnam

    Hi All,
    Ive updated the problem..with some output... essentially Ive get it to a situation wher I load ALL my records into the table but I still get a bad file with a "|" record issue and the log file still syas that Im trying to load 7 record when I only have the 6 records.
    ...............SQL statment...
    set trimpspool on
    set feedback off
    set heading off
    set linesize 500
    set pagesize 0
    spool loaddata_FP.lst
    SELECT '"'||spart.x_lsm_region||'"'||','||
    '"'||spart.x_sub_type||'"'||','||
    '"'||spart.x_origin_type||'"' ||'|'
    FROM siebel.cx_ls_part_ship spart;
    spool off
    -- sample of control file
    load data infile 'loaddata_FP.lst' "str '|'"
    into table siebel_data_fp fields terminated by "," optionally enclosed by '"'
    (x_lsm_region,
    x_sub_type,
    x_cust_face_staff,
    x_nature_partner,
    x_origin_type)
    --sample log file with error why is it telling me I have 7 records when I am processing 6?
    value used for ROWS parameter changed from 64 to 22
    Record 7: Rejected - Error on table SIEBEL_DATA_FP, column X_SUB_TYPE.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Table SIEBEL_DATA_FP:
    6 Rows successfully loaded.
    1 Row not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    --- sample bad file showing the pipe ... whay is sqlloader trying to process this pipe when its part of the record...
    /u01/oracle/admin/adhoc/xxxl(TESTxx)$
    /u01/oracle/admin/adhoc/xxx(TESTxx)$ vi FCT_PARTNERSHIP_ldrcontrol.bad
    "FCT_PARTNERSHIP_ldrcontrol.bad" [Incomplete last line] 2 lines, 213 characters
    |
    ~
    ~
    ~
    any help appreciated!
    Edited by: spliffer on 04-May-2010 05:06

  • SQLLoader, direct path load issue

    Hi all,
    I have a sqlldr control file which has couple of columns like,
    my_column_1 ,
    my_column_2 "decode(:my_column_1,'ONE','AAA','TWO','BBB', :my_column_1)"
    The table I am loading to is in user X and I am running the load from user Y. Everything works fine with conventional path load (not direct path) as grants are made for the table to user Y.
    When I load the data with same control file with direct path, I get an error ,
    01031 - insufficient privileges
    Is this anything to do with the syntex I have used in the control file or its a privilege issue. If its a privilege issue which privilege is that ?
    I did following tests,
    1) Load is run with conventional path load, from user Y and the decode statement is in control file - Load works
    2) Load is run with direct path load, from user Y and decode statement is in control file - Load fails with above mentioned error
    3) Load is run with direct path load, from user Y and decode IS REMOVED from the control file - Load works (!!!)
    What can be the conclusion? Way out ?
    Thanks and Regards

    <quote>What can be the conclusion? Way out ?</q>
    Adi is right ... in conventional mode, sqlldr will go through the SQL engine to insert data in your table (and the SQL engine knows what DECODE is); in direct path mode, sqlldr formats database blocks directly ... so it cannot do SQL functions.
    A way out ... load my_column_1 into the table the way you do and put a view on top having the extra my_column_2 with the decode on my_column_1.

  • SQLLOADER  DATE FORMAT ISSUE.

    I have One SQLLOADER.ctl File I am trying to load data I am getting error ORA-01843: not a valid month
    OPTIONS ( SKIP=1)
    LOAD DATA
    INFILE 'C:\amar\estimateledger\estimateledger_2.txt'
    BADFILE 'C:\amar\estimateledger\estimateledger_2.bad'
    DISCARDFILE 'C:\amar\estimateledger\estimateledger_2.dsc'
    INTO TABLE "FINANCE"."ESTIMATELEDGER"
    FIELDS TERMINATED BY '|'
    optionally enclosed by '"'
    TRAILING NULLCOLS
    (ESTIMATELEDGERID,
    COSTTYPEID,
    YEAR,
    MONTH,
    HOURS,
    RATE,
    CAPAMT,
    EXPAMT,
    SOFTCAPPCT,
    OVERHEADHOURS,
    OVERHEADAMT,
    APPID,
    PROJECTESTIMATEID,
    ORGID,
    GROUPID,
    COSTAMT,
    ITUPPHASEID,
    VENDORID,
    ROLENUMBER,
    SUBCOSTTYPEID,
    TEHOURS,
    CREATEDBY,
    CREATEDON "MM/DD/YY HH:MI:SS AM",
    UPDATEDBY,
    LASTUPDATED "MM/DD/YY HH:MI:SS AM",
    RELEASEID,
    WORKACTIVITYID,
    DEPTID,
    SPREADMODELID,
    TAXAMOUNT,
    PROJECTID,
    APPESTIMATORID,
    VPMOID,
    PMTID,
    OLDDEPTID,
    LASTDEPTUPDATEDATE "MM/DD/YY HH:MI:SS AM") this is my .ctl file
    data looks like
    31190609|111|2005|8|0.079|48|||50|0|0|38|2202|||3.768||0|2006|17|0|dd3031|10/13/2005 4:24:29 PM|dd3031|10/13/2005 4:24:29 PM|54414||72|0|0|1320|||||
    please do advise what need s to be done

    Pl post details of OS and database versions, along with a description of the table being loaded and the complete loader log file
    HTH
    Srini

  • Sqlloader : is there any performance issue ?

    hI fRIENDS,
    The below is sqlldr command ( i am using direct path ) and control file .
    sqlldr
    sqlldr $databaseConnectionString parfile=$parameterFile log=$logPath/sqlloader.log bad=$logPath/sqlloader.bad direct=true
    control file (long one :))
    LOAD DATA
    INFILE 'fact.dat' "str '\n'"
    INTO TABLE sqlldr_feed_fact_mtd
    TRUNCATE
    WHEN VW = 'Periodic'
    FIELDS TERMINATED BY ';'
    (PERIOD POSITION(1) CHAR ,
    VW CHAR,
    AMOUNT CHAR,
    BRANCH CHAR,
    ACCOUNT CHAR,
    VALUE1 CHAR,
    VALUE2 CHAR,
    VALUE3 CHAR,
    CUSTOM4 CHAR,
    PARTY CHAR,
    DDATA INTEGER EXTERNAL)
    INTO TABLE sqlldr_feed_fact_qtd
    TRUNCATE
    WHEN VW = 'QTD'
    FIELDS TERMINATED BY ';'
    (PERIOD POSITION(1) CHAR,
    VW CHAR,
    AMOUNT CHAR,
    BRANCH CHAR,
    ACCOUNT CHAR,
    VALUE1 CHAR,
    VALUE2 CHAR,
    VALUE3 CHAR,
    CUSTOM4 CHAR,
    PARTY CHAR,
    DDATA INTEGER EXTERNAL)
    INTO TABLE sqlldr_feed_fact_ytd
    TRUNCATE
    WHEN VW = 'YTD'
    FIELDS TERMINATED BY ';'
    (PERIOD POSITION(1) CHAR,
    VW CHAR,
    AMOUNT CHAR,
    BRANCH CHAR,
    ACCOUNT CHAR,
    VALUE1 CHAR,
    VALUE2 CHAR,
    VALUE3 CHAR,
    CUSTOM4 CHAR,
    PARTY CHAR,
    DDATA INTEGER EXTERNAL)
    number of rows in date file is 847055. there can be more rows in near future for that .dat file.
    when i execute above - it takes 12mins... is it ok ??
    please give ur comment!

    I can load 3 million rows with direct path load in well under 1 minute.
    I guess there are several factors involved in performance where SQL*Loader is concerned.
    e.g.
    1. is the data residing on the server and SQL*Loader being run from the server? If so, it should be fast. If the data however resides on a client machine and SQL*Loader is being run from the client then you will have network delay for all the data being sent over the network. Even worse if the data resides on a networked drive and SQL*Loader is being run from a client as the data has to be fetched over the network, to be sent back over the network to the database server.
    2. What is the hardware spec of the server? Obviously the more powerful the server, the faster disks it has etc. the faster the data can be loaded.
    3. You're loading data conditionally to split it into different tables. That will add a slight overhead to the processing.
    etc.

  • How to ensure File Read Adapter handles like SQLLOADER's TRAILING NULLCOLS

    I have to read a CSV file which has a specific format but sometimes the trailing columns values can be missing and i would like to handle it in such way that they values are treated as null. This is similar to the SQLLoader's TRAILING NULLCOLS clause.
    Currently if my data is as shown below:
    As-Of Date,As-Of-Time,Bank ID,Bank Name,State,Acct No,Acct Type,Acct Name,Currency,BAI Type Code,Tran Desc,Debit Amt,Credit Amt,0 Day Flt Amt,1 Day Flt Amt,2+ Day Flt Amt,Customer Ref No,Value Date,Location,Bank Reference,Tran Status,Descriptive Text,Descriptive Text1,Descriptive Text2,Descriptive Text3,Descriptive Text4,Descriptive Text5,Descriptive Text6
    20061031,23:59:00,121000248,"WELLS FARGO BANK, N.A.",CA,4121235097,COMMERCIAL DDA,Silicon Image - A/P,USD,475,CHECK PAID,55.86,0,0,0,0,51689,10/31/2006,,IA000313659233,POSTED,,,,,,,
    20061031,23:59:00,121000248,"WELLS FARGO BANK, N.A.",CA,4121235097,COMMERCIAL DDA,Silicon Image - A/P,USD,475,CHECK PAID,1377.57,0,0,0,0,51685,10/31/2006,,IA000210166161,POSTED
    20061031,23:59:00,121000248,"WELLS FARGO BANK, N.A.",CA,4121235097,COMMERCIAL DDA,Silicon Image - A/P,USD,475,CHECK PAID,1435,0,0,0,0,51621,10/31/2006,,IA000627084628,POSTED
    It reads the first row properly , but when in encounters the second row POSTED column , it tries to find the terminated column and since it is not present it reads data from the next line until it finds a comma.
    This is not the way i would like to handle it.
    We get around 1000-2000 records in that CSV from the Bank and they cant change the way they are sending the file. So , please help in resolving this issue.
    Thanks
    Sridhar

    Hi thanks for the reply
    well i've been having a play around but haven't got it to work yet,
    Here's what i have so far
    private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {
             BufferedReader  sb = new BufferedReader();
           sb.append(""+jTextField1.setText()+",");
           sb.append(""+jFormattedTextField1.setText()+"\n");
           sb.append(""+jTextField2.setText()+",");
           sb.append(""+jFormattedTextField2.setText()+"\n");
           sb.append(""+jTextField3.setText()+",");
           sb.append(""+jFormattedTextField3.setText()+"\n");
           sb.append(""+jTextField4.setText()+",");
           sb.append(""+jFormattedTextField4.setText()+"\n");
           sb.append(""+jTextField5.setText()+",");
           sb.append(""+jFormattedTextField5.setText()+"\n");
           ReadFromFile(sb.toString());
        private void ReadFromFile(String s) {
            try {
            BufferedReader in = new BufferedReader(new FileReader("/users/data.txt"));
            String str;
            while ((str = in.readLine()) != null) {
                Process(str);
            in.close();
        } catch (IOException e) {
        }// TODO add your handling code here:
                    }im thinking the problem is the parts that say sb.append but i don't know what to in it's place?

  • Upload excel sheet data through sqlloader into oracle tables

    hi everyone,
    i am working with excel sheet with following records
    8501      Jacob Marshall      15000      21/10/2009      Finance
    8502      Chris Campell      50000      13/06/2008      R&D
    8503      Simon Dough      50000      3/07/2008      Engineering
    8504      Mark Haggai      75000      9/3/2006      Product Management
    8505      Verica Beverley      45000      7/2/2008      HR
    and i saved it in emp_details.csv
    after that when i write following code to make control file
    load data
    infile 'C:\Documents and Settings\prashant_dabral\Desktop\a.txt'
    into table tmp
    field terminated by','optionally enclosed by" "
    (emp_no,emp_name,salary,doj,dept_name)
    after this pl\sqldev returning me error message that ORA-00900:invalid sql statement
    can anybody tell me how to resolve issue
    or
    another method to Upload excel sheet data through sqlloader into oracle tables

    A control file is a file located on the operating system, not some SQL or PL/SQL code you try and execute.
    Create the control file as a file and then use that to load your data with SQL*Loader from the command line.
    http://www.morganslibrary.org/reference/sqlloader.html
    Or better still, create it as an external table and then you don't need a seperate control file or need to use sql loader from the command line...
    http://www.morganslibrary.org/reference/externaltab.html

  • Issue after succesfully loading xml into 11gr2 database

    Hi All,
    I'm currently experiencing an issue with a project I'm working on at a customer:
    I have succesfully loaded multiple xml files into the Oracle 11gr2 database using sqlloader and since the intention is to be able to query the loaded data, it needs
    to be transferred from the xml table to a 'normal' table, which also went ok.
    Since most of the XML files contain multiple records, i've used the fn:string-join option in the insert into....select statement and used a ; as delimiter.
    This is where I've encountered the thing that I can't seem to find a solution for.
    When there's multiple records in the xml file it inserts all the records into one record.
    So say i've got an xml file containing info for a bunch of electricity meters consisting of the fields brand, supplier, type for 3 records (actual files can be uploaded if neccesary)
    inserting the data by using the above construction gives me the following data in the destination table:
    Brand
    BrandA;BrandB;BrandC
    Supplier
    Company1;Company2;Company3
    Type
    Type1;Type2;Type3
    How do I split up the above info so that every separate record from the imported xml file lands in its own record?
    Thanks in advance!
    Cheers,
    E.

    Thanks, I'm curious on how you'll demo it
    Here's the sample xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--XML file generated by Protocol Manager-->
    <tns:Main Company="Company" Supplier="Supplier" xmlns:tns="http://schema.dsmr22plus.com/delivery/v1.0.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schema.dsmr22plus.com/delivery/v1.0.5 ..\..\..\xmllib\bla\DeliveryFile.xsd">
    <tns:Header DeviceType="ME382-D1 GPRS" BatchNumber="NC2043W_59" /><tns:DeviceAttributes YearOfManufactory="2011" CoreFirmwareVersion="14DA21B4B6F53C47613466AF8C263209" SerialNumber="50727236" OperationalFirmwareVersion="B330EBC763450ADC3E0C11F9BA0EA732" HardwareVersion="20611978">
    <tns:Emeter>
    <tns:DSMRAttributes DSMRVersion="2.3" BatteryType="Supercap type SG" EquipmentIdentifier=" KAL7005072723611" KemaGastecCode="KAL7" GOVersion="1" />
    <tns:GPRS>
    <tns:DlmsAttributes GlobalEncryptionKeyUnicast="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" GlobalEncryptionKeyBroadcast="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" P0Password1="12345678" AuthenticationKey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" HDLCPassword="12345678" MasterKey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
    <tns:GPRSCommunicationAttributes>
    <tns:SimCard MSISDN="" ICCID="8931084811080544999" CommunicationProviderBatchId="5765" IMSI="204080800339599" CommunicationProvider="KPN" />
    <tns:Modem IMEI="353471006235660" PPPPassword="xxxxxxxxxxxxxxx" PPPUsername="KAL7005072723611" />
    </tns:GPRSCommunicationAttributes>
    </tns:GPRS>
    </tns:Emeter>
    </tns:DeviceAttributes>
    <tns:DeviceAttributes YearOfManufactory="2011" CoreFirmwareVersion="14DA21B4B6F53C47613466AF8C263209" SerialNumber="50727237" OperationalFirmwareVersion="B330EBC763450ADC3E0C11F9BA0EA732" HardwareVersion="20611978">
    <tns:Emeter>
    <tns:DSMRAttributes DSMRVersion="2.3" BatteryType="Supercap type SG" EquipmentIdentifier=" KAL7005072723711" KemaGastecCode="KAL7" GOVersion="1" />
    <tns:GPRS>
    <tns:DlmsAttributes GlobalEncryptionKeyUnicast="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" GlobalEncryptionKeyBroadcast="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" P0Password1="12345678" AuthenticationKey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" HDLCPassword="12345678" MasterKey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
    <tns:GPRSCommunicationAttributes>
    <tns:SimCard MSISDN="" ICCID="8931084811080544981" CommunicationProviderBatchId="5765" IMSI="204080800339598" CommunicationProvider="KPN" />
    <tns:Modem IMEI="353471006235450" PPPPassword="xxxxxxxxxxxxxxx" PPPUsername="KAL7005072723711" />
    </tns:GPRSCommunicationAttributes>
    </tns:GPRS>
    </tns:Emeter>
    </tns:DeviceAttributes>
    </tns:Main>
    Edited by: user6357028 on 12-Nov-2012 04:55

  • XML Comparision Using XDX - Issue with Carriage Return key

    Hi
    I am using oracle XDX for doing a comparision between 2 xml files .I have issue is any node contains a enterkey chr(13)||chr(10) the xml shows that node as different.Even though they are same .

    Hi All,
    Ive updated the problem..with some output... essentially Ive get it to a situation wher I load ALL my records into the table but I still get a bad file with a "|" record issue and the log file still syas that Im trying to load 7 record when I only have the 6 records.
    ...............SQL statment...
    set trimpspool on
    set feedback off
    set heading off
    set linesize 500
    set pagesize 0
    spool loaddata_FP.lst
    SELECT '"'||spart.x_lsm_region||'"'||','||
    '"'||spart.x_sub_type||'"'||','||
    '"'||spart.x_origin_type||'"' ||'|'
    FROM siebel.cx_ls_part_ship spart;
    spool off
    -- sample of control file
    load data infile 'loaddata_FP.lst' "str '|'"
    into table siebel_data_fp fields terminated by "," optionally enclosed by '"'
    (x_lsm_region,
    x_sub_type,
    x_cust_face_staff,
    x_nature_partner,
    x_origin_type)
    --sample log file with error why is it telling me I have 7 records when I am processing 6?
    value used for ROWS parameter changed from 64 to 22
    Record 7: Rejected - Error on table SIEBEL_DATA_FP, column X_SUB_TYPE.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Table SIEBEL_DATA_FP:
    6 Rows successfully loaded.
    1 Row not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    --- sample bad file showing the pipe ... whay is sqlloader trying to process this pipe when its part of the record...
    /u01/oracle/admin/adhoc/xxxl(TESTxx)$
    /u01/oracle/admin/adhoc/xxx(TESTxx)$ vi FCT_PARTNERSHIP_ldrcontrol.bad
    "FCT_PARTNERSHIP_ldrcontrol.bad" [Incomplete last line] 2 lines, 213 characters
    |
    ~
    ~
    ~
    any help appreciated!
    Edited by: spliffer on 04-May-2010 05:06

  • ODI SQL LDR issue

    Hi Guys,
    I am trying to load one csv file using sqlldr LKM and facing issue at Call Sqlldr step
    Error Message is:
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File "<string>", line 22, in <module>
    Load Error: See Y:/BTLB_PLANS Product Codes ( A CODE LIST).log for details
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2473)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:48)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:561)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
         at java.lang.Thread.run(Thread.java:662)
    Caused by: Traceback (most recent call last):
    File "<string>", line 22, in <module>
    Load Error: See Y:/BTLB_PLANS Product Codes ( A CODE LIST).log for details
         at org.python.core.PyException.fillInStackTrace(PyException.java:70)
         at java.lang.Throwable.<init>(Throwable.java:181)
         at java.lang.Exception.<init>(Exception.java:29)
         at java.lang.RuntimeException.<init>(RuntimeException.java:32)
         at org.python.core.PyException.<init>(PyException.java:46)
         at org.python.core.PyException.doRaise(PyException.java:219)
         at org.python.core.Py.makeException(Py.java:1166)
         at org.python.core.Py.makeException(Py.java:1170)
         at org.python.pycode._pyx0.f$0(<string>:59)
         at org.python.pycode._pyx0.call_function(<string>)
         at org.python.core.PyTableCode.call(PyTableCode.java:165)
         at org.python.core.PyCode.call(PyCode.java:18)
         at org.python.core.Py.runCode(Py.java:1204)
         at org.python.core.Py.exec(Py.java:1248)
         at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:172)
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2472)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:47)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         ... 1 more
    and Code:
    import java.lang.String
    import java.lang.Runtime as Runtime
    from jarray import array
    import java.io.File
    import os
    import re
    ctlfile = r"""Y:/BTLB_PLANS Product Codes ( A CODE LIST).ctl"""
    logfile = r"""Y:/BTLB_PLANS Product Codes ( A CODE LIST).log"""
    outfile = r"""Y:/BTLB_PLANS Product Codes ( A CODE LIST).out"""
    oracle_sid=''
    if len('UREPDEV')>0: oracle_sid = '@'+'UREPDEV'
    loadcmd = r"""sqlldr 'REDW_DA_OWNER/<@=snpRef.getInfo("DEST_PASS") @>%s' control='%s' log='%s' > "%s" """ % (oracle_sid,ctlfile, logfile, outfile)
    rc = os.system(loadcmd)
    if rc <> 0 and rc <> 2:
         raise "Load Error", "See %s for details" % logfile
    # Init Vars
    nbIns = 0
    nbRej = 0
    nbNull = 0
    strprt = ""
    maxAllowedError = r"""0"""
    c = 0
    flag = 0
    # Open log file
    f = open(logfile, "r")
    try:
         lines = f.readlines()
         for line in lines:
              if line.rstrip().upper().endswith(r"""REDW_DA_OWNER.TC$_0TEST:""".upper()):
                   flag = 1
                   c = 0
              if flag == 1:
                   if c > 0 and c <= 4:
                        if c == 1 :
                             nbIns = int(re.findall("\d+", line)[0])
                        elif c == 2:
                             nbRej = int(re.findall("\d+", line)[0])
                        elif c == 4:
                             nbNull = int(re.findall("\d+", line)[0])
                             break
              c+=1
         strprt = "\n\tIns:\t%s\n\tReject:\t%s\n\tNullField:\t%s" % (nbIns, nbRej, nbNull)
    finally:
         f.close()
    # if some rows has been rejected due to invalide data, check KM option LOA_ERRORS
    if rc == 2:
         if nbRej > int(maxAllowedError):
              raise strprt
              break
    I am using LKM File to Oracle(SQLLDR)
    Thanks in advance

    error is saying:
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File "<string>", line 22, in <module>
    Load Error: See Y:/<file_name>.log for details
    and no log file is created for that.
    Few more things to add.
    We have 2 different boxes. 1. ODI box (different server address)
    2. DB box (different server address)
    and Sql developer is installed on DB box. I am able to use SQLLoader utility through SQL Developer.
    But when I am using ODI to use sql ldr through LKM SQL to Oracle (Sqlldr).
    It is getting failed at 6th step i.e. Call sqlldr.
    Error is : org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File "<string>", line 22, in <module>
    Load Error: See<file_name>.log for details
    but to my surprise all files were created at the folder except .log file.
    Can anybody help me to solve this issue.
    This is very urgent.
    Is this because sqlldr is not accessible to ODI then how .ctl & .bad files are created.
    I will really appreciate your help. it is bit urgent to solve this issue.
    Edited by: 965549 on Oct 28, 2012 10:36 AM

  • Getting error code exitVal = p.waitFor(); as 2 ,during SQLLOADER Call Dynam

    Hi Friends,
    This is regarding the problem being faced at my client in production environment. our code is calling the SQLLOADER ,sequentially,the below code is working fine for 4 files and returning the
    int exitVal = p.waitFor(); as 2 whihe is expected.(Note p is process)
    But giving exitVal = p.waitFor(); as zero and coming out from normal execution.(We have verified the file it is correct and working fine in UAT)
    Below is the sample code:
    connectString is the dynamic string used for calling sqlloader
    ***********************Sample Code*************************************
    p=r.exec(connectString);
    System.out.println("abc1");
    java.io.InputStream is = p.getInputStream();
    System.out.println("abc2");
    java.io.InputStreamReader isr = new java.io.InputStreamReader(is);
    System.out.println("abc3");
    java.io.BufferedReader br = new java.io.BufferedReader(isr);
    System.out.println("abc4");
    java.io.OutputStream os = p.getOutputStream();
    java.io.OutputStreamWriter osw = new java.io.OutputStreamWriter(os);
    java.io.BufferedWriter bw = new java.io.BufferedWriter(osw);
    //String line = null;
    bw.write(password);
    System.out.println("abcd5");
    bw.newLine();
    bw.flush();
    String line = null;
    while ( (line = br.readLine()) != null);
    System.out.println("abc6");
    int exitVal = p.waitFor();
    System.out.println("abc6");
    System.out.println("Process exitValue: " + exitVal);
    Our current environment:
    java - version of production environment........Solaris VM (build Solaris_JDK_1.2.2_10, native threads, sunwjit)
    Application server/web server : iplanet 5
    OS: SOLARIS 5.8(117000-03)
    Database ORACLE 8i
    Could someone please help in in resolving this issue??
    Note : this is critical production issue ,so you can use my mail Id, [email protected] for any update.
    Thanks for your favour.
    Thanks & Regards
    Ranjan SIngh
    Message was edited by:
    RanjanNucleussoftware
    Message was edited by:
    RanjanNucleussoftware

    Hi Friends,
    This is regarding the problem being faced at my client in production environment. our code is calling the SQLLOADER ,sequentially,the below code is working fine for 4 files and returning the
    int exitVal = p.waitFor(); as 2 whihe is expected.(Note p is process)
    But giving exitVal = p.waitFor(); as zero and coming out from normal execution.(We have verified the file it is correct and working fine in UAT)
    Below is the sample code:
    connectString is the dynamic string used for calling sqlloader
    ***********************Sample Code*************************************
    p=r.exec(connectString);
    System.out.println("abc1");
    java.io.InputStream is = p.getInputStream();
    System.out.println("abc2");
    java.io.InputStreamReader isr = new java.io.InputStreamReader(is);
    System.out.println("abc3");
    java.io.BufferedReader br = new java.io.BufferedReader(isr);
    System.out.println("abc4");
    java.io.OutputStream os = p.getOutputStream();
    java.io.OutputStreamWriter osw = new java.io.OutputStreamWriter(os);
    java.io.BufferedWriter bw = new java.io.BufferedWriter(osw);
    //String line = null;
    bw.write(password);
    System.out.println("abcd5");
    bw.newLine();
    bw.flush();
    String line = null;
    while ( (line = br.readLine()) != null);
    System.out.println("abc6");
    int exitVal = p.waitFor();
    System.out.println("abc6");
    System.out.println("Process exitValue: " + exitVal);
    Our current environment:
    java - version of production environment........Solaris VM (build Solaris_JDK_1.2.2_10, native threads, sunwjit)
    Application server/web server : iplanet 5
    OS: SOLARIS 5.8(117000-03)
    Database ORACLE 8i
    Could someone please help in in resolving this issue??
    Note : this is critical production issue ,so you can use my mail Id, [email protected] for any update.
    Thanks for your favour.
    Thanks & Regards
    Ranjan SIngh
    Message was edited by:
    RanjanNucleussoftware
    Message was edited by:
    RanjanNucleussoftware

Maybe you are looking for

  • How do I deactivate Photoshop Elements 9 from a dead computer?

    Hello, I recently got a new computer to replace my old one which stopped working. I had Photoshop Elements 9 installed on the old computer and used it often, so I installed it on my new computer. However, it told me that the serial number had been us

  • Migrated from SOA 10.1.3.1 to 10.1.35, Error While Deploying an Application

    I have migrated from Application server 10.1.3.1 to 10.1.3.5 by applying patches. After that i have tried to deploy a application, I got this error Operation failed with error: [resonance:resonance] - Exception creating EntityManagerFactory using Per

  • Mapping and context problem

    Hi i am not being able to perform this mapping, the scenario is like this: i need to create one LINE in the output for each E1PLOGI in the input when FLAG3 = 'S'  also as i don't understand  completely the context theory i cant figure out in witch co

  • Open Hub Destination Delta issue

    Hi experts, We have a scenario in which a Open hUb is created on top of a cube. Regular delats are moving from this cube to Open hub daily. But as per the request, we had to dump the cube data, and the reload took, 2 days to complete. So, that 2 days

  • No Audio Drivers recognised

    My GB2 is not working. Don't quite know when it started as I have been updating lots due to Apples updates recently, but when I try to boot GB2 it will not startup. I have managed to get my preferences window open to find that no audio drivers are be