SQL*Loader Error Field in data file exceeds maximum length", version 8.1.6

Hi All,
I am trying to load a data file into a database table using SQL loader. I
received the data in an data file but I saved it as a pipe delimited
file.
When I run the SQL Loader command no records are loaded - looking at the log
file I get the following error:
Rejected - Error on table FARESDATA, column FANOTESIN.
Then I tried with substr and doesnt seem to work for values greater than 4000 chars, it only works if the field value is below 4000 chars (say doing a substr for first 3000 chars).
see the code--------
LOAD DATA
INFILE 'p.dat'
APPEND INTO TABLE PROSPECTUS
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
Fanotesin char(4000) "substr(:fanotesin,1,4000)"
We get the error ORA-01461: can bind a LONG value only for insert into a LONG column when using substr for 4000 chars.
Please help!
Thanks,
Rajesh
null

I believe the problem here is that the ORACLE database regards anything > 4000chs as a CLOB (or LONG). 4000 is the maximum length of a varchar2 field in the database, although of course you can declare larger values in PL/SQL. (Since the incoming data is > 4000 chs it is regarded as a LONG and you cannot therefore use SUBSTR on it)
I think that you must either truncate your data before loading or load into a table with the offending field as a CLOB (or LONG)
and then use PL/SQL to recreate it in a table with a varchar2(4000) which is otherwise identical. (You can select from a LONG into a varchar2(32000) for example and then truncate before writing out to the new table).

Similar Messages

  • On load, getting error:  Field in data file exceeds maximum length

    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0    Production
    TNS for Solaris: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    I'm trying to load a table, small in size (110 rows, 6 columns).  One of the columns, called NOTES is erroring when I run the load.  It is saying that the column size exceeds max limit.  As you can see here, the table column is set to 4000 Bytes)
    CREATE TABLE NRIS.NRN_REPORT_NOTES
      NOTES_CN      VARCHAR2(40 BYTE)               DEFAULT sys_guid()            NOT NULL,
      REPORT_GROUP  VARCHAR2(100 BYTE)              NOT NULL,
      AREACODE      VARCHAR2(50 BYTE)               NOT NULL,
      ROUND         NUMBER(3)                       NOT NULL,
      NOTES         VARCHAR2(4000 BYTE),
      LAST_UPDATE   TIMESTAMP(6) WITH TIME ZONE     DEFAULT systimestamp          NOT NULL
    TABLESPACE USERS
    RESULT_CACHE (MODE DEFAULT)
    PCTUSED    0
    PCTFREE    10
    INITRANS   1
    MAXTRANS   255
    STORAGE    (
                INITIAL          80K
                NEXT             1M
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
                FLASH_CACHE      DEFAULT
                CELL_FLASH_CACHE DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    I did a little investigating, and it doesn't add up.
    when i run
    select max(lengthb(notes)) from NRIS.NRN_REPORT_NOTES
    I get a return of
    643
    That tells me that the largest size instance of that column is only 643 bytes.  But EVERY insert is failing.
    Here is the loader file header, and first couple of inserts:
    LOAD DATA
    INFILE *
    BADFILE './NRIS.NRN_REPORT_NOTES.BAD'
    DISCARDFILE './NRIS.NRN_REPORT_NOTES.DSC'
    APPEND INTO TABLE NRIS.NRN_REPORT_NOTES
    Fields terminated by ";" Optionally enclosed by '|'
      NOTES_CN,
      REPORT_GROUP,
      AREACODE,
      ROUND NULLIF (ROUND="NULL"),
      NOTES,
      LAST_UPDATE TIMESTAMP WITH TIME ZONE "MM/DD/YYYY HH24:MI:SS.FF9 TZR" NULLIF (LAST_UPDATE="NULL")
    BEGINDATA
    |E2ACF256F01F46A7E0440003BA0F14C2|;|DEMOGRAPHICS|;|A01003|;3;|Demographic results show that 46 percent of visits are made by females.  Among racial and ethnic minorities, the most commonly encountered are Native American (4%) and Hispanic / Latino (2%).  The age distribution shows that the Bitterroot has a relatively small proportion of children under age 16 (14%) in the visiting population.  People over the age of 60 account for about 22% of visits.   Most of the visitation is from the local area.  More than 85% of visits come from people who live within 50 miles.|;07/29/2013 16:09:27.000000000 -06:00
    |E2ACF256F02046A7E0440003BA0F14C2|;|VISIT DESCRIPTION|;|A01003|;3;|Most visits to the Bitterroot are fairly short.  Over half of the visits last less than 3 hours.  The median length of visit to overnight sites is about 43 hours, or about 2 days.  The average Wilderness visit lasts only about 6 hours, although more than half of those visits are shorter than 3 hours long.   Most visits come from people who are fairly frequent visitors.  Over thirty percent are made by people who visit between 40 and 100 times per year.  Another 8 percent of visits are from people who report visiting more than 100 times per year.|;07/29/2013 16:09:27.000000000 -06:00
    |E2ACF256F02146A7E0440003BA0F14C2|;|ACTIVITIES|;|A01003|;3;|The most frequently reported primary activity is hiking/walking (42%), followed by downhill skiing (12%), and hunting (8%).  Over half of the visits report participating in relaxing and viewing scenery.|;07/29/2013 16:09:27.000000000 -06:00
    Here is the full beginning of the loader log, ending after the first row return.  (They ALL say the same error)
    SQL*Loader: Release 10.2.0.4.0 - Production on Thu Aug 22 12:09:07 2013
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Control File:   NRIS.NRN_REPORT_NOTES.ctl
    Data File:      NRIS.NRN_REPORT_NOTES.ctl
      Bad File:     ./NRIS.NRN_REPORT_NOTES.BAD
      Discard File: ./NRIS.NRN_REPORT_NOTES.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 NRIS.NRN_REPORT_NOTES, loaded from every logical record.
    Insert option in effect for this table: APPEND
       Column Name                  Position   Len  Term Encl Datatype
    NOTES_CN                            FIRST     *   ;  O(|) CHARACTER
    REPORT_GROUP                         NEXT     *   ;  O(|) CHARACTER
    AREACODE                             NEXT     *   ;  O(|) CHARACTER
    ROUND                                NEXT     *   ;  O(|) CHARACTER
        NULL if ROUND = 0X4e554c4c(character 'NULL')
    NOTES                                NEXT     *   ;  O(|) CHARACTER
    LAST_UPDATE                          NEXT     *   ;  O(|) DATETIME MM/DD/YYYY HH24:MI:SS.FF9 TZR
        NULL if LAST_UPDATE = 0X4e554c4c(character 'NULL')
    Record 1: Rejected - Error on table NRIS.NRN_REPORT_NOTES, column NOTES.
    Field in data file exceeds maximum length...
    I am not seeing why this would be failing.

    HI,
    the problem is delimited data defaults to char(255)..... Very helpful I know.....
    what you need to two is tell sqlldr hat the data is longer than this.
    so change notes to notes char(4000) in you control file and it should work.
    cheers,
    harry

  • SQL Loader - Field in data file exceeds maximum length

    Dear All,
    I have a file which has more than 4000 characters in a field and I wish to load the data in a table with field length = 4000. but I receive error as
    Field in data file exceeds maximum lengthThe below given are the scripts and ctl file
    Table creation script:
    CREATE TABLE "TEST_TAB"
        "STR"  VARCHAR2(4000 BYTE),
        "STR2" VARCHAR2(4000 BYTE),
        "STR3" VARCHAR2(4000 BYTE)
      );Control file:
    LOAD DATA
    INFILE 'C:\table_export.txt'
    APPEND INTO TABLE TEST_TAB
    FIELDS TERMINATED BY '|'
    TRAILING NULLCOLS
    ( STR CHAR(4000) "SUBSTR(:STR,1,4000)" ,
    STR2 CHAR(4000) "SUBSTR(:STR2,1,4000)" ,
    STR3 CHAR(4000) "SUBSTR(:STR3,1,4000)"
    )Log:
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon Jul 26 16:06:25 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Control File:   C:\TEST_TAB.CTL
    Data File:      C:\table_export.txt
      Bad File:     C:\TEST_TAB.BAD
      Discard File:  none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 0
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    Table TEST_TAB, 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
    STR                                 FIRST  4000   |       CHARACTER           
        SQL string for column : "SUBSTR(:STR,1,4000)"
    STR2                                 NEXT  4000   |       CHARACTER           
        SQL string for column : "SUBSTR(:STR2,1,4000)"
    STR3                                 NEXT  4000   |       CHARACTER           
        SQL string for column : "SUBSTR(:STR3,1,4000)"
    value used for ROWS parameter changed from 64 to 21
    Record 1: Rejected - Error on table TEST_TAB, column STR.
    Field in data file exceeds maximum length
    MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
    Table TEST_TAB:
      0 Rows successfully loaded.
      1 Row not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    Space allocated for bind array:                 252126 bytes(21 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             1
    Total logical records rejected:         1
    Total logical records discarded:        0
    Run began on Mon Jul 26 16:06:25 2010
    Run ended on Mon Jul 26 16:06:25 2010
    Elapsed time was:     00:00:00.22
    CPU time was:         00:00:00.15Please suggest a way to get it done.
    Thanks for reading the post!
    *009*

    Hi Toni,
    Thanks for the reply.
    Do you mean this?
    CREATE TABLE "TEST"."TEST_TAB"
        "STR"  VARCHAR2(4001),
        "STR2" VARCHAR2(4001),
        "STR3" VARCHAR2(4001)
      );However this does not work as the error would be:
    Error at Command Line:8 Column:20
    Error report:
    SQL Error: ORA-00910: specified length too long for its datatype
    00910. 00000 -  "specified length too long for its datatype"
    *Cause:    for datatypes CHAR and RAW, the length specified was > 2000;
               otherwise, the length specified was > 4000.
    *Action:   use a shorter length or switch to a datatype permitting a
               longer length such as a VARCHAR2, LONG CHAR, or LONG RAW*009*
    Edited by: 009 on Jul 28, 2010 6:15 AM

  • SQL loader Field in data file exceeds maximum length for CLOB column

    Hi all
    I'm loading data from text file separated by TAB and i got the error below for some lines.
    Event the column is CLOB data type is there a limitation of the size of a CLOB data type.
    The error is:
    Record 74: Rejected - Error on table _TEMP, column DEST.
    Field in data file exceeds maximum length
    I'm using SQL Loader and the database is oracle 11g r2 on linux Red hat 5
    Here are the line causing the error fronm my data file and my table description for test:
    create table TEMP
    CODE VARCHAR2(100),
    DESC VARCHAR2(500),
    RATE     FLOAT,
    INCREASE VARCHAR2(20),
    COUNTRY VARCHAR2(500),
    DEST     CLOB,
    WEEK     VARCHAR2(10),
    IS_SAT VARCHAR2(50),
    IS_SUN VARCHAR2(50)
    CONTROL FILE:
    LOAD DATA
    INTO TABLE TEMP
    APPEND
    FIELDS TERMINATED BY X'9' TRAILING NULLCOLS
    CODE,
    DESC,
    RATE,
    INCREASE,
    COUNTRY),
    DEST,
    WEEK,
    IS_SAT,
    IS_SUN
    Data file:
    BHS Mobile     Bahamas - Mobile     0.1430          1     "242357, 242359, 242375, 242376, 242395, 242421, 242422, 242423, 242424, 242425, 242426, 242427, 242428, 242429, 242431, 242432, 242433, 242434, 242435, 242436, 242437, 242438, 242439, 242441, 242442, 242443, 242445, 242446, 242447, 242448, 242449, 242451, 242452, 242453, 242454, 242455, 242456, 242457, 242458, 242462, 242463, 242464, 242465, 242466, 242467, 242468, 24247, 242524, 242525, 242533, 242535, 242544, 242551, 242552, 242553, 242554, 242556, 242557, 242558, 242559, 242565, 242577, 242636, 242646, 242727"               
    BOL Mobile ENTEL     Bolivia - Mobile Entel     0.0865     Increase     591     "67, 68, 71, 72, 73, 740, 7410, 7411, 7412, 7413, 7414, 7415, 7420, 7421, 7422, 7423, 7424, 7425, 7430, 7431, 7432, 7433, 7434, 7435, 7436, 7437, 7440, 7441, 7442, 7443, 7444, 7445, 7450, 7451, 7452, 7453, 7454, 7455, 746, 7470, 7471, 7472, 7475, 7476, 7477, 7480, 7481, 7482, 7483, 7484, 7485, 7486, 7490, 7491, 7492, 7493, 7494, 7495, 7496"               Thank you.

    Hi
    Thank you for youe help, I found the solution and here what i do in my Control file i added
    char(40000) OPTIONALLY ENCLOSED BY '"' .
    LOAD DATA
    INTO TABLE TEMP
    APPEND
    FIELDS TERMINATED BY X'9' TRAILING NULLCOLS
    CODE,
    DESC,
    RATE,
    INCREASE,
    COUNTRY,
    DEST
    char(40000) OPTIONALLY ENCLOSED BY '"',
    WEEK,
    IS_SAT,
    IS_SUN
    Thank you for your help.

  • Loader- Field in data file exceeds maximum length

    Hi,
    I am getting error while loading the data: However data size of this columns is less thatn 4000 and i defined column as : OBJ_ADDN_INFO CLOB
    Please help
    ==================
    Record 1: Rejected - Error on table APPS.CG_COMPARATIVE_MATRIX_TAB, column OBJ_ADDN_INFO.
    Field in data file exceeds maximum length
    LOAD DATA
    infile *
    REPLACE
    INTO TABLE APPS.CG_COMPARATIVE_MATRIX_TAB
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
    ( APPS_VERSION,
    MODULE_SHORT_NAME,
    CATEGORY,
    MODULE,
    OBJECT_NAME,
    OBJECT_TYPE,
    OBJECT_STATUS,
    FUNCTION_NAME,
    OBJ_ADDN_INFO
    begindata
    "12",DBI,Oracle Daily Business Intelligence,DBI for Depot Repair,ISC_DEPOT_RO_INIT,PROGRAM,Changed,"Initial Load - Update Depot Repair Order Base Summary","The ISC_DR_REPAIR_ORDERS_F fact has a new column FLOW_SATUS_ID. The FLOW_STATUS_ID contains a user-defined Status for a Repair Order. The STATUS Column will continue to store the Status, now called State of the Repair Order i.e. O , C , D , H . The Initial Load incorporates the additional column FLOW_STATUS_ID. The Incremental Load s merge statement is modified to collect or update the additional column FLOW_STATUS_ID also. ","DBI for Depot Repair"
    "12",DBI,Oracle Daily Business Intelligence,DBI for Depot Repair,ISC_DEPOT_RO_INCR,PROGRAM,Changed,"Update Depot Repair Orders Base Summary","The ISC_DR_REPAIR_ORDERS_F fact has a new column FLOW_SATUS_ID. The FLOW_STATUS_ID contains a user-defined Status for a Repair Order. The STATUS Column will continue to store the Status, now called State of the Repair Order i.e. O , C , D , H . The Initial Load incorporates the additional column FLOW_STATUS_ID. The Incremental Load s merge statement is modified to collect or update the additional column FLOW_STATUS_ID also. ","DBI for Depot Repair"

    If you don't specify a data type for a data field in the SQL Loader control file, SQL Loader assumes the data type is CHAR(255). If you have data that is larger than that, then you can't rely on the default. Try changing the control file to
    LOAD DATA
    infile *
    REPLACE
    INTO TABLE APPS.CG_COMPARATIVE_MATRIX_TAB
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
    ( APPS_VERSION,
    MODULE_SHORT_NAME,
    CATEGORY,
    MODULE,
    OBJECT_NAME,
    OBJECT_TYPE,
    OBJECT_STATUS,
    FUNCTION_NAME,
    OBJ_ADDN_INFO char(4000)
    )

  • Field in data file exceeds maximum length - CTL file error

    Hi,
    I am loading data in new system using CTL file. But I am getting error as 'Field in data file exceeds maximum length' for few records, other records are processed successfully. I have checked the length of the error record in the extract file, it is less than the length in the target table, VARCHAR2 (2000 Byte). Below is the example of error data,
    Hi Rebecca~I have just spoken to our finance department and they have agreed that the ABCs payments made can be allocated to the overdue invoices, can you send any future invoices direct to me so that I can get them paid on time.~Hope this is ok ~Thanks~Terry~
    Is this error caused because of the special characters in the string?
    Below is the ctl file I am using,
    OPTIONS (SKIP=2)
    LOAD DATA
    CHARACTERSET WE8ISO8859P1
    INFILE  '$FILE'
    APPEND
    INTO TABLE "XXDM_DM_17_ONACCOUNT_REC_SRC"
    WHEN (1)!= 'FOOTER='
    FIELDS TERMINATED BY '|'
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS (
                                  <Column_name>,
                                  <Column_name>,
                                  COMMENTS,
                                  <Column_name>,
                                  <Column_name>
    Thanks in advance,
    Aditya

    Hi,
    I suspect this is because of the built in default length of character datatypes in sqldr - it defaults to char(255) taking no notice of what the actual table definition is.
    Try adding CHAR(2000), to your controlfile so you end up with something like this:
    OPTIONS (SKIP=2)
    LOAD DATA
    CHARACTERSET WE8ISO8859P1
    INFILE  '$FILE'
    APPEND
    INTO TABLE "XXDM_DM_17_ONACCOUNT_REC_SRC"
    WHEN (1)!= 'FOOTER='
    FIELDS TERMINATED BY '|'
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS (
                                  <Column_name>,
                                  <Column_name>,
                                  COMMENTS CHAR(2000),
                                  <Column_name>,
                                  <Column_name>
    Cheers,
    Harry

  • Field in data file exceeds maximum length

    Hi,
    I am trying to run the following SQL*Loader control job on my Oracle 11gR2 . Running the SQL*Loader control job results in the ‘Field in data file exceeds maximum length’ error message. Below, I am listing the control file.Please Suggest. Thanks
    It's giving me an error when I run SQL Loader on it,
    Record 61: Rejected - Error on table RMS_TABLE, column GEOM.SDO_POINT.X.
    Field in data file exceeds maximum length.
    Here is my SQL Loader Control file,
    LOAD DATA
    INFILE *
    TRUNCATE
    CONTINUEIF NEXT(1:1) = '#'
    INTO TABLE RMS_TABLE
    FIELDS TERMINATED BY '|'
    TRAILING NULLCOLS (
       Status NULLIF Status = BLANKS,
       Score,
       Match_type NULLIF Match_type = BLANKS,
       Match_addr NULLIF Match_addr = BLANKS,
       Side NULLIF Side = BLANKS,
       User_fld NULLIF User_fld = BLANKS,
       Addr_type NULLIF Addr_type = BLANKS,
       ARC_Street NULLIF ARC_Street = BLANKS,
       ARC_City NULLIF ARC_City = BLANKS,
       ARC_State NULLIF ARC_State = BLANKS,
       ARC_ZIP NULLIF ARC_ZIP = BLANKS,
       INCIDENT_N NULLIF INCIDENT_N = BLANKS,
       CDATE NULLIF CDATE = BLANKS,
       CTIME NULLIF CTIME = BLANKS,
       DISTRICT NULLIF DISTRICT = BLANKS,
    LOCATION
    NULLIF LOCATION = BLANKS,
       MAPLOCATIO
    NULLIF MAPLOCATIO = BLANKS,
       LOCATION_T
    NULLIF LOCATION_T = BLANKS,
       DAYCODE
    NULLIF DAYCODE = BLANKS,
       CAUSE
    NULLIF CAUSE = BLANKS,
       GEOM COLUMN OBJECT
         SDO_GTYPE       INTEGER EXTERNAL,
         SDO_POINT COLUMN OBJECT
           (X            FLOAT EXTERNAL,
            Y            FLOAT EXTERNAL)
    CREATE TABLE RMS_TABLE (
      Status VARCHAR2(1),
      Score NUMBER,
      Match_type VARCHAR2(2),
      Match_addr VARCHAR2(120),
      Side VARCHAR2(1),
      User_fld VARCHAR2(120),
      Addr_type VARCHAR2(20),
      ARC_Street VARCHAR2(100),
      ARC_City VARCHAR2(40),
      ARC_State VARCHAR2(20),
      ARC_ZIP VARCHAR2(10),
      INCIDENT_N VARCHAR2(9),
      CDATE VARCHAR2(10),
      CTIME VARCHAR2(8),
      DISTRICT VARCHAR2(4),
      LOCATION VARCHAR2(128),
      MAPLOCATIO VARCHAR2(100),
      LOCATION_T VARCHAR2(42),
      DAYCODE VARCHAR2(1),
      CAUSE VARCHAR2(17),
      GEOM MDSYS.SDO_GEOMETRY);

    Hi,
    Looks like you have a problem with record 61 in your data file. Can you please post it in reply.
    Regards
    Ivan

  • SDO_ORDINATES.X.Field in data file exceeds maximum length

    Hi All,
    While loading data in .SHP file into oracle spatial through SHP2SDO tool following error message appears:
    Error message:
    Record 54284: Rejected - Error on table GEO_PARCEL_CENTROID, column CENTROID_GEOM.SDO_ORDINATES.X.
    Field in data file exceeds maximum length.
    I read some where this is due to the SQL * Loader takes default column value to 255 characters. But there is confusion to me how to change the column size in control file because it is object data type. I am not sure this is correct or not.
    The control file show as below:
    LOAD DATA
    INFILE geo_parcel_centroid.dat
    TRUNCATE
    CONTINUEIF NEXT(1:1) = '#'
    INTO TABLE GEO_PARCEL_CENTROID
    FIELDS TERMINATED BY '|'
    TRAILING NULLCOLS (
    CENTROID_ID INTEGER EXTERNAL,
    APN_NUMBER      NULLIF APN_NUMBER = BLANKS,
    PROPERTY_A      NULLIF PROPERTY_A = BLANKS,
    PROPERTY_C      NULLIF PROPERTY_C = BLANKS,
    OWNER_NAME      NULLIF OWNER_NAME = BLANKS,
    THOMAS_GRI      NULLIF THOMAS_GRI = BLANKS,
    MAIL_ADDRE      NULLIF MAIL_ADDRE = BLANKS,
    MAIL_CITY_      NULLIF MAIL_CITY_ = BLANKS,
    MSLINK,
    MAPID,
    GMRotation,
    CENTROID_GEOM COLUMN OBJECT
    SDO_GTYPE INTEGER EXTERNAL,
    SDO_ELEM_INFO VARRAY TERMINATED BY '|/'
    (X FLOAT EXTERNAL),
    SDO_ORDINATES VARRAY TERMINATED BY '|/'
    (X FLOAT EXTERNAL)
    Any help on this would appreciate.
    Thanks,
    [email protected]

    Hi,
    Looks like you have a problem with record 61 in your data file. Can you please post it in reply.
    Regards
    Ivan

  • Sql loader error in offline data load

    Hi,
    I have done an offline schema creation using existing tablespace.
    I am trying to do an offline data load using sql loader.The CTL and DAT file are generated by the work bench.
    This is my CTL file code generated by workbench.
    load data
    infile 'Import.dat' "str '<EORD>'"
    into table IMPORT
    fields terminated by '<EOFD>'
    trailing nullcols
    When I am running the ctl file with DAT file in sql loader I am getting the following error
    SQL*Loader-350: Syntax error at line 4.
    Expecting single char, found "<EOFD>".
    fields terminated by '<EOFD>'
    ^
    My Sql Loader version is Release 8.0.6.3.0
    Please help if anyone has came across this issue.
    Thanks in advance.
    Regards
    Saravanan.B

    Saravanan,
    Its a long time since I have seen 8 sql loader. Check the doc. Is it resrticted to a single character delimter??
    Barry

  • About error ORA-01208: data file is an old version - not accessing current

    Hi friends,
    After getting an error ,what i have stated below, my database instance was crashed everytime. I have seen alert.log file nothing is there and this error never come in pattern maner it will come anytime during week.
    I have check with my application client they were doing nothing during this time even they have sent me their log i found no writing process was running and no jobs were running during this time.
    My oracle version is 10.2.0.3 and os version is W2k.
    Thanks in advance.
    PM
    Thu Oct 04 21:45:37 2007
    Errors in file d:\oracle\admin\prd347\bdump\prd347_ckpt_1296.trc:
    ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode
    ORA-01122: database file 7 failed verification check
    ORA-01110: data file 7: 'E:\ORADATA\PRD347\CCDM_DATA_SMALL_T01_01.DBF'
    ORA-01208: data file is an old version - not accessing current version
    Thu Oct 04 21:45:37 2007
    Errors in file d:\oracle\admin\prd347\bdump\prd347_ckpt_1296.trc:
    ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode
    ORA-01122: database file 7 failed verification check
    ORA-01110: data file 7: 'E:\ORADATA\PRD347\CCDM_DATA_SMALL_T01_01.DBF'
    ORA-01208: data file is an old version - not accessing current version
    _________________________________________________________________

    Hi,
    I am attaching this CKPT Trace file which might helpful to you all.
    V10 STYLE FILE HEADER:
    Compatibility Vsn = 169869312=0xa200000
    Db ID=2446524247=0x91d2ff57, Db Name='PRD347'
    Activation ID=0=0x0
    Control Seq=654516=0x9fcb4, File size=491520=0x78000
    File Number=7, Blksiz=16384, File Type=3 DATA
    Tablespace #7 - CCDM_DATA_SMALL_T01 rel_fn:7
    Creation at scn: 0x0781.e33c8c09 12/13/2004 15:16:45
    Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread:0
    reset logs count:0x201c7917 scn: 0x0000.00000001 reset logs terminal rcv data:0x0 scn: 0x0000.00000000
    prev reset logs count:0x0 scn: 0x0000.00000000 prev reset logs terminal rcv data:0x0 scn: 0x0000.00000000
    recovered at 09/25/2007 12:17:31
    status:0x4 root dba:0x00000000 chkpt cnt: 211627 ctl cnt:211626
    begin-hot-backup file size: 0
    Checkpointed at scn: 0x079b.81db9e4f 10/04/2007 21:45:15
    thread:1 rba:(0x33cee.2.10)
    enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000
    Backup Checkpointed at scn: 0x0000.00000000
    thread:0 rba:(0x0.0.0)
    enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000
    External cache id: 0x0 0x0 0x0 0x0
    Absolute fuzzy scn: 0x0000.00000000
    Recovery fuzzy scn: 0x0000.00000000 01/01/1988 00:00:00
    Terminal Recovery Stamp 01/01/1988 00:00:00
    Platform Information: Creation Platform ID: 7
    Current Platform ID: 7 Last Platform ID: 7
    DATA FILE #7:
    (name #18) E:\ORADATA\PRD347\CCDM_DATA_SMALL_T01_01.DBF
    creation size=0 block size=16384 status=0xe head=18 tail=18 dup=1
    tablespace 7, index=7 krfil=7 prev_file=0
    unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
    Checkpoint cnt:211628 scn: 0x079b.81dba014 10/04/2007 21:45:20
    Stop scn: 0xffff.ffffffff 10/03/2007 02:00:10
    Creation Checkpointed at scn: 0x0781.e33c8c09 12/13/2004 15:16:45
    thread:0 rba:(0x0.0.0)
    enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000
    Offline scn: 0x0000.00000000 prev_range: 0
    Online Checkpointed at scn: 0x0000.00000000
    thread:0 rba:(0x0.0.0)
    enabled threads: 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000
    Hot Backup end marker scn: 0x0000.00000000
    aux_file is NOT DEFINED
    ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode
    ORA-01122: database file 7 failed verification check
    ORA-01110: data file 7: 'E:\ORADATA\PRD347\CCDM_DATA_SMALL_T01_01.DBF'
    ORA-01208: data file is an old version - not accessing current version
    error 1242 detected in background process
    ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode
    ORA-01122: database file 7 failed verification check
    ORA-01110: data file 7: 'E:\ORADATA\PRD347\CCDM_DATA_SMALL_T01_01.DBF'
    ORA-01208: data file is an old versio n - not accessing current version
    ------------------------------------------------------------------------------------------------

  • XML data value exceeds maximum length - ORA-30951

    Hello,
    I am receiving ORA-30951: Element or attribute at Xpath /dataroot/Respondent[1]/Response[3]/Value exceeds maximum length error during the XML load.
    I have registered the schema and it works fine when the Value is less than 64k but fails if its greater. I tried changing the type of Value to type="xsd:base64Binary" xdb:maintainDOM="false" xdb:SQLName="LOB_DATA" xdb:SQLType="BLOB" but then I get ORA-00932: inconsistent datatypes error.
    Can someone please let me know what I am doing wrong or is there a way I can load more than 64k length elements on 10g?
    Thanks
    Here is my schema.
    var SCHEMAURL varchar2(256)
    var XMLSCHEMA CLOB
    set define off
    begin
    :SCHEMAURL := 'http://xmlns.example.com/Svy_Resp.xsd';
    :XMLSCHEMA := '<?xml version="1.0"; encoding="utf-16"?>
    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" version="1.0"; xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
    <xsd:element name="dataroot" xdb:defaultTable="SVY_RESP_XML_SCHEMA" type="datarootType" />
    <xsd:complexType name="datarootType" xdb:maintainDOM="false"
    xdb:SQLType="Dataroot_T">
    <xsd:sequence>
    <xsd:element maxOccurs="unbounded" name="Respondent" type="RespondentType" />
    </xsd:sequence>
    <xsd:attribute name="generated" type="xsd:dateTime" />
    </xsd:complexType>
    <xsd:complexType name="RespondentType" xdb:maintainDOM="false" xdb:SQLType="Respondent_Type">
    <xsd:sequence>
    <xsd:element name="RespondentID" type="xsd:int" />
    <xsd:element name="KsID" type="xsd:int" />
    <xsd:element name="email" type="xsd:string" />
    <xsd:element name="SyID" type="xsd:int" />
    <xsd:element name="KSuID" type="xsd:int" />
    <xsd:element name="Completed" type="xsd:int" />
    <xsd:element name="SubmitDateTime" type="xsd:dateTime" />
    <xsd:element maxOccurs="unbounded" name="Response" type="ResponseType" />
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="ResponseType" xdb:maintainDOM="false" xdb:SQLType="Response_Type">
    <xsd:sequence>
    <xsd:element name="ResponseID" type="xsd:int" />
    <xsd:element name="RespondentID" type="xsd:int" />
    <xsd:element name="CID" type="xsd:int" />
    <xsd:element name="AID" type="xsd:int" />
    <xsd:element name="Value" type="xsd:string"/>
    <xsd:element name="QID" type="xsd:int" />
    <xsd:element name="SID" type="xsd:int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>';
    end;
    /

    Thanks for the quick response. I am not able to modify the source file, but will it be possible to set the value to NULL if it exceeds the max length instead of failure?
    Thanks

  • Load data with SQL Loader link field between CSV file and Control File

    Hi all,
    in a SQL Loader control file, how do you specify link with field in CSV file and Control file?
    E.g. if I wat to import the record in table TEST (col1, col2, col3) with data in csv file BUT in different position. How to do this?
    FILE CSV (with variable position):
    test1;prova;pippo;Ferrari;
    xx;yy;hello;by;
    In the table TEST i want that col1 = 'prova' (xx),
    col2 = 'Ferrari' (yy)
    col3 = default N
    the others data in CSV file are ignored.
    so:
    load data
    infile 'TEST.CSV'
    into table TEST
    fields terminated by ';'
    col1 ?????,
    col2 ?????,
    col3 CONSTANT "N"
    Thanks,
    Attilio

    With '?' mark i mean " How i can link this COL1 with column in csv file ? "
    Attilio

  • SQL Loader Error : ORA-01830: date format picture ends before converting en

    I am inserting following data
    BES101706     M.E. Deals     7     10/17/2006
    through control file :
    LOAD DATA
    APPEND
    INTO TABLE abc_temp
    FIELDS TERMINATED BY ' '
    TRAILING NULLCOLS
    (BATCH_NAME               ,
    SUPPLIER_NAME          ,
    SUPPLIER_NBR          ,
    INV_DATE "to_date(substr(:INV_DATE,1,10),'MM/DD/YYYY' )"
    But I am getting this error:
    ORA-01830: date format picture ends before converting entire input string
    inv_data is a date field in the database.

    I think it has to do with data format.Exactly.
    You have
    BES101706*M.E.*Deals*7*10/17/2006
    I replace each space with an asterisk. You have 5 columns according to your spec (terminated by '<space>')
    SQL Loader doesn't know that M.E. Deals is the supplier name.
    It's trying to convert 7 as the date.

  • SQL Loader - data exceeds maximum length

    I am having an issue with SQL Loader falsely reporting that a column is too long in a CSV upload file. The offending column, Notes, is defined in the staging table as VARCHAR2(1000). The text in the Notes column in the upload file for the record that is being rejected is only 237 characters long. I examined the raw data file with a hex editor and there are no special cahracters embedded in the column. The CSV upload was recreated but the false error remains.
    Any ideas what to check? Any suggestion appreciated.
    Here are the pertinent files.
    Control File:LOAD DATA
       INFILE 'Mfield_Upl.dat'
       BADFILE 'Mfield_Upl.bad'
       TRUNCATE
       INTO TABLE Mfield_UPL_Staging
       FIELDS TERMINATED BY ',' optionally enclosed by '"'
         ControlNo CHAR,
         PatientID CHAR,
         CollectDate DATE "MM/DD/YYYY",
         TestDate DATE "MM/DD/YYYY",
         AnalyteDesc CHAR,
         Results CHAR,
         HiLoFlag CHAR,
         LoRange CHAR,
         HiRange CHAR,
         UnitOfMeas CHAR,
         Comments CHAR,
         Notes CHAR,
         ClinicalEvent CHAR,
         OwnerLName CHAR,
         OwnerFName CHAR,
         PetName CHAR,
         AssecNo CHAR,
         SpecimenID CHAR
    {code}
    Staging Table:{code}
    CREATE TABLE Mfield_UPL_Staging
        ControlNo      VARCHAR2(20),
        PatientID      VARCHAR2(9),
        CollectDate    DATE,
        TestDate       DATE,
        AnalyteDesc    VARCHAR2(100),
        Results        VARCHAR2(100),
        HiLoFlag       CHAR(10),
        LoRange        VARCHAR2(15),
        HIRange        VARCHAR2(15),
        UnitOfMeas     VARCHAR2(25),
        Comments       VARCHAR2(100),
        Notes          VARCHAR2(1000),
        ClinicalEvent  VARCHAR2(20),
        OwnerLName     VARCHAR(50),
        OwnerFName     VARCHAR(50),
        PetName        VARCHAR(50),
        AssecNo        NUMBER(10),
        SpecimenID     NUMBER(10)
    {Code}
    Error Log File:{code}
    SQL*Loader: Release 9.2.0.1.0 - Production on Wed Aug 11 08:22:58 2010
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Control File:   Mfield_UPL_CSV.ctl
    Data File:      Mfield_UPL.dat
      Bad File:     Mfield_Upl.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 MFIELD_UPL_STAGING, loaded from every logical record.
    Insert option in effect for this table: TRUNCATE
       Column Name                  Position   Len  Term Encl Datatype
    CONTROLNO                           FIRST     *   ,  O(") CHARACTER           
    PATIENTID                            NEXT     *   ,  O(") CHARACTER           
    COLLECTDATE                          NEXT     *   ,  O(") DATE MM/DD/YYYY     
    TESTDATE                             NEXT     *   ,  O(") DATE MM/DD/YYYY     
    ANALYTEDESC                          NEXT     *   ,  O(") CHARACTER           
    RESULTS                              NEXT     *   ,  O(") CHARACTER           
    HILOFLAG                             NEXT     *   ,  O(") CHARACTER           
    LORANGE                              NEXT     *   ,  O(") CHARACTER           
    HIRANGE                              NEXT     *   ,  O(") CHARACTER           
    UNITOFMEAS                           NEXT     *   ,  O(") CHARACTER           
    COMMENTS                             NEXT     *   ,  O(") CHARACTER           
    NOTES                                NEXT     *   ,  O(") CHARACTER           
    CLINICALEVENT                        NEXT     *   ,  O(") CHARACTER           
    OWNERLNAME                           NEXT     *   ,  O(") CHARACTER           
    OWNERFNAME                           NEXT     *   ,  O(") CHARACTER           
    PETNAME                              NEXT     *   ,  O(") CHARACTER           
    ASSECNO                              NEXT     *   ,  O(") CHARACTER           
    SPECIMENID                           NEXT     *   ,  O(") CHARACTER           
    Record 1042: Rejected - Error on table MFIELD_UPL_STAGING, column NOTES.
    Field in data file exceeds maximum length
    Table MFIELD_UPL_STAGING:
      3777 Rows successfully loaded.
      1 Row not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Try:
    -- Etc ...
      Notes CHAR(1000),
    -- Etc ...SQL*Loader limits string buffer to 256 unless specified different.
    :p

  • 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

Maybe you are looking for

  • Prevent ftp sender adapter from tranfering files from subdirectories

    I have a scenario with a ftp sender adapter. In the configuration of the ftp sender adapter I have defined a base directory "/dir" and a file pattern "*". The directory /dir as a subdirectory /dir/subdir. Now the ftp adapter transfers also files from

  • How to check the files ...that are present in an oracle directory

    hi all is there any data dictionary view or table that will list all the files that exist a oracle directory? regards raj we can see all the directories using dba_directories i would like to see what all files it contains regards raj

  • SIGSEGV because of SEGV_MAPERR?

    Hello, I'd like to ask if it's possible to find out the reason of a SIGSEGV (i.e. if it's a SEGV_MAPERR or not) by the core dump of an application. More specifically: - I have the core dump of the application. - I have the binary file of the applicat

  • TIFF File Size

    Sometimes when I save a JPEG as a TIFF, it creates a file that shows a file size of say 3MB, but sometimes a JPEG of similar dimensions and resolution will come out as a TIFF that is in the range of 20-30MB. What might be making that difference in th

  • How to set condition scale according to accumulated consignment quantity?

    Hello, We have different consignment prices for the same material vendor depending on the quantity. For example: First 100 pcs         -->1.5$/pc Following 100 pcs -->1.4$/pc Following 100 pcs --> 1.3$/pc So, I want to set different condition scale f