Sql Loader problem in UNIX

Oracle version: 11g
I am having a problem in UNIX box where my datafile is delimited by "|". The last field is ITM_CMNT declared as VARCHAR2(60) in Oracle. When I have exactly 60bytes in the last field it rejects the record saying actual 61 and max allowed is 60. If i reduce it to < 60bytes then it is stored as a value enclosed with double quotes. The enclosing double quote is on the next line. Something like this...
"PROC,RAM,FLPY,HD,ACT MTX CLR DSP,D/PCMCIA,TRKBAL,LIT ION BA
Expected: the one below is exactly 60bytes and it should load just like below. Not sure what should I add to control file. If i add an "|" at the end of last field then 60bytes of item comments is loaded but we can't add that since there is no other field to map/load into the table. Ideally data should be A|B|C rather than |A|B|C|.
PROC,RAM,FLPY,HD,ACT MTX CLR DSP,D/PCMCIA,TRKBAL,LIT ION BAT
LOAD DATA
INFILE *
INTO TABLE TMPTLI_LAWSON_ITM_MST
TRUNCATE
FIELDS TERMINATED BY "|"
(ITM_NO, HAZ_MAT_CD, ITM_SHRT_DS, ITM_SON "TRIM(:ITM_SON)", ADDED_DT DATE "YYYY-MM-DD", AVL_CD , ITM_CST_AMT, ITM_SLL_AMT, EXCHG_PRC_AMT , ITM_UOM "TRIM(:ITM_UOM)", PCK_QTY INTEGER EXTERNAL, SPC_HNDL_CD "TRIM(:SPC_HNDL_CD)", EFF_DT DATE "YYYY-MM-DD", ITM_CMNT "TRIM(:ITM_CMNT)")
BEGINDATA
00300329892R| |phone/ans ma| |2000-07-13|U|0.0|0.0|0.0|EACH|| |2001-04-06|PROC,RAM,FLPY,HD,ACT MTX CLR DSP,D/PCMCIA,TRKBAL,LIT ION BAT
CREATE TABLE "AIMSYS"."TMPTLI_LAWSON_ITM_MST"
   (     "ITM_NO" VARCHAR2(30 BYTE) NOT NULL ENABLE,
     "HAZ_MAT_CD" CHAR(4 BYTE),
     "ITM_SHRT_DS" VARCHAR2(25 BYTE),
     "ITM_SON" CHAR(4 BYTE),
     "AVL_CD" CHAR(1 BYTE) DEFAULT '',
     "ITM_CST_AMT" NUMBER(12,2),
     "ITM_SLL_AMT" NUMBER(12,2),
     "EFF_DT" DATE,
     "PR_IND" NUMBER DEFAULT 0,
     "ITM_UOM" CHAR(15 BYTE),
     "EXCHG_PRC_AMT" NUMBER(12,2),
     "PCK_QTY" NUMBER(6,0),
     "SPC_HNDL_CD" CHAR(3 BYTE),
     "ADDED_DT" DATE,
     "ITM_CMNT" VARCHAR2(60 BYTE)
)

I have tried the following but didnt help.
1. Data file and control files are transferred through ASCII format. It's usually default to Auto mode but i have tried manually setting to Ascii mode.
2. I opened the file using VI editor in UNIX and didnt see any weird or special characters at the end of each record.
3. The only time all the 60 bytes get loaded is If I add a pipe at the end.
4. It loads all the records appended with double quotes like I described above when it is less than 60 bytes.
5. I downloaded the bad file from unix and ran it in windows and all the bad records were loaded successfully.
Not sure what else should I try.

Similar Messages

  • SQL LOADER Problem when data is loaded but not come in standard formate

    Hi guys,
    I got problem when sql loader run data loaded successfully in table but UOM data not come in standard formate.
    UOM table column contains the Unit of measure data but in my excel sheet it's look like :
    EXCEl SHEET DATA:
    1541GAFB07080          0     Metres
    1541GAFE10040          109.6     Metres
    1541GAFE10050          594.2     Metres
    1541GAFE10070          126.26     Metres
    1541GAFE14040          6.12     Metres
    1541GAFE14050          0     Metres
    1541SAFA05210          0     Metres
    1541SAFA07100          0     Metres
    1551EKDA05210          0     Nos
    1551EKDA07100          0     Nos
    1551EKDA07120          0     Nos
    1551EKDA07140          0     Nos
    1551EKDA07200          0     Nos.
    1551EKDA08160          0     Nos.
    1551EKDA08180          0     Nos.
    1551EKDA08200          0     Nos.
    1551EKDA10080          41     Nos.
    1551EKDA10140          85     Nos.
    .ctl file :
    OPTIONS (silent=(header,feedback,discards))
    LOAD DATA
    INFILE *
    APPEND
    INTO TABLE XXPL_PO_REQUISITION_STG
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY'"'
    TRAILING NULLCOLS
    ( ITEM_CODE CHAR,
    ITEM_DESCRIPTION CHAR "TRIM(:ITEM_DESCRIPTION)",
    QUANTITY,
    UOM,
    NEED_BY_DATE,
    PROJECT,
    TASK_NAME,
    BUYER,
    REQ_TYPE,
    STATUS,
    ORGANIZATION_CODE,
    LOCATION,
    SUBINVENTORY,
    LINE_NO,
    REQ_NUMBER,
    LOADED_FLAG CONSTANT 'N',
    SERIAL_NO "XXPL_PRREQ_SEQ.NEXTVAL",
    CREATED_BY,
    CREATION_DATE SYSDATE,
    LAST_UPDATED_BY,
    LAST_UPDATED_DATE,
    LAST_UPDATED_LOGIN
    Some output came in table like:
    W541WDCA05260 0 Metres|
    W541WDCA05290 3 Metres|
    W541WDCA05264 4 Metres|
    W541WDCA05280 8 Metres|
    1551EADA04240 0 Nos|
    1551EADA07100 0 Nos|
    1551EKDA10080 0 Nos.|
    1551EKDA10080 41 Nos.|
    proble in | delimiter...how to remove it ' | ' from my table when sqlloader program runnig ...... where i can change in .ctl file or excel file....it's urgent guys olz help me ..
    thanks

    Hi,
    How are you extracting the data to Excel sheet ?
    Please check the format type of the column in Excel sheet for UOM.
    There is no issue in the SQL loader control file, but issue is there in your source excel file. (Try using a different method to extract the data to Excel sheet.)
    Regards,
    Yuvaraj.C

  • SQL*Loader problem - not efficient, parsing error for big xml files

    Hi Experts,
    First of all, I would like to store xml files in object relation way. Therefore I created a schema and a table for it (see above).
    I wants to propagate it (by using generated xml files), hence I created a control file for sql loader (see above).
    I have two problems for it.
    1, It takes a lot of time. It means I can upload a ~80MB file in 2 hours and a half.
    2, At bigger files, I got the following error messages (OCI-31011: XML parsing failed OCI-19202: Error occurred in XML processing LPX-00243: element attribute value must be enclosed in quotes). It is quite interesting because my xml file is generated and I could generated and uploaded the first and second half of the file.
    Can you help me to solve these problems?
    Thanks,
    Adam
    Control file
    UNRECOVERABLE
    LOAD DATA
    CHARACTERSET UTF8
    INFILE *
    APPEND
    INTO TABLE coll_xml_objrel
    XMLTYPE(xml)
    FIELDS
    ident constant 2
    ,file_name filler char(100)
    ,xml LOBFILE (file_name) TERMINATED BY EOF
    BEGINDATA
    generated1000x10000.xml
    Sql Loader command
    sqlldr.exe username/password@//localhost:1521/SID control='loader.ctl' log='loadr.log' direct=true
    Schema
    <?xml version="1.0" encoding="UTF-8"?>
    <schema targetNamespace="http://www.something.com/shema/simple_searches" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.something.com/shema/simple_searches">
        <element name="searches" type="tns:searches_type"></element>
        <element name="search" type="tns:search_type"></element>
        <element name="results" type="tns:results_type"></element>
        <element name="result" type="tns:result_type"></element>
        <complexType name="searches_type">
            <sequence>
                <element ref="tns:search" maxOccurs="unbounded"></element>
            </sequence>
        </complexType>
        <complexType name="search_type">
            <sequence>
                <element ref="tns:results"></element>
            </sequence>
            <attribute ref="tns:id" use="required"></attribute>
            <attribute ref="tns:type" use="required"></attribute>
        </complexType>
        <complexType name="results_type">
            <sequence maxOccurs="unbounded">
                <element ref="tns:result"></element>
            </sequence>
        </complexType>
        <complexType name="result_type">
            <attribute ref="tns:id" use="required"></attribute>
        </complexType>
        <simpleType name="type_type">
            <restriction base="string">
                <enumeration value="value1"></enumeration>
                <enumeration value="value2"></enumeration>
            </restriction>
        </simpleType>
        <attribute name="type" type="tns:type_type"></attribute>
        <attribute name="id" type="string"></attribute>
    </schema>
    Create table
    create table coll_xml_objrel
    ident Number(20) primary key,
    xml xmltype)
    Xmltype column xml
    store as object relational
    xmlschema "http://www.something.com/schema/simple_searches.xsd"
    Element "searches";

    Hi Odie_63,
    Thanks for your answer.
    I will post this question in the XML DB forum too (edit: I realized that you have done it. Thanks for it).
    1, Version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    2, see above
    3, I have registered my schema with using dbms_xmlschema.registerSchema function.
    Cheers,
    Adam
    XML generator:
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import javax.xml.stream.XMLOutputFactory;
    import javax.xml.stream.XMLStreamException;
    import javax.xml.stream.XMLStreamWriter;
    public class mainGenerator {
        public static void main(String[] args) throws FileNotFoundException, XMLStreamException {
            // TODO Auto-generated method stub
            final long numberOfSearches = 500;
            final long numberOfResults = 10000;
            XMLOutputFactory xof = XMLOutputFactory.newFactory();
            XMLStreamWriter writer = xof.createXMLStreamWriter(new FileOutputStream("C:\\Working\\generated500x10000.xml"));
            writer.writeStartDocument();
            writer.writeStartElement("tns","searches", "http://www.something.com/schema/simple_searches");
            writer.writeNamespace("tns", "http://www.something.com/schema/simple_searches");
            for (long i = 0; i < numberOfSearches; i++){
                Long help = new Long(i);
                writer.writeStartElement("tns","search", "http://www.something.com/schema/simple_searches);
                writer.writeAttribute("tns", "http://www.something.com/schema/simple_searches", "type", "value1");
                writer.writeAttribute("tns", "http://www.something.com/schema/simple_searches", "id", help.toString());
                writer.writeStartElement("tns","results", "http://www.something.com/schema/simple_searches");
                for (long j = 0; j < numberOfResults; j++){
                    writer.writeStartElement("tns","result", "http://www.something.com/schema/simple_searches");
                    Long helper = new Long(i*numberOfResults+j);
                    writer.writeAttribute("tns", "http://www.something.com/schema/simple_searches", "id", helper.toString());
                    writer.writeEndElement();
                writer.writeEndElement();
                writer.writeEndElement();
            writer.writeEndElement();
            writer.writeEndDocument();
            writer.close();
    registerSchema:
    begin
    dbms_xmlschema.registerSchema(
    'http://www.something.com/schema/simple_searches',
    '<?xml version="1.0" encoding="UTF-8"?>
    <schema targetNamespace="http://www.something.com/schema/simple_searches" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.something.com/schema/simple_searches">
        <element name="searches" type="tns:searches_type"></element>
        <element name="search" type="tns:search_type"></element>
        <element name="results" type="tns:results_type"></element>
        <element name="result" type="tns:result_type"></element>
        <complexType name="searches_type">
            <sequence>
                <element ref="tns:search" maxOccurs="unbounded"></element>
            </sequence>
        </complexType>
        <complexType name="search_type">
            <sequence>
                <element ref="tns:results"></element>
            </sequence>
            <attribute ref="tns:id" use="required"></attribute>
            <attribute ref="tns:type" use="required"></attribute>
        </complexType>
        <complexType name="results_type">
            <sequence maxOccurs="unbounded">
                <element ref="tns:result"></element>
            </sequence>
        </complexType>
        <complexType name="result_type">
            <attribute ref="tns:id" use="required"></attribute>
        </complexType>
        <simpleType name="type_type">
            <restriction base="string">
                <enumeration value="value1"></enumeration>
                <enumeration value="value2"></enumeration>
            </restriction>
        </simpleType>
        <attribute name="type" type="tns:type_type"></attribute>
        <attribute name="id" type="string"></attribute>
    </schema>',
    TRUE, TRUE, FALSE, FALSE);
    end

  • SQL Loader Problem with Date Format

    Dear all,
    I am dealing with a problem in loading data with SQL Loader. The problem is in the date format.
    More specifically, I created the following Control File:
    file.ctl
    LOAD DATA
    INFILE 'D:\gbal\chatium.log'
    APPEND INTO TABLE CHAT_SL
    FIELDS TERMINATED BY WHITESPACE
    TRAILING NULLCOLS
    (SL1 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
    SL2 char,
    SL3 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
    SL4 char,
    SL5 char,
    SL6 char,
    SL7 char,
    SL8 char,
    SL9 char,
    SL10 char,
    SL11 char,
    SL12 char,
    SL13 char,
    SL14 char,
    SL15 char)
    The data we want to load are in the following file:
    Apr 29, 2007 12:05:49 AM 1060615 Apr 29, 2007 12:05:35 AM 306978537730 24026384 chatium.user.userinfo WAP 0
    Apr 29, 2007 12:12:51 AM 1061251 Apr 29, 2007 12:12:27 AM 306978537730 24026384 chatium.channel.list WAP 0
    Apr 29, 2007 12:12:51 AM 1061264 Apr 29, 2007 12:12:32 AM 306978537730 24026384 chatium.channel.listdetail WAP 0
    Apr 29, 2007 12:13:51 AM 1061321 Apr 29, 2007 12:13:31 AM 306978537730 24026384 chatium.user.search WAP 0
    Apr 29, 2007 12:13:51 AM 1061330 Apr 29, 2007 12:13:37 AM 306978537730 24026384 chatium.user.userinfo WAP 0
    The error log file is the following:
    SQL*Loader: Release 9.2.0.1.0 - Production on Mon Apr 30 11:29:16 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Control File: file.ctl
    Data File: D:\gbal\chatium.log
    Bad File: chatium.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table CHAT_SL, loaded from every logical record.
    Insert option in effect for this table: APPEND
    TRAILING NULLCOLS option in effect
    Column Name Position Len Term Encl Datatype
    SL1 FIRST * WHT DATE MonDD,YYYYHH:MI:SS
    SL2 NEXT * WHT CHARACTER
    SL3 NEXT * WHT CHARACTER
    SL4 NEXT * WHT CHARACTER
    SL5 NEXT * WHT CHARACTER
    SL6 NEXT * WHT CHARACTER
    SL7 NEXT * WHT CHARACTER
    SL8 NEXT * WHT CHARACTER
    SL9 NEXT * WHT CHARACTER
    SL10 NEXT * WHT CHARACTER
    SL11 NEXT * WHT CHARACTER
    SL12 NEXT * WHT CHARACTER
    SL13 NEXT * WHT CHARACTER
    SL14 NEXT * WHT CHARACTER
    SL15 NEXT * WHT CHARACTER
    Record 1: Rejected - Error on table CHAT_SL, column SL1.
    ORA-01840: input value not long enough for date format
    Record 2: Rejected - Error on table CHAT_SL, column SL1.
    ORA-01840: input value not long enough for date format
    Record 3: Rejected - Error on table CHAT_SL, column SL1.
    ORA-01840: input value not long enough for date format
    Record 4: Rejected - Error on table CHAT_SL, column SL1.
    ORA-01840: input value not long enough for date format
    I wonder if you could help me.
    Thank you very much in advance.
    Giorgos Baliotis

    SQL> select to_date('Apr 29, 2007 12:05:49 AM','Mon DD, YYYY HH:MI:SS FF3AM') from dual;
    select to_date('Apr 29, 2007 12:05:49 AM','Mon DD, YYYY HH:MI:SS FF3AM') from dual
    ERROR at line 1:
    ORA-01821: date format not recognized
    SQL> ed
    Wrote file afiedt.buf
      1* select to_date('Apr 29, 2007 12:05:49 AM','Mon DD, YYYY HH:MI:SS AM') from dual
    SQL> /
    TO_DATE(
    29/04/07
    SQL> Then, you defined blank space as separator, but there is spaces in your date inside your file. So, you should add double-quotes around the date field like below, and add optionally enclosed by '"' into your ctlfile.
    "Apr 29, 2007 12:05:49 AM" 1060615 "Apr 29, 2007 12:05:35 AM" 306978537730 24026384 chatium.user.userinfo WAP 0
    "Apr 29, 2007 12:12:51 AM" 1061251 "Apr 29, 2007 12:12:27 AM" 306978537730 24026384 chatium.channel.list WAP 0
    "Apr 29, 2007 12:12:51 AM" 1061264 "Apr 29, 2007 12:12:32 AM" 306978537730 24026384 chatium.channel.listdetail WAP 0
    "Apr 29, 2007 12:13:51 AM" 1061321 "Apr 29, 2007 12:13:31 AM" 306978537730 24026384 chatium.user.search WAP 0
    "Apr 29, 2007 12:13:51 AM" 1061330 "Apr 29, 2007 12:13:37 AM" 306978537730 24026384 chatium.user.userinfo WAP 0Example :
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_concepts.htm#sthref477
    Nicolas.

  • SQL Loader problem in loading MS Access Memo Data

    HI guys!
    I am having trouble loading my Access data into my Oracle Database.
    I export first the data from Access to an Excel file and then I save as the Excel file as a CSV file.
    Then by using SQL Loader I load the csv file to the Oracle.
    load data
    REPLACE
    into table TBL1
    fields terminated by ','
    TRAILING NULLCOLS
    NAME,
    ID
    NOTES CHAR(4000),
    The problem is with the NOTES data. It is declared as Memo type in Access and I declared it as VARCHAR2(1000) in Oracle. If I don't have any carriage returns (Enter Key) in the data, the data is loaded successfully but when it has some carriage returns (Enter Key) the data is cut (continued to next line) and wrong data is being loaded...
    BUt if I just copy-paste manually the data, it is loaded successfully..
    How do I deal with this problem.I have over 20,000 data so I can't do copy-paste..
    Appreciate any help..
    Thanks!

    Did you try to specify the "end of record " string (str <terminator string> function) , or Trimming whitespaces function ? Please refer to "Oracle Database utilities" for more information about it .

  • Sql loaded installation in UNIX

    We installed Oracle client on our unix server by downloading client from the recommended ftp server. However, we are not seeing sqlldr in the bin directory. Is there a seperate install for this? we can see all other utilities such as sqlplus.
    How can I get sqlldr?
    thanks

    Hi, you must install the Client with Administrator option for install the sql loader and other tools for manage the database. Please review the next link for get more information about of your question.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14196/intro004.htm#sthref30
    Please let me know if you have some doubt or question.
    Regards.
    Serch-Net.

  • Sql loader problem - thread appears to be hung

    Sorry to ask such a strang question but I am not sure which direction to go with this one. Hoping someone might have an idea.
    I am running oracle 10g on windows. I have 3 servers all patched at the same levels. All 3 servers run a purchased utility called dbutility which copies data from a dms database to an oracle database using oracle's sql*loader. On one server the dbutility hangs when the dbutility program tries to start sql*loader. I must close the dos window to end the job - ctl c does not work.
    If I let the job sit long enought, it eventually gets the message:"BULK LOADER thread appears to be hung: main thread waiting".
    I called the company which supports the dbutility program and they think it is a windows or oracle problem.
    I can get the dbutility to work if I start the dbutility in verbose (trace) mode. For some reason slowing the dbutility down before starting the sql*load program fixes the problem.
    Has anyone ever had issues starting sql*loader?
    Does anyone have any ideas what might be causing this problem?
    Do you think reinstalling the sql*loader might help?
    Thank you!
    Confused:)

    Try to built a test case on your own.
    Make a little test creating an sql*loader ctl and try to load the file on a test table.
    If that work you should ask againg with your tool support.
    load data
    infile 'YOUR_FILE_HERE'
    badfile 'BAD_FILE'
    append
    into table test_ldr
    fields terminated by "," optionally enclosed by '"'          
    (caracter1,caracter2,caracter3,caracter4,caracter5)
    caraterN = your table column name.
    sqlldr.exe userid=username/password@db rows=1000 control=conrtol.ctl log=log.log errors=200 direct=y

  • Peculiar SQL Loader Problem

    HI All
    It is a strange problem , for which I have been trying to find solution but to no avail.
    I am trying to load data into certain tables through SQL loader.
    It works perfect on most of the occasions but throws the following error sometimes.
    SQL*Loader-931: OCI error while binding variable for column GRP_BEP in table abc
    ORA-01036: illegal variable name/number
    SQL*Loader-931: OCI error while binding variable for column GRP_BEP in table abc
    ORA-01036: illegal variable name/number
    SQL*Loader-931: OCI error while binding variable for column GRP_BEP in table abc
    ORA-01036: illegal variable name/number
    SQL*Loader-931: OCI error while binding variable for column GRP_BEP in table abc
    ORA-01036: illegal variable name/number
    SQL*Loader-931: OCI error while binding variable for column GRP_BEP in table abc
    ORA-01036: illegal variable name/number
    I am not sure if this is related to some time change or something as I have observed this error at night only.
    Very Strange indeed.
    Best Regards
    Varun
    Edited by: 795853 on Sep 27, 2010 1:24 AM

    HI
    Thanks for the reply. The problem starts coming in all the table loads. Below are the CONTROL FILE and DATA FILE for your reference.
    CONTROL FILE :
    load data infile 'export_abc.icc' APPEND
    into table abc_p fields terminated by ',' optionally enclosed by '"' TRAILING NULLCOLS
    RI,
    PC,
    SERV,
    SNP "snptim(SYSDATE)+3600 + (2700-3600)*cnt_ri_abc.nextval/1/1953018-25200",
    GRP_BEP "CHR(:GRP_BEP)"
    DATA FILE :
    RI,PC,SERV,SNP,GRP_BEP
    25001,85945913920070615,2,367015648,0
    25002,85962165920071221,2,367014936,0
    25003,83256887420090408,2,367012166,0
    25004,83256063420090408,2,367016342,0
    Thanks
    Best Regards
    Varun

  • Run SQL Loader script from Unix env

    Hi,
    We are using HP-UNIX server. The control file of SQL Loader is placed in oracle home\bin folder in the unix server. I created Executable for this SQL Loader control file in concurrent program and attached into a request group.
    Then I ran it from a responsibility, I am getting the below error.
    +-----------------------------
    | Starting concurrent program execution...
    +-----------------------------
    SQL*Loader-350: Syntax error at line 16.
    Expecting "," or ")", found "TIMESTAMP".
    GL_DATE TIMESTAMP 'yyyy MM dd hh:MI:SS:AM',
    ^
    SQL*Loader: Release 8.0.6.3.0 - Production on Sun Sep 5 15:28:45 2010
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    SQL*Loader-350: Syntax error at line 16.
    Expecting "," or ")", found "TIMESTAMP".
    GL_DATE TIMESTAMP 'yyyy MM dd hh:MI:SS:AM',
    ^
    My Actual Control file is,
    LOAD DATA
    INFILE '/usr/........xyz.txt'
    BADFILE '/usr/........xyz.bad'
    DISCARDFILE '/usr/........xyz.dsc
    APPEND
    INTO TABLE gl_interface_stg
    FIELDS TERMINATED BY "|" TRAILING NULLCOLS
    GL_DATE TIMESTAMP 'yyyy MM dd hh:MI:SS:AM',
    CATEGORY_NAME,
    JOURNAL_DESCRIPTION,
    JOURNAL_NAME,
    BATCH_NAME,
    BATCH_DESCRIPTION,
    ACCOUNT_CODE,
    PROCESSING_STATUS CONSTANT 'N'
    If I run the above control file from my local machine (windows) using SQLLDR username/pwd @servername control='c:/abc.ctl' from the command prompt, then all the records from xyz.txt file pushed into staging table.
    Where as, If I schedule the above control file and trying to run from a GL responsibility, I am getting the above error message.
    Do I need to modify the control file scripts in order to run from UNIX environment?
    Pls advice how to do it from UNIX environment.
    Thanks in advance.

    Hi,
    SQL*Loader-350: Syntax error at line 16.Please see if these docs help.
    SQL*LOADER-350 SYNTAX ERROR [ID 1019271.102]
    LDR-00350 TOKEN LONGER THAN MAX ALLOWABLE LENGTH ERROR WHEN LOADING ASCII FILE [ID 1020091.6]
    Do I need to modify the control file scripts in order to run from UNIX environment?
    Pls advice how to do it from UNIX environment.See these docs.
    How to Use 9i or 10g Features in SQL*Loader for Apps? [ID 423035.1]
    11i FND:How to specify Record Terminator In Sql*Loader type of concurrent program [ID 252850.1]
    Thanks,
    Hussein

  • SQL Loader problem while loading records from txt file to database table.

    I am getting following error while loading records from flat txt file into database table with the help of 'sqlldr' command. I have executed catldr.sql from RDBMS folder but it is still showing same error. I am setting DIRECT = TRUE while issuing sqlldr command. If I try with DIRECT = FALSE then it works fine. Database is Oracle 8i.
    SQL*Loader-951: Error calling once/load initialization
    ORA-24329: invalid character set identifier
    F1 Please.

    Hello,
    Direct path load, can only be used with SQL*Loader and Database have the same version.
    Care to tell the database version and sql*loader version you are using.
    -Sri

  • Sql * loader problem

    i have to export flat file into oracle 10g database table with same datatypes as created in MS Access but during load i am facing following errors i don't know why,how can i handle this situation where as i created flate file and control file in same drive but sql* loader cannot find it.
    control file
    load data
    infile 'F:\dumy.dat'
    BADFILE 'F:\dumy.BAD'
    DISCARDFILE 'F:\dumy.DSC'
    APPEND
    INTO TABLE dumy
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (id INTEGER EXTERNAL,init_date sysdate 'mm/dd/yyyy mi:ss:hh',final_date date,
    item varchar2(50))
    *flat file*
    1,12/22/2009 0:00:00,12/29/2009 0:00:00,"BRUSH"
    2,12/22/2009 0:00:00,12/27/2009 0:00:00,"COMB"
    all files are on f:\drive and i also copy control file in oracle home in BIN FOLDER
    following error occur
    SQL*Loader-500: Unable to open file (F:\DUM.CTL)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specified.

    Here is something working with Oracle XE on Windows. All files are in the same directory C:\TMP and all commands are also run from C:\TMP:
    c:\tmp>type dumy.sql
    set echo on
    select * from v$version;
    drop table dumy purge;
    create table dumy
    id number,
    init_date date,
    final_date date,
    item varchar2(50)
    exit
    c:\tmp>type dumy.ctl
    load data
    infile 'C:\tmp\dumy.dat'
    BADFILE 'C:\tmp\dumy.BAD'
    DISCARDFILE 'C:\tmp\dumy.DSC'
    APPEND
    INTO TABLE dumy
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    id integer external,
    init_date date "mm-dd-yyyy hh24:mi:ss",
    final_date date "mm-dd-yyyy hh24:mi:ss",
    item char
    c:\tmp>type dumy.dat
    1,12/22/2009 0:00:00,12/29/2009 0:00:00,"BRUSH"
    2,12/22/2009 0:00:00,12/27/2009 0:00:00,"COMB"
    c:\tmp>sqlplus hr/hr @dumy
    SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 13 10:40:54 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> drop table dumy purge;
    Table dropped.
    SQL>
    SQL> create table dumy
      2  (
      3  id number,
      4  init_date date,
      5  final_date date,
      6  item varchar2(50)
      7  );
    Table created.
    SQL>
    SQL> exit
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Prod
    ction
    c:\tmp>sqlldr hr/hr control=dumy.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Sat Mar 13 10:41:00 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 1
    Commit point reached - logical record count 2
    c:\tmp>type dumy.log
    SQL*Loader: Release 10.2.0.1.0 - Production on Sat Mar 13 10:41:00 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Control File:   dumy.ctl
    Data File:      C:\tmp\dumy.dat
      Bad File:     C:\tmp\dumy.BAD
      Discard File: C:\tmp\dumy.DSC
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    Table DUMY, loaded from every logical record.
    Insert option in effect for this table: APPEND
    TRAILING NULLCOLS option in effect
       Column Name                  Position   Len  Term Encl Datatype
    ID                                  FIRST     *   ,  O(") CHARACTER
    INIT_DATE                            NEXT     *   ,  O(") DATE mm-dd-yyyy hh24:
    i:ss
    FINAL_DATE                           NEXT     *   ,  O(") DATE mm-dd-yyyy hh24:
    i:ss
    ITEM                                 NEXT     *   ,  O(") CHARACTER
    Table DUMY:
      2 Rows successfully loaded.
      0 Rows 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.
    Space allocated for bind array:                  66048 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             2
    Total logical records rejected:         0
    Total logical records discarded:        0
    Run began on Sat Mar 13 10:41:00 2010
    Run ended on Sat Mar 13 10:41:01 2010
    Elapsed time was:     00:00:00.89
    CPU time was:         00:00:00.06
    {code}
    Do not use VARCHAR SQL*Loader data type which is not a portable data type but use CHAR instead.
    Do not use SYSDATE if you want to load a date  from your .dat file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • SQL*Loader Problem while loading date from earlier era

    Hi everybody,
    I'm trying to load a date with SQL*Loader in Oracle 8.1.6. The value of the date is '11671102004338' with a date format 'YYYYMMDDHH24MISS'. Everytime I try it, I get the error message "ORA-01438: Wert größer als angegebene Stellenzahl für diese Spalte zuläßt" (meens: value is larger than the maximum length of the column). This is a little bit crazy, because the same works in SQL*Plus with the to_date function.
    What I've to do?
    Thanks in advance
    Ralf

    Sorry, it's solved (I've to respect to correct type)

  • Odd SQL Loader problem

    I have Oracle 8.0.3 on my Windows 2K client machine and am using sql loader to load a flat file into an 8i database. When I execute the command in a Dos window, the load runs, but the DOS window hangs and won't return me to the c:\ prompt. As a result, I can't run a bat file to load multiple tables, as the sqlldr80 command won't continue past the first table loaded.
    Any ideas? thanks

    The application is about processing CDRs (Call Details) and data is huge and need to be processed very quickly.
    One process is uploading the data coming from different files into the partitioned table and other process works in parallel to proces the available data and it need not to wait for end of upload.
    I can do some IPC to synchronize the act of both processes but this will delay the whole thing because I will have to drop/recreate indexes many times on huge data.
    So is there any features available that I can use or any other suggestion

  • Sql Loader problem.Urgent pls

    Hi experts.
    Now i am using Oracle 7.3 . i am want to know one thing in sql loader. is it possible to load data with out using one field. i want to divide and load into one field. I have given one example here. pls give me the logic how i can load like this.
    load data
    infile 'xxx.prn'
    append
    into table xyy
    PRC decimal external "to_number(position(191:197))/to_number(position(2
    05:211))"
    thanks in advance
    venkat

    Would you please stop posting the same question again and again?
    This is really boring.

  • Sql loader problem with point data

    I am struggling to import bulk point data.
    Example line from data file
    2     1     Highest mountain on Skye with steep faces and narrow ridges.     4     32     3001     8307     57.206116     -6.223032     992
    So its all tab deliminated
    3001 is sdo_gtype
    8307 is sdo_srid
    57.xxx is my X point
    -6.xxx is my Y point
    992 is my Z point
    I can import all of the data apart from the final section, and my loader looks like:
    GEOM COLUMN OBJECT
    SDO_GTYPE INTEGER EXTERNAL TERMINATED BY X'09' ,
    SDO_SRID INTEGER EXTERNAL TERMINATED BY X'09',
    SDO_POINT_TYPE(X,Y,Z) INTEGER EXTERNAL TERMINATED BY ','
    Any help? I simply need it take the last three numbers and assign them to x,y,z of point_type.
    Need any more info?

    TSEdinburgh,
    Try
    LOAD DATA INFILE * APPEND INTO TABLE MyTable
    FIELDS TERMINATED BY X'09' TRAILING NULLCOLS
         MyCol1,
         MyCol2,
         description,
         MyCol3,
         MyCol4,
         geom COLUMN OBJECT (
              sdo_gtype INTEGER EXTERNAL,
              sdo_srid INTEGER EXTERNAL,
              sdo_point COLUMN OBJECT (
                   x FLOAT EXTERNAL,
                   y FLOAT EXTERNAL,
                   z FLOAT EXTERNAL
    )Regards,
    Noel

Maybe you are looking for