SQL Loader DATE type error

Hi,
I am having a problem while loading data from flat file to oracle. The flat file contains date and time in a single field and I want to insert that value into a column in oracle of DATE datatype.
LOAD DATA
INFILE *
INTO TABLE CNTRL_DUAL
APPEND
FIELDS TERMINATED BY ',' TRAILING NULLCOLS
PK INTEGER,
TS DATE "YYYY-MM-DD" TERMINATED BY ',',
ORDER_MONTH6 CHAR,
COUNTRY CHAR,
MONTH_END_DATE CHAR,
UPDATEDBY CHAR,
BEGINDATA
3,2004-08-12 10:35:06.447,199910,CI,19991102,NULL
CREATE TABLE CNTRL_DUAL
PK NUMBER(19) NOT NULL,
TS DATE,
ORDER_MONTH6 VARCHAR2(6 BYTE) NOT NULL,
COUNTRY VARCHAR2(4 BYTE) NOT NULL,
MONTH_END_DATE VARCHAR2(8 BYTE) NOT NULL,
UPDATEDBY VARCHAR2(16 BYTE)
I am facing problems with TS column.
Any help will be appreciated.

Hi,
When I change my ctl file
LOAD DATA
INFILE *
INTO TABLE X_ODI_CNTRL_DUAL
APPEND
FIELDS TERMINATED BY ',' TRAILING NULLCOLS
PK INTEGER,
TS DATE(30) "YYYY-MM-DD",
ORDER_MONTH6 CHAR,
COUNTRY CHAR,
MONTH_END_DATE CHAR,
UPDATEDBY CHAR,
STATUS_FLAG CHAR
BEGINDATA
5,2009-07-09,199910,US,19991102,NULL,
2,2004-08-12,199910,AU,19991102,NULL,
3,2004-08-12,199910,CI,19991102,NULL,
8,2007-10-25,199765,CI,20001005,NULL,
the data has been inserted into oracle table but the data in TS column is inserted as:
the year 2009 is being displayed as 0009
PK     TS     ORDER_MONTH6     COUNTRY     MONTH_END_DATE     UPDATEDBY     STATUS_FLAG
808594485     7/9/0009     199910     US     19991102     NULL     
808594482     8/12/0004     199910     AU     19991102     NULL     
808594483     8/12/0004     199910     CI     19991102     NULL     
808594488     10/25/0007199765     CI     20001005     NULL     
In another case when I use my ctl as
LOAD DATA
INFILE *
INTO TABLE X_ODI_CNTRL_DUAL
APPEND
FIELDS TERMINATED BY ',' TRAILING NULLCOLS
PK INTEGER,
TS DATE(30) "YYYY-MM-DD hh24:mi:ss.ff3",
ORDER_MONTH6 CHAR,
COUNTRY CHAR,
MONTH_END_DATE CHAR,
UPDATEDBY CHAR,
STATUS_FLAG CHAR
BEGINDATA
3,2004-08-12 10:35:06.447,199910,CI,19991102,NULL,
the log file output is
Column Name Position Len Term Encl Datatype
PK FIRST 4 INTEGER
TS NEXT 30 , DATE YYYY-MM-DD hh24:mi:ss.ff3
ORDER_MONTH6 NEXT * , CHARACTER
COUNTRY NEXT * , CHARACTER
MONTH_END_DATE NEXT * , CHARACTER
UPDATEDBY NEXT * , CHARACTER
STATUS_FLAG NEXT * , CHARACTER
Record 1: Rejected - Error on table X_ODI_CNTRL_DUAL, column TS.
ORA-01821: date format not recognized
Any help is appreciated.

Similar Messages

  • Sql Loader Data Import Error!!!

    Hi,
    I have to import a huge volume of records from a CSV(150MB) file to table using sql loader. The input file contains '3286909' records. I am using the following control file and command to run the sql loader.
    Control File:
    lload data
    infile Test.csv
    into table TEST_LOAD
    fields terminated by ',' optionally enclosed by '"'
    ID integer external,
    PATH char
    *Command:* --------------
    C:\CSVFiles\CSV>sqlldr system/tiger control= test.ctl log=test.log readsize=200000000 bindsize=200000000
    After running the above command I am able to import '1215717'. Once sql loader reaches this limit then it stops without any error. Somtimes I would get 'SQL*Loader-510: Physical record in data file (test.csv) is longer than the maximum(1048576)'
    Please help me to perform this import operation.
    Thanks

    http://www.morganslibrary.org/reference/externaltab.html
    Example:
    I have a file on my server in a folder c:\mydata called text.csv which is a comma seperated file...
    1,"Fred",200
    2,"Bob",300
    3,"Jim",50As sys user:
    CREATE OR REPLACE DIRECTORY TEST_DIR AS "c:\mydata";
    GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser;Note: creates a directory object, pointing to a directory on the server and must exist on the server (it doesn't create the physical directory).
    As myuser:
    SQL> CREATE TABLE ext_test
      2    (id      NUMBER,
      3     empname VARCHAR2(20),
      4     rate    NUMBER)
      5  ORGANIZATION EXTERNAL
      6    (TYPE ORACLE_LOADER
      7     DEFAULT DIRECTORY TEST_DIR
      8     ACCESS PARAMETERS
      9       (RECORDS DELIMITED BY NEWLINE
    10        FIELDS TERMINATED BY ","
    11        OPTIONALLY ENCLOSED BY '"'
    12        (id,
    13         empname,
    14         rate
    15        )
    16       )
    17     LOCATION ('test.csv')
    18    );
    Table created.
    SQL> select * from ext_test;
            ID EMPNAME                    RATE
             1 Fred                        200
             2 Bob                         300
             3 Jim                          50
    SQL>
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 3 (NumberOfMultipleMatches).

    Hi,
    I have a file where fields are wrapped with ".
    =========== file sample
    "asdsa","asdsadasdas","1123"
    "asdsa","asdsadasdas","1123"
    "asdsa","asdsadasdas","1123"
    "asdsa","asdsadasdas","1123"
    ==========
    I am having a .net method to remove the wrap characters and write out a file without wrap characters.
    ======================
    asdsa,asdsadasdas,1123
    asdsa,asdsadasdas,1123
    asdsa,asdsadasdas,1123
    asdsa,asdsadasdas,1123
    ======================
    the .net code is here.
    ========================================
    public static string RemoveCharacter(string sFileName, char cRemoveChar)
                object objLock = new object();
                //VirtualStream objInputStream = null;
                //VirtualStream objOutStream = null;
                FileStream objInputFile = null, objOutFile = null;
                lock(objLock)
                    try
                        objInputFile = new FileStream(sFileName, FileMode.Open);
                        //objInputStream = new VirtualStream(objInputFile);
                        objOutFile = new FileStream(sFileName.Substring(0, sFileName.LastIndexOf('\\')) + "\\" + Guid.NewGuid().ToString(), FileMode.Create);
                        //objOutStream = new VirtualStream(objOutFile);
                        int nByteRead;
                        while ((nByteRead = objInputFile.ReadByte()) != -1)
                            if (nByteRead != (int)cRemoveChar)
                                objOutFile.WriteByte((byte)nByteRead);
                    finally
                        objInputFile.Close();
                        objOutFile.Close();
                    return sFileName.Substring(0, sFileName.LastIndexOf('\\')) + "\\" + Guid.NewGuid().ToString();
    ==================================
    however when I run the bulk load utility I get the error 
    =======================================
    Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 3 (NumberOfMultipleMatches).
    ==========================================
    the bulk insert statement is as follows
    =========================================
     BULK INSERT Temp  
     FROM '<file name>' WITH  
      FIELDTERMINATOR = ','  
      , KEEPNULLS  
    ==========================================
    Does anybody know what is happening and what needs to be done ?
    PLEASE HELP
    Thanks in advance 
    Vikram

    To load that file with BULK INSERT, use this format file:
    9.0
    4
    1 SQLCHAR 0 0 "\""      0 ""    ""
    2 SQLCHAR 0 0 "\",\""   1 col1  Latin1_General_CI_AS
    3 SQLCHAR 0 0 "\",\""   2 col2  Latin1_General_CI_AS
    4 SQLCHAR 0 0 "\"\r\n"  3 col3  Latin1_General_CI_AS
    Note that the format file defines four fields while the fileonly seems to have three. The format file defines an empty field before the first quote.
    Or, since you already have a .NET program, use a stored procedure with table-valued parameter instead. I have an example of how to do this here:
    http://www.sommarskog.se/arrays-in-sql-2008.html
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Sql loader 1: Rejected - Error on table "AP"."AP_SUPPLIER_SITES_INT", ....

    Hello all,
    I am getting error while running below sql loader command...
    load data
    infile *
    into TABLE AP_SUPPLIER_SITES_INT
    REPLACE
    fields terminated by ","
    OPTIONALLY ENCLOSED BY '"'
    VENDOR_INTERFACE_ID expression "to_char('select VENDOR_INTERFACE_ID from AP_SUPPLIERS_INT where CUSTOMER_NUM=:CUSTOMER_NUM')",
    VENDOR_SITE_INTERFACE_ID "to_char(ap_supplier_sites_int_s.NEXTVAL)",
    LAST_UPDATE_DATE "SYSDATE",
    LAST_UPDATED_BY,
    VENDOR_SITE_CODE,
    CREATION_DATE "SYSDATE",
    CREATED_BY,
    PURCHASING_SITE_FLAG,
    PAY_SITE_FLAG,
    ADDRESS_LINE1,
    ADDRESS_LINE2,
    ADDRESS_LINE3,
    CITY,
    STATE,
    ZIP,
    COUNTRY,
    PHONE,
    FAX,
    PAYMENT_METHOD_LOOKUP_CODE,
    TERMS_ID,
    CREATE_DEBIT_MEMO_FLAG,
    HOLD_UNMATCHED_INVOICES_FLAG,
    EMAIL_ADDRESS,
    MATCH_OPTION,
    EXCLUDE_FREIGHT_FROM_DISCOUNT,
    INVOICE_CURRENCY_CODE,
    PAYMENT_CURRENCY_CODE,
    COUNTRY_OF_ORIGIN_CODE,
    FREIGHT_TERMS_LOOKUP_CODE,
    PAY_GROUP_LOOKUP_CODE,
    PAY_DATE_BASIS_LOOKUP_CODE,
    ALWAYS_TAKE_DISC_FLAG,
    ORG_ID)
    begindata
    1005,,SYSDATE,1132,Test MA Site_1,SYSDATE,1132,Y,Y,No#907 62nd Street ,10th Sector,KK Nagar,Chennai,TamilNadu,600078,IN,+91 44 33333333,044 40404040,CHECK,10000,Y,N,[email protected],R,Y,INR,INR,IN,TBD,STANDARD,DISCOUNT,Y,120
    Log file:
    Table "AP"."AP_SUPPLIER_SITES_INT", loaded from every logical record.
    Insert option in effect for this table: REPLACE
    Column Name Position Len Term Encl Datatype
    VENDOR_INTERFACE_ID EXPRESSION
    SQL string for column : "to_char('select VENDOR_INTERFACE_ID from AP_SUPPLIERS_INT where CUSTOMER_NUM=:CUSTOMER_NUM')"
    VENDOR_SITE_INTERFACE_ID FIRST * , O(") CHARACTER
    SQL string for column : "to_char(ap_supplier_sites_int_s.NEXTVAL)"
    LAST_UPDATE_DATE NEXT * , O(") CHARACTER
    SQL string for column : "SYSDATE"
    LAST_UPDATED_BY NEXT * , O(") CHARACTER
    VENDOR_SITE_CODE NEXT * , O(") CHARACTER
    CREATION_DATE NEXT * , O(") CHARACTER
    SQL string for column : "SYSDATE"
    CREATED_BY NEXT * , O(") CHARACTER
    PURCHASING_SITE_FLAG NEXT * , O(") CHARACTER
    PAY_SITE_FLAG NEXT * , O(") CHARACTER
    ADDRESS_LINE1 NEXT * , O(") CHARACTER
    ADDRESS_LINE2 NEXT * , O(") CHARACTER
    ADDRESS_LINE3 NEXT * , O(") CHARACTER
    CITY NEXT * , O(") CHARACTER
    STATE NEXT * , O(") CHARACTER
    ZIP NEXT * , O(") CHARACTER
    COUNTRY NEXT * , O(") CHARACTER
    PHONE NEXT * , O(") CHARACTER
    FAX NEXT * , O(") CHARACTER
    PAYMENT_METHOD_LOOKUP_CODE NEXT * , O(") CHARACTER
    TERMS_ID NEXT * , O(") CHARACTER
    CREATE_DEBIT_MEMO_FLAG NEXT * , O(") CHARACTER
    HOLD_UNMATCHED_INVOICES_FLAG NEXT * , O(") CHARACTER
    EMAIL_ADDRESS NEXT * , O(") CHARACTER
    MATCH_OPTION NEXT * , O(") CHARACTER
    EXCLUDE_FREIGHT_FROM_DISCOUNT NEXT * , O(") CHARACTER
    INVOICE_CURRENCY_CODE NEXT * , O(") CHARACTER
    PAYMENT_CURRENCY_CODE NEXT * , O(") CHARACTER
    COUNTRY_OF_ORIGIN_CODE NEXT * , O(") CHARACTER
    FREIGHT_TERMS_LOOKUP_CODE NEXT * , O(") CHARACTER
    PAY_GROUP_LOOKUP_CODE NEXT * , O(") CHARACTER
    PAY_DATE_BASIS_LOOKUP_CODE NEXT * , O(") CHARACTER
    ALWAYS_TAKE_DISC_FLAG NEXT * , O(") CHARACTER
    ORG_ID NEXT * , O(") CHARACTER
    value used for ROWS parameter changed from 64 to 31
    Record 1: Rejected - Error on table "AP"."AP_SUPPLIER_SITES_INT", column VENDOR_INTERFACE_ID.
    ORA-01722: invalid number
    Please guide me what could be an issue...
    Is there any other way to pass function in sql loader..
    Thanks and Regards
    Muthukumar

    I created function like below...... retrun value as number
    create or replace function VDR_INF_F(V_NUM number)
    return number is
    VDR_INF_id AP_SUPPLIERS_INT.VENDOR_INTERFACE_ID%type;
    begin
    select VENDOR_INTERFACE_ID
    into VDR_INF_id
    from AP_SUPPLIERS_INT
    where CUSTOMER_NUM = V_NUM;
    return VDR_INF_id;
    end;
    And attached that into loader program...
    load data
    infile *
    into TABLE AP_SUPPLIER_SITES_INT
    REPLACE
    fields terminated by ","
    OPTIONALLY ENCLOSED BY '"'
    VENDOR_SITE_INTERFACE_ID "to_char(ap_supplier_sites_int_s.NEXTVAL)",
    LAST_UPDATE_DATE "SYSDATE",
    LAST_UPDATED_BY,
    VENDOR_SITE_CODE,
    CREATION_DATE "SYSDATE",
    CREATED_BY,
    PURCHASING_SITE_FLAG,
    PAY_SITE_FLAG,
    ADDRESS_LINE1,
    ADDRESS_LINE2,
    ADDRESS_LINE3,
    CITY,
    STATE,
    ZIP,
    COUNTRY,
    PHONE,
    FAX,
    PAYMENT_METHOD_LOOKUP_CODE,
    TERMS_ID,
    CREATE_DEBIT_MEMO_FLAG,
    HOLD_UNMATCHED_INVOICES_FLAG,
    EMAIL_ADDRESS,
    MATCH_OPTION,
    EXCLUDE_FREIGHT_FROM_DISCOUNT,
    INVOICE_CURRENCY_CODE,
    PAYMENT_CURRENCY_CODE,
    COUNTRY_OF_ORIGIN_CODE,
    FREIGHT_TERMS_LOOKUP_CODE,
    PAY_GROUP_LOOKUP_CODE,
    PAY_DATE_BASIS_LOOKUP_CODE,
    ALWAYS_TAKE_DISC_FLAG,
    ORG_ID,
    VENDOR_INTERFACE_ID expression "VDR_INF_F(':CUSTOMER_NUM')"
    begindata
    1005,,SYSDATE,1132,Test MA Site_1,SYSDATE,1132,Y,Y,No#907 62nd Street ,10th Sector,KK Nagar,Chennai,TamilNadu,600078,IN,+91 44 33333333,044 40404040,CHECK,10000,Y,N,[email protected],R,Y,INR,INR,IN,TBD,STANDARD,DISCOUNT,Y,120,1005
    1005,,SYSDATE,1132,Test MA Site_2,SYSDATE,1132,Y,Y,No#907 62nd Street ,10th Sector,KK Nagar,Chennai,TamilNadu,600078,IN,+91 44 33333333,044 40404040,CHECK,10000,Y,N,[email protected],R,Y,INR,INR,IN,TBD,STANDARD,DISCOUNT,Y,120,1005
    1005,,SYSDATE,1132,Test MA Site_3,SYSDATE,1132,Y,Y,No#907 62nd Street ,10th Sector,KK Nagar,Chennai,TamilNadu,600078,IN,+91 44 33333333,044 40404040,CHECK,10000,Y,N,[email protected],R,Y,INR,INR,IN,TBD,STANDARD,DISCOUNT,Y,120,1005
    1006,,SYSDATE,1132,Test1 M Site_1,SYSDATE,1132,Y,Y,No#907 62nd Street ,10th Sector,KK Nagar,Chennai,TamilNadu,600078,IN,+91 44 33333333,044 40404040,CHECK,10000,Y,N,[email protected],R,Y,INR,INR,IN,TBD,STANDARD,DISCOUNT,Y,120,1006
    1007,,SYSDATE,1132,Test1 B Site_1,SYSDATE,1132,Y,Y,No#907 62nd Street ,10th Sector,KK Nagar,Chennai,TamilNadu,600078,IN,+91 44 33333333,044 40404040,CHECK,10000,Y,N,[email protected],R,Y,INR,INR,IN,TBD,STANDARD,DISCOUNT,Y,120,1007
    Even now sql loader giving same error..
    like below.....
    able "AP"."AP_SUPPLIER_SITES_INT", loaded from every logical record.
    Insert option in effect for this table: REPLACE
    Column Name Position Len Term Encl Datatype
    VENDOR_SITE_INTERFACE_ID FIRST * , O(") CHARACTER
    SQL string for column : "to_char(ap_supplier_sites_int_s.NEXTVAL)"
    LAST_UPDATE_DATE NEXT * , O(") CHARACTER
    SQL string for column : "SYSDATE"
    LAST_UPDATED_BY NEXT * , O(") CHARACTER
    VENDOR_SITE_CODE NEXT * , O(") CHARACTER
    CREATION_DATE NEXT * , O(") CHARACTER
    SQL string for column : "SYSDATE"
    CREATED_BY NEXT * , O(") CHARACTER
    PURCHASING_SITE_FLAG NEXT * , O(") CHARACTER
    PAY_SITE_FLAG NEXT * , O(") CHARACTER
    ADDRESS_LINE1 NEXT * , O(") CHARACTER
    ADDRESS_LINE2 NEXT * , O(") CHARACTER
    ADDRESS_LINE3 NEXT * , O(") CHARACTER
    CITY NEXT * , O(") CHARACTER
    STATE NEXT * , O(") CHARACTER
    ZIP NEXT * , O(") CHARACTER
    COUNTRY NEXT * , O(") CHARACTER
    PHONE NEXT * , O(") CHARACTER
    FAX NEXT * , O(") CHARACTER
    PAYMENT_METHOD_LOOKUP_CODE NEXT * , O(") CHARACTER
    TERMS_ID NEXT * , O(") CHARACTER
    CREATE_DEBIT_MEMO_FLAG NEXT * , O(") CHARACTER
    HOLD_UNMATCHED_INVOICES_FLAG NEXT * , O(") CHARACTER
    EMAIL_ADDRESS NEXT * , O(") CHARACTER
    MATCH_OPTION NEXT * , O(") CHARACTER
    EXCLUDE_FREIGHT_FROM_DISCOUNT NEXT * , O(") CHARACTER
    INVOICE_CURRENCY_CODE NEXT * , O(") CHARACTER
    PAYMENT_CURRENCY_CODE NEXT * , O(") CHARACTER
    COUNTRY_OF_ORIGIN_CODE NEXT * , O(") CHARACTER
    FREIGHT_TERMS_LOOKUP_CODE NEXT * , O(") CHARACTER
    PAY_GROUP_LOOKUP_CODE NEXT * , O(") CHARACTER
    PAY_DATE_BASIS_LOOKUP_CODE NEXT * , O(") CHARACTER
    ALWAYS_TAKE_DISC_FLAG NEXT * , O(") CHARACTER
    ORG_ID NEXT * , O(") CHARACTER
    VENDOR_INTERFACE_ID EXPRESSION
    SQL string for column : "VDR_INF_F(':CUSTOMER_NUM')"
    value used for ROWS parameter changed from 64 to 31
    Record 1: Rejected - Error on table "AP"."AP_SUPPLIER_SITES_INT", column VENDOR_INTERFACE_ID.
    ORA-01722: invalid number
    Record 2: Rejected - Error on table "AP"."AP_SUPPLIER_SITES_INT", column VENDOR_INTERFACE_ID.
    ORA-01722: invalid number
    Record 3: Rejected - Error on table "AP"."AP_SUPPLIER_SITES_INT", column VENDOR_INTERFACE_ID.
    ORA-01722: invalid number
    Record 4: Rejected - Error on table "AP"."AP_SUPPLIER_SITES_INT", column VENDOR_INTERFACE_ID.
    ORA-01722: invalid number
    Record 5: Rejected - Error on table "AP"."AP_SUPPLIER_SITES_INT", column VENDOR_INTERFACE_ID.
    ORA-01722: invalid number
    Please guide me, how to clear this issue?
    Thanks and Regards,
    Muthu

  • SQL LOADER DATA INSERT ISSUES

    I tried inserting data into an empty table in my database but got the following error:
    SQL*Loader: Release 11.1.0.6.0 - Production on Tue Jul 7 22:01:35 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader-350: Syntax error at line 7.
    Expecting "," or ")", found "VARCHAR2".
    countryname VARCHAR2(25),
    ^
    What is wrong what this please? Find below the contents of .CTL and .DAT files.
    Content of load_country.CTL
    LOAD DATA
    infile '/D:/Data/Load/load_country.dat'
    INTO TABLE ASSET.COUNTRY
    INSERT
    FIELDS TERMINATED BY ';'
    (countrycode,
    countryname VARCHAR2(25),
    population NUMBER(10))
    The content of the load_country.DAT file:
    BEN;Benin;8791832
    BFA;Burkina Faso;15746232
    CPV;Cape Verde;503000
    Thank you.
    Ofonime Essien.

    Hello,
    After solving the Varchar2 problem, I received this error for the NUMBER data type:
    SQL*Loader: Release 11.1.0.6.0 - Production on Wed Jul 8 11:47:16 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader-350: Syntax error at line 8.
    Expecting "," or ")", found "number".
    population number(10))
    ^
    I replaced the Number data type with Float but received this error:
    SQL*Loader: Release 11.1.0.6.0 - Production on Wed Jul 8 11:52:27 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader-350: Syntax error at line 8.
    Expecting valid column specification, "," or ")", found "(".
    population Float(10))
    ^
    Replacing Number data type with Integer, I received this error:
    SQL*Loader: Release 11.1.0.6.0 - Production on Wed Jul 8 12:17:11 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Control File: D:\Data\Load\tsl.CTL
    Data File: D:\Data\Load\c.dat
    Bad File: D:\Data\Load\c.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 C, loaded from every logical record.
    Insert option in effect for this table: INSERT
    Column Name Position Len Term Encl Datatype
    COUNTRYCODE FIRST * ; CHARACTER
    COUNTRYNAME NEXT 27 VARCHAR
    POPULATION NEXT 10 INTEGER
    SQL*Loader-941: Error during describe of table C
    ORA-04043: object C does not exist
    Thank you so much.
    Ofonime.
    Edited by: ofonime on Jul 8, 2009 7:09 PM

  • SQL Loader-704: Internal error: Maximum record length must be = [10000000]

    Hi,
    running SQL*Loader (Release 8.1.7.2.1) causes an error "SQL*Loader-704: Internal error: Maximum record length must be <= [10000000]". This error occurs when SQLLoader is trying to load several thousand records into a database table. Each record is less than 250 bytes in length.
    Any idea what could cause the problem?
    Thanks in advance!
    Ingo
    And here's an extract from the log file generated by SQLLoader :
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 1360 rows, maximum of 10485760 bytes
    Continuation: none specified
    Path used: Conventional
    Table "SYSTEM"."BASICPROFILE$1", 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
    UUID FIRST * O(X07) CHARACTER
    DOMAINID NEXT * O(X07) CHARACTER
    LASTMODIFIED NEXT * O(X07) DATE DD/MM/YYYY HH24:MI:SS
    ANNIVERSARY NEXT * O(X07) CHARACTER
    BIRTHDAY NEXT * O(X07) CHARACTER
    COMPANYNAME NEXT * O(X07) CHARACTER
    DESCRIPTION NEXT * O(X07) CHARACTER
    FIRSTNAME NEXT * O(X07) CHARACTER
    COMPANYNAMETRANSCRIPTION NEXT * O(X07) CHARACTER
    FIRSTNAMETRANSCRIPTION NEXT * O(X07) CHARACTER
    GENDER NEXT * O(X07) CHARACTER
    HOBBIES NEXT * O(X07) CHARACTER
    HONORIFIC NEXT * O(X07) CHARACTER
    JOBTITLE NEXT * O(X07) CHARACTER
    KEYWORDS NEXT * O(X07) CHARACTER
    LASTNAME NEXT * O(X07) CHARACTER
    LASTNAMETRANSCRIPTION NEXT * O(X07) CHARACTER
    NICKNAME NEXT * O(X07) CHARACTER
    PREFERREDLOCALE NEXT * O(X07) CHARACTER
    PREFERREDCURRENCY NEXT * O(X07) CHARACTER
    PROFESSION NEXT * O(X07) CHARACTER
    SECONDLASTNAME NEXT * O(X07) CHARACTER
    SECONDNAME NEXT * O(X07) CHARACTER
    SUFFIX NEXT * O(X07) CHARACTER
    TITLE NEXT * O(X07) CHARACTER
    CONFIRMATION NEXT * O(X07) CHARACTER
    DEFAULTADDRESSID NEXT * O(X07) CHARACTER
    BUSINESSPARTNERNO NEXT * O(X07) CHARACTER
    TYPECODE NEXT * O(X07) CHARACTER
    OCA NEXT * O(X07) CHARACTER
    SQL*Loader-704: Internal error: Maximum record length must be <= [10000000]

    As a second guess, the terminator changes or goes missing at some point in the data file. If you are running on *NIX, try wc -l data_file_name.  This will give a count of the number of lines (delimited by CHR(10) ) that are in the file.  If this is not close to the number you expected, then that is your problem.
    You could also try gradually working through the data file loading 100 records, then 200, then 300 etc. to see where it starts to fail.
    HTH
    John

  • SQL Loader Multibyte character error, LENGTH SEMANTICS CHARACTER

    Hi,
    startet SQL Loader Multibyte character error
    {thread:id=2340726}
    some mod locked the thread, why?
    the solution for others:
    add LENGTH SEMANTICS CHARACTER to the controlfile
    LOAD DATA characterset UTF8 LENGTH SEMANTICS CHARACTER
    TRUNCATE                              
    INTO TABLE utf8file_to_we8mswin1252
      ID    CHAR(1)     
    , TEXT  CHAR(40)
    )Regards
    Michael

    Hi Werner,
    on my linux desktop:
    $ file test.dat
    test.dat: UTF-8 Unicode text, with very long lines
    my colleague is working on a windows system.
    On both systems exact the same error from SQL Loader.
    Btw, try with different number of special characters (german umlaute and euro) and there is no chance to load without the error
    when to many (?) special characters or data is long as column length and special characters included.
    Regards
    Michael

  • Create sql loader data file dynamically

    Hi,
    I want a sample program/approach which is used to create a sql loader data file.
    The program will read table name as i/p and will use
    select stmt will column list derived from user_tab_columns from data dictionary
    assuming multiple clob columns in the column list.
    Thanks
    Manoj

    I 'm writing clob and other columns to a sql loader dat file.
    Below sample code for writing clob column is giving file write error.
    How can I write multiple clobs to dat file so that control file will handle it correctly
    offset NUMBER := 1;
    chunk VARCHAR2(32000);
    chunk_size NUMBER := 32000;
    WHILE( offset < dbms_lob.getlength(l_rec_type.narrative) )
    LOOP
    chunk := dbms_lob.substr(l_rec_type.narrative, chunk_size, offset );
    utl_file.put( l_file_handle, chunk );
         utl_file.fflush(l_file_handle);
    offset := offset + chunk_size;
    END LOOP;
         utl_file.new_line(l_file_handle);

  • SQL*Loader-350: Syntax error at line 5.

    Hi ,iam  new for  using  sql*loader, with minimum  understanding from  the forums,Iam  trying  to load data  from a flat  file (.dat) to oracle database.
    here  is  my  .dat file-------> data_file.dat
    aaaa, mumbai
    bbbb,kolkat
    here is  my  .ctl fle ------->ctrl_file.ctl
    load data 
    infile 'F:\oracle_utils_kiranorcl\KIR_ORA_DIR\emp_data.dat'
    into table  test
    fields terminated by  ","
    ( NAM  varchar2(12),
    PLACE varchar2(8)
    here  is  db_tab_name  structure 
    create table test (nam Varchar2(15),place Varchar2(10));
    SQL> select *  from  test;
    NAM             PLACE
    now.......
    iam  running  the command on  cmd window on  os  level
    F:\app\NANDAN\product\11.2.0\dbhome_1>sqlldr userid=kiranmai/kiranmai@kiranorcl control=F:\oracle_utils_kiranorcl\KIR_ORA_DIR\emp_data.ctl log=F:\oracle_utils_kiranorcl\KIR_ORA_DIR\emp_data.log bad=F:\oracle_utils_kiranorcl\KIR_ORA_DIR\emp_data.bad
    when  i run this  above command ,I get  an  error,
    SQL*Loader-350: Syntax error at line 5.
    Expecting "," or ")", found "varchar2".
    ( NAM varchar2(12),
           ^
    I  tried so many  times by creating  new ctl  files further. But  couldn't  able get  what  is  the  wrong  thing  ????
    Please help me ..
    Thanks

    Instead of:
    fields terminated by  ","
    ( NAM  varchar2(12),
    PLACE varchar2(8)
    try:
    fields terminated by  ","
    ( NAM  char,
    PLACE char

  • SQL*Loader-704: Internal error: ulconnect: OCIInitialize [1804]

    I tried using MassLoader to load some data into the local database on the Oracle 9i server. MassLoader first generated the data files and then called sqlldr to load the data into the db. It failed and I received SQL*Loader-704: Internal error: ulconnect: OCIInitialize [1804]. I tried with Oracle 8i sqlldr and it worked fine. So, the problem seems to be with Oracle 9i sqlldr. Is there any fix for this or how can I investigate it? Thanks in advance.

    The problem lies in permissions in $ORACLE_HOME. I had the problem and came up with two solutions. The first was to chmod 6751 sqlldr. The second I liked better was to go thru the subdirectores and insure that all of the files were marked as accessable by others. After talking with fellow dba's we changed the permissions to 755 on all directories but bin. Again this might not be the correct fix but it works
    try again after changing
    ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    to
    ORA_NLS33=$ORACLE_RDBMS/ocommon/nls/admin/data
    try above solution and let us know.

  • SQL*Loader-704: Internal error: ulconnect: OCIEnvCreate [-1]

    I am getting the following error on my Windows XP box:
    sqlldr illumina/illumina@rmdodmsrv ivsheader2.ctl
    SQL*Loader: Release 11.1.0.7.0 - Production on Wed Feb 17 13:40:02 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader-704: Internal error: ulconnect: OCIEnvCreate [-1]
    If I try the following command it connects fine:
    sqlldr illumina/illumina@rmdodmsrv ivsheader2.ctl
    SQL*Loader: Release 11.1.0.7.0 - Production on Wed Feb 17 13:40:02 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader-704: Internal error: ulconnect: OCIEnvCreate [-1]
    I have an Oracle_Home env variable set to the oracle directory.
    Please help

    I know its an older thread and the thread was about Oracle 10.2.x I worked on client 11.2.0.1 but I thought I can share what I did to add sqlldr to instant Oracle client.
    I used Oracle instant client 11.2.0.1 with sqlplus. I also downloaded and installed the full Oracle client 11.2.0.1 to have access to the sqlldr files. I chose Custom install and only installed the utilities.
    - Within the oracle instant client directory make sure that you put all sqlldr related files into a bin directory.
    - Make sure you have all libraries that are needed by sqlldr copied from the full client into the bin directory. Also copy the sqlldr.exe into the bin folder.
    - Copy directory nls from the full client to the instant client (especially the information in subdirectory "data" seems to be needed)
    - Copy directory rdbms from the full client to the instant client. This contains the error messages. I only copied mesg/oraus.msb and mesg/ulus.msb. However, if you dont get all files you risk that you will not have meaningful error messages.
    - Copy directory oracore from the full client to the instant client (especially the information in subdirectory "timezone" seem to be needed).
    To find out which files sqlldr is trying to access you can use strace, truss on Unix systems or ProcessMonitor on Windows.
    To run the sqlldr I needed to set the environment variable ORACLE_HOME to the instant client directory. I also created a tnsnames.ora file and set TNS_ADMIN to the directory the tnsnames.ora is located.

  • SQL*Loader-350: Syntax error at line 1.

    I am getting an systax error saying :
    SQL*Loader-350: Syntax error at line 1.
    Expecting keyword LOAD, found "ï".
    What could be the prob ??

    description of the control file :
    LOAD DATA
    APPEND INTO TABLE TEST_UPDATE
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (STATUS constant 3,
    CID sequence (count),
    SUBJECT_ID constant 0,
    PNO "RTRIM(LTRIM(:PID))",
    FREQ NULLIF VISIT = BLANKS,
    INV "RTRIM(LTRIM(:INV))",
    PNUM NULLIF PAGENUM = BLANKS,
    VDT DATE "DD/MM/YYYY HH24:MI:SS"
    NULLIF VISIT_DATE = BLANKS,
    MKEY "RTRIM(LTRIM(:MASTERKEY))",
    DKEY "RTRIM(LTRIM(:DETAILKEY))")
    I found a sysntax error for this. Plz suggest.

  • ERROr- SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]

    Hi All,
    I was running a java program which uses java runtime to call Oracle SQL Loader to load a data file inthe Data base , After loading one file sucessfully , the process stopped after giving the error -:
    SQL*Loader execution exited with EX_FAIL, see logfile:SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
    ORA-12154: TNS:could not resolve service name
    Can anyone please let me know What can be the problem . ???? Please let me know where the problem lies ?
    Regards
    Asif

    Can some one help to solve this problem????
    Edited by: NanthaKumarAR on Apr 13, 2012 5:55 AM

  • SQL*Loader-704: Internal error

    Dear all,
    I have run this command in windows
    sqlplus a/b@c
    it is connected successfully, I can run sql and results returned.
    however, I run this sql loader command
    sqlldr a/b@c control=test.ctl data=test.txt
    but error is returned
    SQL*Loader-704: Internal error: ulconnect: OCIServerAttach [0]
    ORA-12154: TNS:could not resolve the connect identifier specified
    what are the reasons and why?
    thank you very much!

    Hi,
    I had the same problem. I already fixed it!
    I use two ORACLE_HOME, one for Oracle Client and one for Oracle Developer Suite 10g. The sqlplus.exe is in both BIN directories, but sqlldr is only in client's ORACLE_HOME\BIN directory.
    When you run sqlplus.exe, it uses tnsnames.ora from devsuite's ORACLE_HOME\NETWORK\ADMIN, I think, it contains rows for SID=c.
    When you run sqlldr.exe, it uses tnsnames.ora from client's ORACLE_HOME\NETWORK\ADMIN, I think, it does not contain rows for SID=c (my tnsnames.ora did not contain them).
    Make both tnsnames.ora the same and your problem will be fixed.
    Tom

  • Error in Primavera Analytics 3.1 (staretl issuing long data type error)

    Hi,
    While running ETL for Primavera Analytics 3.1 I am facing long data type error.
    Detailed session log can be found on below URL.
    http://pastebin.com/Ez0VihGN
    I have following environment.
    Primavera Analytics on Win2k8 64bit with 11g R2 DB.
    Primavera EPPM DB on Sql Server
    Connectivity through Oracle Gateway. (tested)
    Please help.
    Naeem Akhtar
    Edited by: Naeem Akhtar Khan on Apr 9, 2013 3:58 AM

    Based on your post there is an error in you initdg4msl.ora file............ make sure you the database connection is correct and you add the two statement to the file
    for example
    Should be: HS_FDS_CONNECT_INFO=YOURSQLSERVER//YOUR DATABASE
    Make sure you to add the following to the same file (see page 92):
    HS_NLS_LENGTH_SEMANTICS=CHAR
    HS_FDS_CHARACTER_SEMANTICS = TRUE
    HS_KEEP_REMOTE_COLUMN_SIZE=ALL
    Rerun the ETL process

Maybe you are looking for

  • ITunes crashes when importing video (only)

    I'm running 6.0.1, and have a new iPod. I wanted to use my g4 powerbook (1.33 MHz, 512 MB RAM, OS X Tiger 10.4.3) as my video library, and use my PC for my existing 350 GB music library. However, iTunes hangs with the beachball when I add any video (

  • Array to vector - isn't working.

    Hello all. Firstly, this is not a homework question. I am doing a course which teaches Object Oriented programming which happens to use Java to teach it. I've discovered I like programming in Java and figure I have just enough knowledge to be dangero

  • Mountain lion's Time machine can't restore iphoto,

    I'd backup overall system via time machine to timecapsule, including iphoto, when I start up time machine to restore some files, as finder ,mail,calendar,they are fine without any problem, But when I launch iphoto then startup time machine, the windo

  • Distribute data by reference data

    Hi, requirment as follow: 1actual sale data cube (reference data) 0plant 0article year/week acturalsalesdata D001     00010     2007/01     100.00 D002     00010     2007/01     200.00 D001     00010     2007/02     150.00 D002     00010     2007/02 

  • Syncing AFTER Updating

    This is really a comment for Apple. I hope someone who works at Apple reads these forums and has the authority to pass on comments ... and takes this comment as seriously as it deserves and passes it on to the right people. It really bothers me that