Dates in sqlldr

Hi
I have a date format in my .csv file which appears like this 20021017 in YYYYMMDD format
what i want is to load the date into the table in DD-MON-YYYY format
how can i acheive this
Thanx
Sushant

When you specify the column in the control file it should look like this:
<column_name> date "YYYYMMDD" There are several possibilities to display the date in DD-MON-YYYY format, depending on your needs.
You could e.g. change the default date format for the session:
alter session set nls_date_format='DD-MON-YYYY';

Similar Messages

  • Skipping lines whle uploading data through SQLLDR

    Hi All,
    I have a requirement where I need to upload the data using SQLLDR and skip first 3 lines.
    Can someone let me know the SQLLDR flags to do so.
    ~Parag

    ok thanks...it worked...Couple of more questions...
    1. Is it possible to skip a record (entire line) having particular string.
    2. Also the data file often contains extra new line character at the end. SQLLDR fails at the last line. Is it possible to make SQLLDR skip the new line at the end of file.
    Edited by: Parag Kalra on Jun 22, 2010 2:02 PM

  • Data error while loading data using SQLLDR

    Hi Gurus,
    Kindly let em know the possible reasons for getting the below error returned by SQLLDR after loading data:
    x no of rows not loaded due to data errors in SQLLDR
    Could it be due to issues in control file?

    you'll find it well explained here :
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/part_ldr.htm#i436326
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_concepts.htm#i1004846

  • Error in Loading Data with SQLLDR in Oracle 10G

    Hello,
    Can any one suggest whats the problem in the below mentioned Control file used for loading data through SQL*LOADER
    LOAD DATA
    INFILE 'D:\test\temt.txt'
    BADFILE 'test.bad'
    DISCARDFILE 'test.dsc'
    INTO TABLE "TEST"
    INSERT
    (SRNO INTEGER(7),
    PROD_ID INTEGER(10),
    PROMO_ID INTEGER(10),
    CHANNEL_ID INTEGER(10),
    UNIT_COST INTEGER(10),
    UNIT_PRICE INTEGER(10)
    I am trying to load data in SCOTT schema as user scott.
    Why do i get such an error, please refer the attach Log file.
    SQL*Loader: Release 10.2.0.1.0 - Production on Fri Mar 20 14:43:35 2009
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Control File: D:\test\temt.ctl
    Data File: D:\test\temt.txt
    Bad File: test.bad
    Discard File: test.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 "TEST", loaded from every logical record.
    Insert option in effect for this table: INSERT
    Column Name Position Len Term Encl Datatype
    SRNO FIRST 7 INTEGER
    PROD_ID NEXT 10 INTEGER
    PROMO_ID NEXT 10 INTEGER
    CHANNEL_ID NEXT 10 INTEGER
    UNIT_COST NEXT 10 INTEGER
    UNIT_PRICE NEXT 10 INTEGER
    Record 1: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 2: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 3: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 4: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 5: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 6: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 7: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 8: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 9: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 10: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 11: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 12: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 13: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 14: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 15: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 16: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 17: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 18: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 19: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 20: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 21: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 22: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 23: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 24: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 25: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 26: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 27: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 28: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 29: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 30: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 31: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 32: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 33: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 34: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 35: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 36: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 37: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 38: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 39: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 40: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 41: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 42: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 43: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 44: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 45: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 46: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 47: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 48: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 49: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 50: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    Record 51: Rejected - Error on table "TEST".
    ORA-01460: unimplemented or unreasonable conversion requested
    MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
    Table "TEST":
    0 Rows successfully loaded.
    51 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: 3648 bytes(64 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 64
    Total logical records rejected: 51
    Total logical records discarded: 0
    Run began on Fri Mar 20 14:43:35 2009
    Run ended on Fri Mar 20 14:43:43 2009
    Elapsed time was: 00:00:07.98
    CPU time was: 00:00:00.28
    Below is the method of using SQLLDR and table details,
    SQL> desc test
    Name Null? Type
    SRNO NUMBER(7)
    PROD_ID NUMBER(10)
    PROMO_ID NUMBER(10)
    CHANNEL_ID NUMBER(10)
    UNIT_COST NUMBER(10)
    UNIT_PRICE NUMBER(10)
    Method for using sqlldr is :
    cmd promt,
    d:\> sqlldr scott/tiger
    control = D:\test\temt.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Fri Mar 20 15:55:50 2009
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Commit point reached - logical record count 64
    I even tried few examples,
    Which of the below mentioned Control file make sense,
    --1
    LOAD DATA
    INFILE 'D:\test\temt.txt'
    BADFILE 'test.bad'
    DISCARDFILE 'test.dsc'
    INTO TABLE "TEST"
    INSERT
    FIELD TERMINATED BY (,)
    (SRNO INTEGER(7),
    PROD_ID INTEGER(10),
    PROMO_ID INTEGER(10),
    CHANNEL_ID INTEGER(10),
    UNIT_COST INTEGER(10),
    UNIT_PRICE INTEGER(10)
    --2
    LOAD DATA
    INFILE 'D:\test\temt.txt'
    BADFILE 'test.bad'
    DISCARDFILE 'test.dsc'
    INTO TABLE "TEST"
    INSERT
    FIELD TERMINATED BY (,) optionally enclosed by '"'
    (SRNO INTEGER(7),
    PROD_ID INTEGER(10),
    PROMO_ID INTEGER(10),
    CHANNEL_ID INTEGER(10),
    UNIT_COST INTEGER(10),
    UNIT_PRICE INTEGER(10)
    *For code--1 i get below mentioned error..*
    D:\>sqlldr scott/tiger
    control = D:\test\temt.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Fri Mar 20 16:36:00 2009
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL*Loader-350: Syntax error at line 8.
    Expecting "(", found "FIELD".
    FIELD TERMINATED BY (,)
    ^
    *And for code--2 i get the below error,*
    D:\>sqlldr scott/tiger
    control = D:\test\temt.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Fri Mar 20 16:39:22 2009
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL*Loader-350: Syntax error at line 8.
    Expecting "(", found "FIELD".
    FIELD TERMINATED BY (,) optionally enclosed by '"'
    ^
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    below is the data i am trying to load through sqlldr
    1,14,999,3,89098,111287
    2,14,999,2,88645,110899
    3,14,999,2,90418,117623
    4,14,999,3,89272,115999
    5,14,999,4,86364,117623
    6,15,999,3,87522,101399
    7,15,999,4,84671,99999
    8,15,999,4,84671,99999
    9,15,999,4,86364,101399
    10,15,999,4,88735,100399
    11,15,999,2,90418,101399
    12,15,999,3,89272,101399
    13,15,999,2,90418,101399
    14,17,999,2,9694,155099
    15,17,999,3,97618,155099
    16,17,999,3,97618,155099
    17,18,999,3,11333,169783
    18,18,999,2,11479,163279
    19,18,999,3,11333,163279
    20,18,999,3,115141,173504
    21,18,999,2,117086,165565
    22,18,999,2,116856,17532
    23,18,999,2,117086,169783
    24,19,999,4,489,6237
    25,19,999,3,4968,6302
    26,20,999,2,52876,60839
    27,20,999,3,52202,59999
    28,20,999,3,53246,59999
    29,20,999,3,54205,60209
    30,20,999,3,54205,60209
    31,21,999,4,76204,106773
    32,21,999,4,76204,106773
    33,21,999,3,7877,105299
    34,21,999,4,76204,106773
    35,21,999,4,77576,105668
    36,21,999,3,7877,105299
    37,21,999,4,76204,105299
    38,21,999,2,81377,107595
    39,21,999,2,81377,107595
    40,21,999,4,77728,107595
    41,22,999,3,2187,2656
    42,22,999,2,2216,2661
    43,22,999,3,2187,2656
    44,22,999,2,2251,2632
    45,22,999,3,2187,2656
    46,22,999,4,2154,2628
    47,22,999,3,2187,2656
    48,22,999,3,2231,2661
    49,22,999,3,2231,2624
    50,22,999,2,2296,2632
    51,22,999,3,2231,2661
    52,22,999,4,2158,2661
    53,23,999,3,1913,2408
    54,23,999,3,1951,2375
    55,23,999,3,1987,2383
    56,23,999,3,1951,2408
    57,24,999,4,3946,4943
    58,24,999,3,4073,4883
    59,24,999,2,4053,4934
    60,24,999,2,4053,4866
    61,24,999,4,3946,4943
    62,24,999,3,4001,4943
    63,24,999,3,4154,4892
    64,24,999,4,4025,4875
    65,24,999,4,4025,4875
    66,24,999,2,4134,4875
    67,24,999,3,4081,4943
    68,24,999,2,4134,4934
    69,24,999,4,4025,4943
    70,24,999,4,4025,4875
    71,24,999,3,4081,4943
    72,25,999,3,983,12655
    73,25,999,3,983,12655
    74,25,999,2,9958,12655
    75,25,999,3,983,12655
    76,25,999,2,9958,12832
    77,25,999,3,10027,12832
    78,25,999,2,10157,12774
    79,25,999,4,9888,12655
    80,25,999,2,10157,12832
    81,25,999,4,9888,12832
    82,25,999,4,9888,12832
    83,26,999,3,1305,17034
    84,26,999,3,1305,16799
    85,26,999,3,13551,16858
    86,27,999,3,3992,4927
    87,27,999,3,4064,4876
    88,29,999,3,43761,56175
    89,29,999,2,44942,55621
    90,29,999,4,42335,55399
    91,29,999,2,44322,55399
    92,29,999,2,45208,56175
    93,29,999,2,45208,56175
    94,29,999,4,43182,56175
    95,29,999,3,44636,56175
    96,29,999,4,43182,56175
    97,29,999,4,43182,56175
    98,30,999,3,869,1094
    99,30,999,4,857,1079
    100,30,999,2,898,1079
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • Server Hang While trying to load Data using SQLLDR

    Hi guru's
    OS Version: Centos 6 64 bit
    DB Version : 11gR2 64 bit
    When i am trying to load data using SQL ldr the loading in between hangs. As well as when i am trying to transfer text files which are approx 14Gb using winscp then it show me error as mentioned below:
    Host is not communicating for more than 15 seconds.Still waiting..............
    Not:if problem repeats , by turning off 'Optimize connection buffer size'
    Warning : Abort this operation will close the connection
    I talked to our n/w admin regarding the same problem
    He blaim that its due to oracle not by any n/w
    can anyone help me in this respect.

    Check MOS note :
    SQL*Loader Hangs After Start [ID 1186863.1]

  • Loading split data with sqlldr

    Hi,
    My table has got the following format:
    TABLE tbl1 (
    col1 VARCHAR2(10),
    col2 VARCHAR2(10),
    col3 VARCHAR2(10))
    I receive a file which data I import into my above table tbl1 using the sql Loader and the control file has the following:
    LOAD DATA APPEND INTO tbl1
    col1 (1:5) CHAR,
    col2 (6:5) CHAR,
    col3 (11:5) CHAR
    My data file contains the following:
    AAA,BBB,CCC,
    AAA,BBB,,DDD
    The idea is to load CCC into tbl1.col3 as well as DDD into tbl1.col3 (the rest loads in as per normal).
    How can I do that?
    Thanks,
    Philippe

    hi Sandeep...
    Thanks for pointing the mistake.
    Also I am getting problem when I am loading the data. here is the log.
    Table RTD_TMO_MODEL_SCORES_BI, loaded from every logical record.
    Insert option in effect for this table: APPEND
    Column Name Position Len Term Encl Datatype
    RECORD_ID FIRST * | O(") CHARACTER
    SQL string for column : "SQ_RTD_TMO_MODEL_SCORES_BI.NEXTVAL"
    MODEL_ID NEXT * | O(") CHARACTER
    BAN NEXT * | O(") CHARACTER
    MISDN NEXT * | O(") CHARACTER
    INSERTTIME SYSDATE
    SCORING_JOB_ID NEXT * | O(") CHARACTER
    SCORE_ENTITY_ID NEXT * | O(") CHARACTER
    MODEL_SCORE_DECIMAL NEXT * | O(") CHARACTER
    MODEL_SCORE_INTEGER NEXT * | O(") CHARACTER
    MODEL_SCORE_CHAR NEXT * | O(") CHARACTER
    ANCHOR_DT NEXT * | O(") CHARACTER
    RUN_DT NEXT * | O(") CHARACTER
    Record 1: Rejected - Error on table RTD_TMO_MODEL_SCORES_BI, column RUN_DT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 2: Rejected - Error on table RTD_TMO_MODEL_SCORES_BI, column RUN_DT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 3: Rejected - Error on table RTD_TMO_MODEL_SCORES_BI, column RUN_DT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 4: Rejected - Error on table RTD_TMO_MODEL_SCORES_BI, column RUN_DT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Table RTD_TMO_MODEL_SCORES_BI:
    0 Rows successfully loaded.
    4 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.

  • Using sqlldr when source data column is 4000 chars

    I'm trying to load some data using sqlldr.
    The table looks like this:
    col1 number(10) primary key
    col2 varchar2(100)
    col3 varchar2(4000)
    col4 varchar2(10)
    col5 varchar2(1)
    ... and some more columns ...
    For current purposes, I only need to load columns col1 through col3. The other columns will be NULL.
    The source text data looks like this (tab-delimited) ...
    col1-text<<<TAB>>>col2-text<<<TAB>>>col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    END-OF-RECORD
    There's nothing special about the source data for col1 and col2.
    But the data for col3 is (usually) much longer than 4000 chars, so I just need to truncate it to fit varchar2(4000), right?
    The control file looks like this ...
    LOAD DATA
    INFILE 'load.dat' "str 'END-OF-RECORD'"
    TRUNCATE
    INTO TABLE my_table
    FIELDS TERMINATED BY "\t"
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    col1 "trim(:col1)",
    col2 "trim(:col2)",
    col3 char(10000) "substr(:col3,1,4000)"
    I made the column 3 specification char(10000) to allow sqlldr to read text longer than 4000 chars.
    And the subsequent directive is meant to truncate it to 4000 chars (to fit in the table column).
    But I get this error ...
    Record 1: Rejected - Error on table COL3.
    ORA-01461: can bind a LONG value only for insert into a LONG column
    The only solution I found was ugly.
    I changed the control file to this ...
    col3 char(4000) "substr(:col3,1,4000)"
    And then I hand-edited (truncated) the source data for column 3 to be shorter than 4000 chars.
    Painful and tedious!
    Is there a way around this difficulty?
    Note: I cannot use a CLOB for col3. There's no option to change the app, so col3 must remain varchar2(4000).

    You can load the data into a staging table with a clob column, then insert into your target table using substr, as demonstated below. I have truncated the data display to save space.
    -- load.dat:
    1     col2-text     col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    XYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    END-OF-RECORD-- test.ctl:
    LOAD DATA
    INFILE 'load.dat' "str 'END-OF-RECORD'"
    TRUNCATE
    INTO TABLE staging
    FIELDS TERMINATED BY X'09'
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    col1 "trim(:col1)",
    col2 "trim(:col2)",
    col3 char(10000)
    SCOTT@orcl_11gR2> create table staging
      2    (col1 varchar2(10),
      3       col2 varchar2(100),
      4       col3 clob)
      5  /
    Table created.
    SCOTT@orcl_11gR2> host sqlldr scott/tiger control=test.ctl log=test.log
    SCOTT@orcl_11gR2> select * from staging
      2  /
    COL1
    COL2
    COL3
    1
    col2-text
    col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    XYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    1 row selected.
    SCOTT@orcl_11gR2> create table my_table
      2    (col1 varchar2(10) primary key,
      3       col2 varchar2(100),
      4       col3 varchar2(4000),
      5       col4 varchar2(10),
      6       col5 varchar2(1))
      7  /
    Table created.
    SCOTT@orcl_11gR2> insert into my_table (col1, col2, col3)
      2  select col1, col2, substr (col3, 1, 4000) from staging
      3  /
    1 row created.
    SCOTT@orcl_11gR2> select * from my_table
      2  /
    COL1
    COL2
    COL3
    COL4       C
    1
    col2-text
    col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    more-col3-text
    XYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    1 row selected.

  • Using sqlldr to load CLOB data from DB2

    I am stuck trying to resolve this problem. I am migrating data from DB2 to Oracle. I used DB2 export to extract the data specifying lobsinfile clause. This created all the CLOB data in one file. So a typical record has a column with a reference to the CLOB data. "OUTFILE.001.lob.0.2880/". where OUTFILE.001.lob is the name specified in the export command and 0 is the starting position in the file and 2880 is the length of the first CLOB.
    When I try to load this data using sqlldr I'm getting a file not found.
    The control file looks something like this:
    clob_1 FILLER char(100),
    "DETAILS" LOBFILE(clob_1) TERMINATED BY EOF,
    I'm using Oracle 11gR2 and DB2 9.7.5
    Your help is appreciated.

    OK..here are additional details. Some names have changed but the idea is the same. Also the sqlldr is executing in the same directory as the data files and the control file
    Primary data file is VOIPCACHE.dat Secondary datafile (file with lob data) is VOIPCACHE.001.lob
    Control Fileload data
    infile 'VOIPCACHE.dat'
    badfile 'VOIPCACHE.bad'
    discardfile 'VOIPCACHE.dsc'
    replace into table VOIPCACHE
    fields terminated by ',' optionally enclosed by '"' TRAILING NULLCOLS
    (KEY1 "rtrim(:KEY1)",
    FIELD8,
    clob_1 FILLER char (100),
    "DATA" LOBFILE(clob_1) TERMINATED BY EOF)
    Snippet from Log file
    IELD7 NEXT * , O(") CHARACTER
    FIELD8 NEXT * , O(") CHARACTER
    CLOB_1 NEXT 100 , O(") CHARACTER
    (FILLER FIELD)
    "DATA" DERIVED * EOF CHARACTER
    Dynamic LOBFILE. Filename in field CLOB_1
    SQL*Loader-502: unable to open data file 'VOIPCACHE.001.lob.0.0/' for field "DATA" table VOIPCACHE
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: No such file or directory
    SQL*Loader-502: unable to open data file 'VOIPCACHE.001.lob.0.47/' for field "DATA" table VOIPCACHE
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: No such file or directory
    SQL*Loader-502: unable to open data file 'VOIPCACHE.001.lob.47.47/' for field "DATA" table VOIPCACHE
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: No such file or directory
    SQL*Loader-502: unable to open data file 'VOIPCACHE.001.lob.94.58/' for field "DATA" table VOIPCACHE
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: No such file or directory
    SQL*Loader-502: unable to open data file 'VOIPCACHE.001.lob.152.58/' for field "DATA" table VOIPCACHE
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: No such file or directory
    SQL*Loader-502: unable to open data file 'VOIPCACHE.001.lob.210.206/' for field "DATA" table VOIPCACHE
    This is repeated for each record
    sqlldr command
    sqlldr userid=${SCHEMA}/${PASSWD}@$ORACLE_SID control=${CTLDIR}/${tbl}.ctl log=${LOGDIR}/${tbl}.log direct=true errors=50
    I dont think the variables are important here
    -EC

  • Sqlldr- ORA-00060: deadlock detected while waiting for resource

    Hi Team,
    My database version is 11.1.0.7.0. I am loading the data using sqlldr. I am getting the error ORA-00060: deadlock detected while waiting for resource. once dead lock detected ,whether data will be rejected after commit point reached(Rows=100000). FYI information only sqllder is running on the database,it is getting completed withing 5-10min. please help me whether any other lock happening on this due to sqllder.
    sqlldr userid=orcl/orcle control=".$controlfile." log=".$logfile.".log data=".$datafile." bad=".$badfile." discard=".$discardfile." Bindsize=19000000 Rows=100000 Readsize=20000000 Errors=1000000";
    Thanks in advance

    user9256814 wrote:
    Hi Team,
    My database version is 11.1.0.7.0. I am loading the data using sqlldr. I am getting the error ORA-00060: deadlock detected while waiting for resource. once dead lock detected ,whether data will be rejected after commit point reached(Rows=100000). FYI information only sqllder is running on the database,it is getting completed withing 5-10min. please help me whether any other lock happening on this due to sqllder.
    sqlldr userid=orcl/orcle control=".$controlfile." log=".$logfile.".log data=".$datafile." bad=".$badfile." discard=".$discardfile." Bindsize=19000000 Rows=100000 Readsize=20000000 Errors=1000000";
    Thanks in advanceadditional clues will exist within alert_SID.ora file & subsequent trace file.

  • Little problem with SQLLDR

    Hi,
    I've got great help here in the past so I thought this would be the right place to try and find the solution to my problem loading data using SQLLDR into an oracle database.
    Basically, upon loading I am using a to_date function. However, the parameters this to_date function must take depends on the data I'm trying to load (there are only two possible date formats I'm trying to load). Is there any way of using two to_date functions inside a conditional statement (if statement etc.).
    Thanks a lot in advance!!
    Dan

    Looking at what you posted, i think you may have some issues with the quoting.
    to_date(:DATE_FIELD,''DD-MM-YYYY'))"
    {code}
    You have a double quote before the DD there.
    Edited by: Tubby on Jun 14, 2010 10:10 AM
    I see someone else is quicker than me :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • NLS_LANG in case of Japanese data

    Hi,
    My DB NLS Charset is AMERICAN_AMERICA.AL32UTF8 and NLS_LENGTH_SEMANTICS is BYTE. I am working with Japanese Kanji, Kana Data. I am storing japanese data into VARCHAR2. I am using SQL*LOADER to load japanese data into Oracle Tables.
    When I upload data using SQLLDR with NLS_LANG=AMERICAN_AMERICA.AL32UTF8 then I am facing Data Too Large Exception. But When I upload data with NLS_LANG=AMERICAN_AMERICA.JA16SJIS then my data is uploaded successfully.
    Please tell me AMERICAN_AMERICA.JA16SJIS is perfect charset to upload data into oracle tables?
    If not then please tell me how to upload japanese data using AMERICAN_AMERICA.AL32UTF8 charset.
    My DB Table is given below:
    CREATE TABLE TEST_KANJI
    DATA_TEST1 VARCHAR2(5 CHAR),
    DATA_TEST2 VARCHAR2(5 CHAR)
    );

    Thanks orafad.
    Actually.. Our database is AL32UTF8 compatible. We are using SQL LOADER to upload japanese data into database. Our DB NLS_LENGTH_SEMANTICS is BYTE TYPE.
    Our NLS_LANG contains AMERICAN_AMERICA.AL32UTF8. Now we perform following operations:
    QL> CREATE TABLE TEST_SJIS_CHAR
    2 (
    3 data_1 VARCHAR2(3 CHAR),
    4 data_2 VARCHAR2(3 CHAR)
    5 );
    Table created.
    SQL> CREATE TABLE TEST_SJIS_BYTE
    2 (
    3 data_1 VARCHAR2(3 BYTE),
    4 data_2 VARCHAR2(3 BYTE)
    5 );
    Table created.
    SQL> INSERT INTO test_sjis_char VALUES('私金魚','私金魚');
    INSERT INTO test_sjis_char VALUES('私金魚','私金魚')
    ERROR at line 1:
    ORA-12899: value too large for column "ODIDEV"."TEST_SJIS_CHAR"."DATA_1"
    (actual: 4, maximum: 3)
    SQL> INSERT INTO test_sjis_byte VALUES('私金魚','私金魚');
    INSERT INTO test_sjis_byte VALUES('私金魚','私金魚')
    ERROR at line 1:
    ORA-12899: value too large for column "ODIDEV"."TEST_SJIS_BYTE"."DATA_1"
    (actual: 6, maximum: 3)
    SQL> INSERT INTO test_sjis_byte VALUES('金魚魚','魚金魚');
    INSERT INTO test_sjis_byte VALUES('金魚魚','魚金魚')
    ERROR at line 1:
    ORA-12899: value too large for column "ODIDEV"."TEST_SJIS_BYTE"."DATA_1"
    (actual: 6, maximum: 3)
    SQL> INSERT INTO test_sjis_char VALUES('金魚魚','魚金魚');
    INSERT INTO test_sjis_char VALUES('金魚魚','魚金魚')
    ERROR at line 1:
    ORA-12899: value too large for column "ODIDEV"."TEST_SJIS_CHAR"."DATA_1"
    (actual: 4, maximum: 3)
    Now we change our client NLS_LANG=AMERICAN_AMERICA.JA16SJIS. Now we perform following operations:
    SQL> CREATE TABLE TEST_SJIS_CHAR
    2 (
    3 data_1 VARCHAR2(3 CHAR),
    4 data_2 VARCHAR2(3 CHAR)
    5 );
    Table created.
    SQL> CREATE TABLE TEST_SJIS_BYTE
    2 (
    3 data_1 VARCHAR2(3 BYTE),
    4 data_2 VARCHAR2(3 BYTE)
    5 );
    Table created.
    SQL> INSERT INTO test_sjis_char VALUES('私金魚','私金魚');
    1 row created.
    SQL> INSERT INTO test_sjis_byte VALUES('私金魚','私金魚');
    INSERT INTO test_sjis_byte VALUES('私金魚','私金魚')
    ERROR at line 1:
    ORA-12899: value too large for column "ODIDEV"."TEST_SJIS_BYTE"."DATA_1"
    (actual: 9, maximum: 3)
    SQL> INSERT INTO test_sjis_byte VALUES('金魚魚','魚金魚');
    INSERT INTO test_sjis_byte VALUES('金魚魚','魚金魚')
    ERROR at line 1:
    ORA-12899: value too large for column "ODIDEV"."TEST_SJIS_BYTE"."DATA_1"
    (actual: 9, maximum: 3)
    SQL> INSERT INTO test_sjis_char VALUES('金魚魚','魚金魚');
    1 row created.
    SQL> SELECT length(data_1), length(data_2) FROM test_sjis_char;
    LENGTH(DATA_1) LENGTH(DATA_2)
    3 3
    3 3
    SQL> SELECT length(data_1), length(data_2) FROM test_sjis_byte;
    no rows selected
    SQL>
    SQL> SELECT lengthb(data_1), lengthb(data_2) FROM test_sjis_char;
    LENGTHB(DATA_1) LENGTHB(DATA_2)
    9 9
    9 9
    SQL> SELECT lengthb(data_1), lengthb(data_2) FROM test_sjis_byte;
    no rows selected
    SQL> SELECT data_1 || data_2 from test_sjis_char;
    DATA_1||DATA
    私金魚私金魚
    金魚魚魚金魚
    SQL> SELECT data_1 || data_2 from test_sjis_byte;
    no rows selected.
    Actually We want to take a final decission on charset. But we need strong reason to finalize it. Please help me out to solve this issue.

  • ORACLE 8I SQL*LOADER DATAFILE의 특정 FIELD DATA를 SKIP하고 LOADING하는 방법

    제품 : ORACLE SERVER
    작성날짜 : 2002-04-09
    ORACLE 8I SQL*LOADER DATAFILE의 특정 FIELD DATA를 SKIP하고 LOADING하는 방법
    ===========================================================================
    아래의 예제와 같이 가변 길이의 filed들이 ',', '|' 와 같은 구분자로
    구분이 되고 있는 경우 oracle 8i부터 제공되는 'FILLER'라고 하는 필드
    구분자를 사용하여 상태인식자로 표시하여 insert시 skip할 수 있다.
    <Example>
    TABLE : skiptab
    ===========================
         col1 varchar2(20)
         col2 varchar2(20)
         col3 varchar2(20)
    CONTROLFIEL : skip.ctl
    load data
    infile skip.dat
    into table skiptab
    fields terminated by ","
    (col1 char,
    col2 filler char,
    col3 char)
    DATAFILE : skip.dat
    SMITH, DALLAS, RESEARCH
    ALLEN, CHICAGO, SALES
    WARD, CHICAGO, SALES
    data loading :
    $sqlldr scott/tiger control=skip.ctl
    결과 :
    COL1 COL3
    SMITH RESEARCH
    ALLEN SALES
    WARD SALES

  • SQL * Loader with Spanish data!

    Hi All,
    I have a requirement to load Spanish data into a table. I am using SQL*Loader control file to load the data.
    Everything is fine, but the Spanish charecters are not inserting as they have to. It is inserting some junk charecters.
    How can I solve this issue?
    Thanks in advance.

    Hello,
    Are you using init.ora (pfile) or spfile? Anyway you can do this
    sqlplus "/as sysdba"
    sql> create pfile='/location_to_pfile/init.ora' from spfile;
    File Created
    Modify init.ora file and add parameter to support spanish characters
    sql>shutdown immediate;
    sql>startup pfile='/path_to_pfile/init.ora';  -- YOu should be able mount and open and successfully
    Test your data using sqlldr and if it is doing what you are expected it do then.
    sql>shutdown immediate;
    sql>create spfile from pfile='/path_to_pfile/init.ora';
    File Created
    sql>startup;
    sql>show parameter you_parameter_nameor you can try this to
    sqlplus "/as sysdba"
    sql> alter system set parameter_name=value scope=both sid='*';
    or
    sql>alter system set paramter_name=value sid='*';
    sql> show parameter parameter_name;
    Test your data using sqlldr Regards

  • Sqlldr through Java Stored Proc

    I am loading data from sqlldr through a java stored proc that executes command
    strings. My string executes in windows through the command window just fine and I can see the data but If I run the sqlldr through java then I must exit my session and relog in to see the data. Any help is appreciated.
    Thanks, Larry

    I am loading data from sqlldr through a java stored proc Any reason for using java stored proc, instead of directly running sqlldr or using EXTERNAL TABLES?

  • Sqlldr without tnsnames entry

    Hi,
    I am able to connect to the database using sqlplus as follows
    sqlplus user/passwd@''(description=(address_list=(address=(protocol=TCP)(host=machine)(port=1521)))(connect_data=(sid=dbsid)(server=DEDICATED)))'
    But I am not able to load data using sqlldr as follows
    sqlldr userid=user/passwd@''(description=(address_list=(address=(protocol=TCP)(host=machine)(port=1521)))(connect_data=(sid=dbsid)(server=DEDICATED)))' control=file1.ctl
    I got the following error messages
    LRM-00116: syntax error at 'address_list' following '('
    SQL*Loader: Release 9.2.0.1.0 - Production on Wed Nov 1 13:11:51 2006
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    SQL*Loader-100: Syntax error on command-line
    Could anyone help me?

    Is there any otherway without using the TNSNAMES entry to load the data? Actually I have a program which analizes some genomic sequences and during the process It will insert data into the database. The program takes the Oracle SID, database host, database user name, and user passwords as params and do the things. If there is no alternative, We need to change the interface such that it accepts an entry in tnsnames.ora file as parameter instead of SID, hostname, port etc.

Maybe you are looking for

  • Mac Mini Region-Free Drive?

    I was curious if anyone knew whether the Mac Mini's optical drive was region-free, as far as being able to play DVD's from other parts of the world? For instance, I live in the USA (Region 1). I'd like to purchase a couple of DVD's from Britain (Regi

  • BUG: microKONTROL encoders don't work

    microKONTROL with no zones, no modes starting from scratch the mK is in Native mode so its all sys ex coming in. command-L, move knob on screen, move knob on mK doesn't work. the knob on screen does not budge partial solution: In Controller Assignmen

  • Quicktime 7.5.5 and mail

    Since the upgrade to quicktime 7.5.5. When a message with a movie clip is received mail does not display or play anymore the movie neither quicklook, it just display the play progress of the movie (like if it was only a sound track). So now each time

  • Blending images on top of a chalkboard

    I want to shoot video of a chalkboard and later add images and text on it in FCP to make it appear like a digital chalkboard (not that such a thing actually exists). 1. What is the best way to add an image to the chalkboard in FCP on a different laye

  • Time capsule incremental backup hangs forever

    My new 3TB Time Capsule is hooked by Ethernet to my Mac Pro. It backed up everything for the first time (1.65 TB) but the incremental backups never get completed. The progress bar has been stuck at 'Backing up 0MB of 465MB' for a whole day. I'm think