Sql loader - record delimiter

Hi
I am using sql loader to load data in a table, the field terminator is '|' , there are multi line datas for one field, i want to specify the record delimiter.
it considers new line as one record.
how to specify the record delimiter
Thanks in advance
S Sathish Kumar

LOAD DATA
INFILE 'C:\FLATFILE\MAPPING.DAT'
DISCARDFILE 'C:\FLATFILE\MAPPING.DSC'
APPEND INTO TABLE ETL_MAPPING_METADATA
RECORDS DELIMITED BY '#^'
FIELDS TERMINATED BY '|'
Hi i have tried the above code, but it is not working, also i replaced 'records delimited' by 'records terminated'

Similar Messages

  • Sql Loader record delimiter (SPECIAL CASE)

    I have a special case where I want to use <EOR>\n as record delimiter, but OWB won't load any data with that. If I only use <EOR> it does load data but throws warning (1 Row not loaded because all fields were null), TRAILING NULLCOLS option is enabled. I appreciate the help.

    Hi David,
    First of all, I appreciate your reply. I did do what you recommended (OMBALTER FLAT_FILE 'ABCD' SET PROPERTIES (RECORD_DELIMITER) VALUES ('<EOR>\n'). I didn't open the FF, but I did sync the FF and deployed the mapping unfortunately it didn't work "File processing option string: "STR X'3C454F523E5C6E'" (basically HEX values)
    Any more suggestions?
    The reason I want to use this record delimiter is:
    LINE1 = AB|CD|EF|GH|IJKL<EOR>$ note:($ is \n)(set list)
    LINE2 = AB|CD|EF|GH|IJKL$
    MNOPQRSTUVWX$
    YZ<EOR>$
    For the time being I fixed the problem by putting all columns(ROW EACH) in a single row and just use '\n' as RD, but I would like to do it by using ('<EOR>\n') as RD as well.
    I appreciate the help.

  • Sql loader - record separator

    I need to use sql loader to load records into my database.
    The field delimiter is ^X^P
    The record delimiter is ^B^A\n
    The datafile looks like this :
    MARK^X^PHATCHER^X^PACCOUNTS^B^A\nSCOTT^X^PMILLER^X^PMARKETING^B^A\nJOSEPH^X^P^X^PFINANCE^B^A\nLIN^X^PJOHNSON^X^PIT^B^A\n
    How do I specify the record delimiter (which is ^B^A\n ) in my control file ?
    Thanks

    I need to load this type of file:
    The field delimiter is caracter ", but inside the field there is some " caracter.
    For example:
    File test01.txt:
    "field1","field2","field3", "field4"
    "fied1", "field2 by "home" paul","field3", "field4"
    "field1","field2","field3", "field4"
    How can load the second record?
    Thanks!!

  • SQL*Loader- Records Rejected - Error on table ORA-01722: invalid number

    Getting the following errors :
    Please tell me where I am going wrong?
    Attached is the log file and snippets of datafile along with the control file !!
    Also please direct me how can i upload 4900 records at one go?
    SQL*Loader: Release 11.1.0.7.0 - Production on Fri Oct 14 03:06:06 2011
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Control File: sample.ctl
    Data File: Cities.csv
    Bad File: Cities.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 CITY, loaded from every logical record.
    Insert option in effect for this table: INSERT
    Column Name Position Len Term Encl Datatype
    ID FIRST * , CHARACTER
    NAME NEXT 35 , ' CHARACTER
    COUNTRYCODE NEXT 3 , ' CHARACTER
    POPULATION NEXT * WHT CHARACTER
    Record 1: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 2: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 3: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 4: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 5: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 6: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 7: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 8: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 9: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 10: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 11: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 12: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 13: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 14: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 15: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 16: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 17: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 18: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 19: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 20: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 21: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 22: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 23: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 24: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 25: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 26: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 27: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 28: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 29: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 30: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 31: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 32: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 33: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 34: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 35: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 36: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 37: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 38: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 39: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 40: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 41: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 42: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 43: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 44: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 45: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 46: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 47: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 48: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 49: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 50: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    Record 51: Rejected - Error on table CITY, column POPULATION.
    ORA-01722: invalid number
    MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
    Table CITY:
    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: 35840 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 Oct 14 03:06:06 2011
    Run ended on Fri Oct 14 03:06:12 2011
    Elapsed time was: 00:00:06.18
    CPU time was: 00:00:00.03
    my control file (sample.ctl):
    load data infile 'Cities.csv'
    into table city
    fields terminated by ','
    (id integer external,
    name char(35) enclosed by "'",
    countrycode char(3) enclosed by "'",
    population integer external terminated by '\n'
    my datafile (Cities.csv) (it contains 4900 records, but I am showing here just 4 records for ease)
    3830,'Virginia Beach','USA',425257
    3831,'Atlanta','USA',416474
    3832,'Sacramento','USA',407018
    3833,'Oakland','USA',399484
    Thanks in advance!!

    Look that when I change a little bit your datafile as follows
    1,'Kabul','AFG',1780000
    2,'Qandahar','AFG','237500'
    3,'Herat','AFG','186800'  I got the same error (2 last rows rejected for the same error invalid number)
    mhouri > select * from cities;
            ID NAME                                COU POPULATION
             1 Kabul                               AFG    1780000
    SQL*Loader: Release 10.2.0.3.0 - Production on Fri Oct 14 10:38:06 2011
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Control File:   cities.ctl
    Data File:      cities.dat
      Bad File:     cities.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 CITIES, loaded from every logical record.
    Insert option in effect for this table: INSERT
       Column Name                  Position   Len  Term Encl Datatype
    ID                                  FIRST     *   ,       CHARACTER           
    NAME                                 NEXT    35   ,    '  CHARACTER           
    COUNTRYCODE                          NEXT     3   ,    '  CHARACTER           
    POPULATION                           NEXT     *  WHT      CHARACTER           
    Record 4: Rejected - Error on table CITIES, column ID.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 2: Rejected - Error on table CITIES, column POPULATION.
    ORA-01722: invalid number
    Record 3: Rejected - Error on table CITIES, column POPULATION.
    ORA-01722: invalid number
    Table CITIES:
      1 Row successfully loaded.
      3 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:                  35840 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             4
    Total logical records rejected:         3
    Total logical records discarded:        0
    Run began on Fri Oct 14 10:38:06 2011
    Run ended on Fri Oct 14 10:38:06 2011
    Elapsed time was:     00:00:00.23
    CPU time was:         00:00:00.09Population value within the data file should be a number
    Best regards
    Mohamed Houri

  • SQL Loader, CLOB, delimited fields

    Hello.
    I have to load using SQL Loader data from csv file into table, which one field is CLOB type.
    Here is how ctl file initially looked like:
    UNRECOVERABLE
    LOAD DATA
    INFILE '.\csv_files\TSH_DGRA.csv'
    BADFILE '.\bad_files\TSH_DGRA.bad'
    DISCARDFILE '.\dsc_files\TSH_DGRA.dsc'
    APPEND
    INTO TABLE TSH_DGRA
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    ID_OBJ_TSHD,
    PR_ZOOM_TSHD,
    PR_GRID_TSHD,
    PR_ELMGR_TSHD CHAR(4000) OPTIONALLY ENCLOSED BY '<clob>' AND '</clob>',
    PR_ALRMGR_TSHD CHAR(4000) OPTIONALLY ENCLOSED BY '<clob>' AND '</clob>'
    Problems are fields PR_ELMGR_TSHD and PR_ALRMGR_TSHD (CLOBs in table TSH_DGRA). Until data which should be loaded into CLOB fields are under 4000 characters long, it works fine, but what should I do if I want to load data which are longer than 4000 characters?
    If found on Link:[http://download.oracle.com/docs/cd/B14117_01/server.101/b10825/ldr_loading.htm#i1006803] which one sentence said that:
    "SQL*Loader defaults to 255 bytes when moving CLOB data, but a value of up to 2 gigabytes can be specified. For a delimited field, if a length is specified, that length is used as a maximum. If no maximum is specified, it defaults to 255 bytes. For a CHAR field that is delimited and is also greater than 255 bytes, you must specify a maximum length. See CHAR for more information about the CHAR datatype."
    So, my question is, how to specify "up to 2gb" as text said? I can not use CHAR datatype because it is limited to 4000 characters. And I have to load about 60000 characters. I also can not use technique where all data for every CLOB field are in separate files.

    Just specify the maximum expected size:
    PR_ELMGR_TSHD CHAR(100000) OPTIONALLY ENCLOSED BY '<clob>' AND '</clob>',
    PR_ALRMGR_TSHD CHAR(1000000) OPTIONALLY ENCLOSED BY '<clob>' AND '</clob>'
    The CHAR(1000000) will allow SQLLDR to handle up to 1000000 bytes of input text.

  • SQL*Loader records won't delete

    I am mystified. A P/A is developing a conversion of legacy data into a new archive db. He runs data in using SQL*loader into our 7.3.4 database, but when we try to delete one of those records, it rolls back even though our explicit commit returns with 'commit completed'.
    Our test is to load record 'a', select 'a': 1 records found, delete 'a':one record deleted, select 'a': 0 records found, commit:commit completed, select 'a':1 records found.
    Non-loaded records delete fine.
    Is something corrupted in rowid, or other metadata? DOES ANYONE HAVE AN IDEA?

    check if the change date is outside your entered date range

  • SQL* Loader record length problem

    HI, I'm trying to load a log file into a table for processing. I want to load each line as a single record into a table of one field VARCHAR2(2000). However it only loads the first character of each line and then fails after 12 records. What am I doing wrong?
    Below is my control file.
    LOAD DATA
    INFILE 'proxyLog.20060627'
    BADFILE 'badproxy.dat'
    DISCARDFILE 'disproxy.dat'
    TRUNCATE
    INTO TABLE STAGE_PROXY_LOG
    TRAILING NULLCOLS
    error_text
    )

    Here's some of the data: and error log
    [27 Jun 2006, 00:17] Processing Customers .....
    Customer 2649513 [Record 202732] processed.
    [27 Jun 2006, 00:32] Processing Customers .....
    Customer 2649516 [Record 202733] processed.
    [27 Jun 2006, 00:47] Processing Customers .....
    Error creating customer profile
    ExitStateMsg:
    ExitStateType: 3
    ExportWkErrorStatusCode: 7
    ExportWkErrorStatusMessageTextToInsert: City name
    F
    ProxyCallException
         at CustomerEnrollProcess.<init>(CustomerEnrollProcess.java:229)
         at ProcessCustomers.main(ProcessCustomers.java:156)
    ERROR LOG -----
    Control File: cm.ctl
    Data File: proxyLog.20060627
    Bad File: badproxy.dat
    Discard File: disproxy.dat
    (Allow 0 discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 10000
    Bind array: 64 rows, maximum of 65536 bytes
    Continuation: none specified
    Path used: Conventional
    Table STAGE_PROXY_LOG, loaded from every logical record.
    Insert option in effect for this table: TRUNCATE
    Column Name Position Len Term Encl Datatype
    ERROR_TEXT FIRST 1 CHARACTER
    Record 13: Discarded - all columns null.
    Discard limit reached - processing terminated on data file proxyLog.20060627.
    Table STAGE_PROXY_LOG:
    12 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    1 Row not loaded because all fields were null.
    Space allocated for bind array: 256 bytes(64 rows)
    Space allocated for memory besides bind array: 0 bytes
    Total logical records skipped: 0
    Total logical records read: 13
    Total logical records rejected: 0
    Total logical records discarded: 1
    Run began on Fri Jun 30 11:20:27 2006
    Run ended on Fri Jun 30 11:20:27 2006

  • (8I) SQL*LOADER에서 | (PIPE LINE)을 RECORD SEPARATOR로 사용하기

    제품 : ORACLE SERVER
    작성날짜 : 2003-10-21
    ===============================================================
    (8I) SQL*LOADER에서 | (PIPE LINE)을 RECORD SEPARATOR로 사용하기
    ===============================================================
    PURPOSE
    Oracle8i부터는 , SQL*Loader을 사용할때 record terminator을 지정할 수 있게
    되었다.
    Explanation
    Oracle8i 이전에는 record seperator로 default로 linefeed(carriage return,
    newline 등)였다. 이전에는 VAR 또는 FIX 등의 적당한 file을 다루기 위한 옵션을
    주어야 하기 때문에 복잡한 감이 있었고 flexible하지 못했다.
    Oracle8i부터는 , SQL*Loader을 사용할때 record terminator을 지정할 수 있게
    되었다. newline 또는 carriage return 문자를 포함하는 data 또는 special 문자를
    포함하는 data를 load하고자 할때 record terminator를 hexadecimal로 지정하여 활용할 수 있다.
    Example
    다음의 예제는 '|' (pipe line)을 record separator로 사용한다.
    record separator를 사용하기 위해서 SQL*Loader의 control file에 'infile'절에 적당한 값을 지정하여야 한다.
    아래의 예는 '|' (pipe line)을 사용하기 위해서
    "str X'7c0a'"을 'infile'절에 지정하였다.
    --controlfile : test.ctl
    load data
    infile 'test.dat' "str X'7c0a'"
    into table test
    fields terminated by ',' optionally enclosed by '"'
    (col1, col2)
    --datafile: test.dat
    1,this is the first line of the first record
    this is the second|
    2,this is the first line of the second record
    this is the second|
    SQL> desc test
    Name Null? Type
    COL1 VARCHAR2(4)
    COL2 VARCHAR2(100)
    $ sqlldr scott/tiger control=test.ctl log=test.log
    load된 data을 보면 아래와 같이 carriage return이 들어가 있는 data가 한 column에
    제대로 들어간 것을 볼 수 있다.
    SQL> select * from test;
    COL1
    COL2
    1
    this is the first line of the first record
    this is the second
    2
    this is the first line of the second record
    this is the second
    RELATED DOCUMENT
    <Note:74719.1>

  • SQL Loader error while loading a date field

    Hi,
    I am getting the below error while I am trying to load a table with a date field using SQL Loader
    Record 1: Rejected - Error on table RPT_HOST_USAGE, column USAGE_TIMESTAMP.
    ORA-01861: literal does not match format string
    My input file is as below
    <code>
    Host_Usage_ID,Host_ID,Technology_ID,Environment_ID,Usage_Timestamp,Avg_CPU_Pct,Avg_Memory_MB,CPU_Spike
    1,12,1,8,'2009-08-01 00:00:00',0.000000000,23875.000000000,0.000000000
    <code>
    My Loader.ctl is
    <code>
    OPTIONS (SKIP=1)
    load data
    infile 'C:\rpt_Host_Usage.txt'
    into table RPT_HOST_USAGE
    fields terminated by ","
    HOST_USAGE_ID,
    HOST_ID,
    TECHNOLOGY_ID,
    ENVIRONMENT_ID,
    USAGE_TIMESTAMP,
    AVG_CPU_PCT,
    AVG_MEMORY_MB,
    CPU_SPIKE
    <code>
    I have tried options like USAGE_TIMESTAMP TO_DATE(USAGE_TIMESTAMP,'YYYY-MM-DD HH24:MI:SS') but didn't work...
    Can you please tell me how to resolve this issue?
    Any pointers on this will be helpful
    Thanks
    Mahesh

    I went back and looked at some of my old *.ctl files and I did something simlilar to what you mentioned and it worked for me, but I had surrounded the option in double-quotes and included a colon in front of the item. Example:
    TECHNOLOGY_ID,
    ENVIRONMENT_ID,
    USAGE_TIMESTAMP "to_date(:USAGE_TIMESTAMP,'YYYY-MM-DD HH24:MI:SS')",
    AVG_CPU_PCT,
    AVG_MEMORY_MB,
    ....

  • Loading data by sql loader in oracle 10g on linux

    I am trying to load data in Oracle 10g on linux by using sql loader, but getting error
    Problem in log showing that field length of SURNAME field is more than table field size.
    Following is the error in log file of sql loader
    Record 21: Rejected - Error on table TABLE1, column
    SURNAME.
    ORA-12899: value too large for column SURNAME (actual: 65, maximum: 64)
    and it is evident from following controlfile that i am using trim to discard any space then why it is giving an error.
    LOAD DATA
    TRUNCATE
    INTO TABLE TABLE1
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    ID INTEGER EXTERNAL,
    OPTION1 CHAR,
    REF1 CHAR,
    OTHER_REF CHAR,
    TITLE "TRIM(:TITLE)",
    FORENAME "TRIM(:FORENAME)",
    SURNAME "TRIM(:SURNAME)",
    JOINT_TITLE "TRIM(:JOINT_TITLE)",
    JOINT_FORENAME "TRIM(:JOINT_FORENAME)",
    JOINT_SURNAME "TRIM(:JOINT_SURNAME)",
    I checked the bad file and count number of characters, they are 64 characters.
    When i am inserting individual record from bad file by sql loader, it is loading

    Probably your database character set is multi-byte. That is %UTF8 or AL16UTF16%
    Post your NLS Database Parameters value
    select * from nls_database_parameters;
    In General varchar2(65) by default means 65 BYTES unless
    you have changed your Defalut NLS_LENGTH_SEMANTICS parameter from BYTE to CHAR.
    With best regards
    Shan

  • SQL Loader fails loading XML data enclosed by tag not found

    The problem I'm having is my XML tree doesn't contain all possible elements. In this example the second entry doesn't contain <age> - only the first entry will be added to the database
    Any idea of how I could solve this?
    The fields are saved as varchar2
    XML:
    <rowset>
    <row>
    <name>Name</name>
    <age>Age</age>
    <city>City</city>
    </row>
    <row>
    <name>Name2</name>
    <city>City2</city>
    </row>
    </rowset>
    LOAD DATA
    INFILE 'data.xml' "str '</row>'"
    APPEND
    INTO TABLE test
    TRAILING NULLCOLS
    dummy FILLER terminated BY "<row>",
    name ENCLOSED BY "<name>" AND "</name>",
    age ENCLOSED BY "<age>" AND "</age>",
    city ENCLOSED BY "<city>" AND "</city>"
    )

    I noticed that failure occurs when using 11g version SQL Loader. It doesn't fail when using 10g version SQL Loader.
    Delimited source data comes from:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - ProductionAnd will be loaded into
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for Linux: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - ProductionMy previously used SQL Loader was from:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - ProductionIt seems that I have found the real culprit. Should I know something more?

  • 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 - loading delimited files before 8i

    I writing an ETL tool that gererates control file for SQL*Loader.
    Does anyone know how selected fields can be loaded from a delimited file (e.g. CSV), in SQL*Loader prior to version 8i. The 8i version now has the "FILLER" keyword to define fields in the data file that are not loaded. Given the data (2 records) below, where all fields are of variable length: -
    "Some character data",-123.45,"Some text"
    "Some more character data",34.6,"Some more text"
    How could I load the second and third fields only? I would use "FIELDS DELIMIOTED BY ',' OPTIONALLY ENCLOSED BY '"' to specify the delimiters. I would then have to specify the columns to load into: -
    my_col1,
    my_col2,
    my_col3
    I can't see any way of skipping the first field. I could use "POSITION(*)" for each of the columns. Using "POSITION(+n)" specifies skipping characters, not fields though.
    I suppose I'll just have to reformat the data file, and load all, or at least the first "n" fields that are required.
    Any feedback would be greatly appreciated.
    Thanks.

    Hi,
    I tend to use awk to preprocess my SQL*Loader data files. Under UNIX I find it much quicker that figuring out how to do it with SQL*Loader. Anyway, the example you gave could be preprocessed as follows:
    awk -F, '{ print $2 "," $3 }' yourfile.dat >newfile.dat
    If you need a brief explanation awk you can look at the awk man or info pages. I assume that awk (maybe gawk) is available under windows as well. The really nice thing about this method is that you can do pretty sophisticated processing of the input stream with awk.
    David Shaffer
    [email protected]
    null

  • SQL-Loader Control file for Tab-delimited fields

    i want to import a text-file with TAB-DELIMITED fields and a line-break + return at the end of each record.
    a want to do this by sql-loader and a control file.
    please, can someone give me the statement:
    e.g.
    load data
    infile 'exaple.txt' .......
    (...field1, field2,....)
    thank you very much

    Case Study 3: Loading a Delimited, Free-Format File
    http://otn.oracle.com/pls/db92/db92.to_URL?urlname=http:%2F%2Fdownload-west.oracle.com%2Fdocs%2Fcd%2FB10501_01%2Fserver.920%2Fa96652%2Fch10.htm%231006907
    Modify the example and use 'terminated by whitespace' instead
    For more information on TERMINATED Fields see
    http://otn.oracle.com/pls/db92/db92.to_URL?remark=drilldown&urlname=http:%2F%2Fdownload-west.oracle.com%2Fdocs%2Fcd%2FB10501_01%2Fserver.920%2Fa96652%2Fch06.htm%231013838

  • SQL Loader/External Table multiple record delimiters

    Hi every one.
    I have a strange problem, I have an external csv file which i wish to deal with (external tables or sql loader). This csv is totally not organized in structure and it contains records that are mixed together, meaning that some records are delimited by newline characters. So in short, i want to know if I will be able to load the data in this csv separating records by newline character and another character? So is that possible to have multiple record delimiters specified in the same ctl file?

    abohsin,
    I think using the Stream record format would be helful in your case. Please explore that.
    Using stream record option, instead of the default new line, you can specify a user defined record delimiter.
    Check this link.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_control_file.htm#i1005509
    Here is what I did. Not the complete answer, but it might be helpful.
    Replace all delimiters witha standard delimiters (in unix)
    sed s/HEAD,/**DLM**/g < test.dat >test2.dat
    sed s/TAIL,/**DLM**/g < test2.dat >test3.dat
    create table t(
      TEXT varchar2(100)
    and Use that delimiter as the standard delimiter.
    load data
    infile "test3.dat" "str '**DLM**'"
    into table T
    TRUNCATE
    fields terminated by 'XXXXX' optionally enclosed by '"'
    TEXT
    sql> select * from t;
    TEXT
    1111,2222,
    4444,5555,
    4444
    1111,3333,
    8888,6666,
    5555
    {code}
    You should also replace new line charecters with '***DLM***'.
    Thanks,
    Rajesh.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for