SQL Loader problem

Hi I'm using version 11.2.0.3.0 version of oracle, and I'm trying to push the file using sql loader utility to my DB table, below is my table structure, two of the column will be constant appears as mentioned below in the table structure. And the File_DATE column must be the combination of two fields (Date and time) of flat file to have the appropriate data column format. I get the error message and not be able to download the data using slot control file, so need help.

sample data file

OrderDate, name, size, Records, Date, Time
06202014, authlogfile06202014.txt, 40777214, 198915, June 21 at 03:51
06202014, transferfile06202014.txt, 372144, 2255, June 21 at 01:34
06202014, balancefile06202014.txt, 651075, 10343, June 21 at 03:28

The table structure

Create the table file_stats
(Systemtypecode VARCHAR2 (4000)-this will be a value to hardcode "CBD")
LETTER Date,
FILENAME VARCHAR2 (4000).
Size of the file Number (20.0).
Noofrecords NUMBER (20.0).
File_DATE VARCHAR2 (4000).
CREATED_DATE Date - it will be filled with the value SYSDATE
);

Here's my control file

Options
(SKIP = 1)
DOWNLOAD THE DATA
INFILE 'files.csv '.
ADD
IN the file_stats table
FIELDS TERMINATED BY ', '.
(Systemtypecode CONSTANT 'CBD',
LETTER DATE 'MMDDYYYY.
CHAR FILE NAME,
Size of the ENTIRE file,
Noofrecords INTEGER,
boundfiller TANK file_DATE_DDmon
, file_DATE ' to_date ('2014':: file_DATE_DDmon:: file_DATE, 'YYYYMON DDHH24:MI').
, created_date CONSTANT 'sysdate.
)

When running under command, all erroneous records on as below

sqlldr schema1/pwd@db1 control = file_stats.ctl log = file_stats.log file_stats.bad = bad

ERROR:
Sheet 1: Rejected - error on the table FILE_STATS, column FILE_DATE.
ORA-01843: not one month valid

You must add TRAILING NULLCOLS and use EXTERNAL INTEGER instead of an INTEGER and your file_date column must be of type DATE data.  Please see the demo below with some additional corrections.  Note that since there is no year in the data file for the file_date column, which by default is the current year.  If you want to 2014 so you need to concatenate that and add the date format YYYY.

Scott@orcl12c > files.csv TYPE of HOST

OrderDate, name, size, Records, Date, Time

06202014, authlogfile06202014.txt, 40777214, 198915, June 21 at 03:51

06202014, transferfile06202014.txt, 372144, 2255, June 21 at 01:34

06202014, balancefile06202014.txt, 651075, 10343, June 21 at 03:28

Scott@orcl12c > file_stats.ctl TYPE of HOST

OPTIONS (SKIP = 1)

DOWNLOAD THE DATA

INFILE 'files.csv '.

ADD IN THE TABLE file_stats

FIELDS TERMINATED BY ',' TRAILING NULLCOLS

(systemtypecode CONSTANT "CBD"

, odate DATE 'MMDDYYYY '.

filename CHAR

INTEGER EXTERNAL file size

noofrecords INTEGER EXTERNAL

file_date_ddmon BOUNDFILLER TANK

, file_date DATE 'My DDHH24:MI' ': file_date_ddmon |: file_date '

, created_date 'SYSDATE.

)

Scott@orcl12c > file_stats CREATE TABLE

2 (systemtypecode VARCHAR2 (14),)

3 DATE odate,.

4 name of file VARCHAR2 (24).

size of the file NUMBER 5 (20.0).

6 noofrecords NUMBER (20.0).

7 file_date DATE,

8 created_date DATE)

9.

Table created.

Scott@orcl12c > HOST SQLLDR scott/tiger CONTROL = file_stats.ctl LOG = file_stats.log file_stats.bad = BAD

SQL * Loader: release 12.1.0.1.0 - Production on Thu Feb 5 15:26:49 2015

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

Path used: classics

Commit the point reached - the number of logical records 3

Table FILE_STATS:

3 rows loaded successfully.

Check the log file:

file_stats.log

For more information on the charge.

Scott@orcl12c > SELECT * FROM file_stats

2.

SYSTEMTYPECODE, KAI NOOFRECORDS FILE_DATE CREATED_DATE FILENAME FILE SIZE

-------------- --------------- ------------------------ ---------- ----------- --------------- ---------------

Friday, June 20, 2014 authlogfile06202014.txt 40777214 198915 Sunday 21 June 2015 CBD Thursday, February 5, 2015

Friday, June 20, 2014 transferfile06202014.txt 372144 2255 Sunday 21 June 2015 CBD Thursday, February 5, 2015

Friday, June 20, 2014 balancefile06202014.txt 651075 10343 Sunday 21 June 2015 CBD Thursday, February 5, 2015

3 selected lines.

Tags: Database

Similar Questions

  • SQL loader, problem with the POSITION & EXTERNAL

    Hi gurus of the Oracle.

    I have problem with position and external.

    I have the data file with the data of 1 million records

    data delimiter is to and eventually closed by «»

    some lines are not loaded due to errors of data, i.e. data contains some «»

    now, we decided to use the position & external. am unable to write the control file.

    any help would be much appreciated

    The table name is person_memo, 4 columns

    ID_PERSONVARCHAR2 (9 bytes)
    TX_MEMOVARCHAR2 (1000 bytes)
    ID_USERVARCHAR2 (20 bytes)
    TM_STAMPTIMESTAMP (6)

    my control file is

    DOWNLOAD THE DATA

    ADD THE PERSON_MEMO TABLE

    FIELDS TERMINATED BY ' |'

    SURROUNDED OF POSSIBLY "" "

    TRAILING NULLCOLS

    (

    ID_PERSON POSITION (1) "CUT (: ID_PERSON).

    , TX_MEMO POSITION (10) TANK (1000) "CUT (: TX_MEMO).

    , POSITION (1012) ID_USER "TRIM (: ID_USER).

    , TM_STAMP POSITION (1031) EXTERNAL (26) ' DECODE (: TM_STAMP, NULL, NULL, TO_TIMESTAMP (: TM_STAMP, ' YYYY-MM-DD - HH24.MI.)). SS. "(FF')).

    )

    specimen of data file

    "04725813" | "aka"Little Will"" "|" " 095TDEAN «|» 2013-02-21 - 11.13.44.632000

    "05599076" | "" FIRST NAME - ADDED A 'T' AS ON THE REG MAP | ' 016DDEAL ' |. ' 2014-04-11 - 10.06.35.598000

    Thanks and greetings

    REDA

    In your control file, EXTERNAL (26) must be INTEGER EXTERNAL (26).

    Unfortunately, this forum destroyed the spacing, so I can't say whether or not your data are positionnelles.  If it is positional, you can then use positions, but you need start and end positions.  The positions that you posted have nothing to do with the data you've posted.  If you use positions, you can eliminate the delimiters and the beginning and the end of citations using these positions.

    If your data are not positionnelles and you have quotes in your data in quotes, but you don't have the pipe delimiters in your data, then you can only use the delimiters and trim the quotes start and final data.

    I have demonstrated the two methods below, using test1.ctl for the positional method and test2.ctl for the defined method.

    Scott@orcl12c > host type test.dat

    "04725813" | "aka"Little Will"" | "" 095TDEAN «|» 2013-02-21 - 11.13.44.632000

    "05599076" | "" FIRST NAME - ADDED A 'T' AS ON THE REG MAP | ' 016DDEAL ' |. ' 2014-04-11 - 10.06.35.598000

    Scott@orcl12c > type host test1.ctl

    DOWNLOAD THE DATA

    ADD THE PERSON_MEMO TABLE

    FIELDS TERMINATED BY ' |'

    TRAILING NULLCOLS

    (ID_PERSON POSITION (02:10))

    , TX_MEMO POSITION (14:59)

    POSITION ID_USER (63:82)

    , TM_STAMP POSITION (85:110) EXTERNAL INTEGER (26) ' DECODE (: TM_STAMP, NULL, NULL,).

    TO_TIMESTAMP (: TM_STAMP, ' YYYY-MM-DD - HH24.MI.) SS. "(FF')).

    )

    Scott@orcl12c > type host test2.ctl

    DOWNLOAD THE DATA

    ADD THE PERSON_MEMO TABLE

    FIELDS TERMINATED BY ' |'

    TRAILING NULLCOLS

    (ID_PERSON "TRIM ("------"" FROM: ID_PERSON ")")

    , TX_MEMO CHAR (1000) "TRIM ("------"" FROM: TX_MEMO ").

    , ID_USER "TRIM ("------"" FROM: ID_USER ").

    , TM_STAMP INTEGER EXTERNAL (26) ' DECODE (: TM_STAMP, NULL, NULL,).

    TO_TIMESTAMP (: TM_STAMP, ' YYYY-MM-DD - HH24.MI.) SS. "(FF')).

    )

    Scott@orcl12c > create table person_memo

    2 (ID_PERSON VARCHAR2 (9 bytes)

    3, TX_MEMO VARCHAR2 (1000 bytes)

    4, ID_USER VARCHAR2 (20 bytes)

    5, TM_STAMP TIMESTAMP (6))

    6.

    Table created.

    Scott@orcl12c > host sqlldr scott/tiger control = test1.ctl data = test.dat log = test1.log

    SQL * Loader: release 12.1.0.1.0 - Production Thursday, May 15, 10:53:11-2014

    Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

    Path used: classics

    Commit the point reached - the number of logical records 2

    Table PERSON_MEMO:

    2 rows loaded successfully.

    Check the log file:

    test1.log

    For more information on the charge.

    Scott@orcl12c > select * from person_memo

    2.

    ID_PERSON

    ---------

    TX_MEMO

    --------------------------------------------------------------------------------

    ID_USER

    --------------------

    TM_STAMP

    ---------------------------------------------------------------------------

    04725813

    aka "Little Will"

    095TDEAN

    21 FEBRUARY 13 11.13.44.632000 AM

    05599076

    FIRST NAME - ADDED A 'T' AS ON THE REG MAP

    016DDEAL

    11 APRIL 14 10.06.35.598000 AM

    2 selected lines.

    Scott@orcl12c > truncate table person_memo

    2.

    Table truncated.

    Scott@orcl12c > host sqlldr scott/tiger control = test2.ctl data = test.dat log = test2.log

    SQL * Loader: release 12.1.0.1.0 - Production Thursday, May 15, 10:53:11-2014

    Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

    Path used: classics

    Commit the point reached - the number of logical records 2

    Table PERSON_MEMO:

    2 rows loaded successfully.

    Check the log file:

    test2.log

    For more information on the charge.

    Scott@orcl12c > select * from person_memo

    2.

    ID_PERSON

    ---------

    TX_MEMO

    --------------------------------------------------------------------------------

    ID_USER

    --------------------

    TM_STAMP

    ---------------------------------------------------------------------------

    04725813

    aka "Little Will"

    095TDEAN

    21 FEBRUARY 13 11.13.44.632000 AM

    05599076

    FIRST NAME - ADDED A 'T' AS ON THE REG MAP

    016DDEAL

    11 APRIL 14 10.06.35.598000 AM

    2 selected lines.

  • SQL Loader: Problem with WHEN

    I'm using Oracle 11 g, Win XP.

    I'm trying to load data with control below folder:
    OPTIONS (SKIP=0, DIRECT=FALSE, PARALLEL=FALSE, BINDSIZE=50000, errors=999999,ROWS=200, READSIZE=65536)
    LOAD DATA
    
    APPEND
    INTO TABLE v_table
    when COL_3  = 'XXXX'
    fields terminated by "|" optionally enclosed by '"'
    trailing nullcols
    (
    COL_1  "trim(:COL_1)",
    COL_2  "trim(:COL_2)",
    COL_3  "trim(:COL_3)",
    COL_4  "trim(:COL_4)",
    COL_5  "trim(:COL_5)",
    COL_6  "trim(:COL_6)",
    COL_7  "trim(:COL_7)",
    )
    
    INTO TABLE v_table
    APPEND
    when  COL_3 = 'YYY'
    fields terminated by "|" optionally enclosed by '"'
    trailing nullcols
    (
    COL_1  "trim(:COL_1)",
    COL_2  "trim(:COL_2)",
    COL_3  "trim(:COL_3)",
    COL_4  "trim(:COL_4)",
    COL_5  "trim(:COL_5)",
    COL_6  "trim(:COL_6)",
    COL_7  "trim(:COL_7)",
    )
    Here is the sample data in the data file:
    33432|"ORACLE"|"XXXX"|"555827             "|"317564"|" "|""|"ORACLE "|2011-07-20-15.37.11.879915|0001-01-01-01.01.01.000001
    33433|"ORACLE"|"XXXX"|"555828             "|"317564"|" "|""|"ORACLE "|2011-07-24-15.37.11.879915|0001-01-01-01.01.01.000001
    33434|"ORACLE"|"XXXX"|"555829             "|"317564"|" "|""|"ORACLE "|2011-07-10-15.37.11.879915|0001-01-01-01.01.01.000001
    33435|"ORACLE"|"XXXX"|"555830             "|"317564"|" "|""|"ORACLE "|2011-07-22-15.37.11.879915|0001-01-01-01.01.01.000001
    33436|"ORACLE"|"XXXX"|"555831             "|"317564"|" "|""|"ORACLE "|2011-07-20-15.37.11.879915|0001-01-01-01.01.01.000001
    33437|"ORACLE"|"XXXX"|"555832             "|"317564"|" "|""|"ORACLE "|2011-07-20-15.37.11.879915|0001-01-01-01.01.01.000001
    40048|"SAS"|"ZZZ "|"1017838            "|"317551"|" "|""|"COD "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    40049|"SAS"|"ZZZ "|"1017839            "|"317551"|" "|""|"COD "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    40050|"SAS"|"ZZZ "|"1017840            "|"317551"|" "|""|"COD "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    20046|"SUNUSA"|"YYY "|"1017836            "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    20047|"SUNUSA"|"YYY "|"1017837            "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    20048|"SUNUSA"|"YYY "|"1017838            "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    20049|"SUNUSA"|"YYY "|"1017839            "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    20050|"SUNUSA"|"YYY "|"1017840            "|"317551"|" "|""|"JAVA "|2011-09-08-08.44.29.684915|0001-01-01-01.01.01.000001
    It is:
    When I'm loading data into the table with the above command card, only data with when COL_3 = "XXXX" is to take. And if I comment the block that has COL_3 = "XXXX", then the second block is to take (when COL_3 = "YYY"). But I am unable to load data for XXXX and YYY on a single charge. Can someone help me on this please?

    This give a try.

      ...
      when  COL_3  = 'XXXX' and COL_3 = 'YYY'
      ...
    
  • Reg: Problem SQL Loader-

    Hi Experts,

    I am trying to load data from a flat file in an Oracle table, but face some problems.

    Concern (1) (1)

    I have a directory where there are about 20 similar files named as 'rb_1', 'rb_2', 'rb_3', etc...

    All these data should be loaded in a Word only table 'X '.

    Is it possible that only 1 CTL file will make a loop and load all the files in X?

    Concern (2) (2)

    Field delimiter is Ctrl-X (CAN: cancel) and Ctrl-M (EM: em) characters

    Line delimiter is Ctrl-Z (SUB: substitute) and Ctrl-T (DC4: Device Control) characters

    Is there a way I can specify this in my CTL file?

    (I've only worked on delimiter of field as comma "«»", de champ comme virgule «», pas speciales personnages comme ca not special characters like that)

    Please let me know if any additional information is required.

    Help much appreciated.

    Thank you

    -Nordine


    Agree with Hoek, you'd better to use external tables you can specify multiple filenames at once, otherwise you will have a script that provides the name of the input file when calling sql loader and make this script loop for each file.

    Regarding the ctrl characters in your delimiters, control file supports the hexagonal versions of them for example

    fields terminated by ' 09 x. "

    where 9 is the hexagon of the ascii value of the character (in this case a tab character).

    CTRL-m, that would be x ' 0 of etc.

  • Problem with Sql Loader

    Hi s/n,.

    I am facing problems when loading the dates in the database by using sql loader. My data file can have several date formats, so I have a function that interprets date and removes the time settings and the date of return.

    Something like that.

    For example:

    I have a table-

    CREATE TABLE TEMP1234

    (

    IDENTIFICATION NUMBER,

    DATE OF ASOF_DATE

    );

    Data file

    10001172 | 09/12/1945

    Control file:

    OPTIONS (DIRECT = TRUE, SILENT (FEEDBACK) =, skip = 0)

    DATA RELATING TO SUNK COSTS

    REPLACE

    in the temp1234 table

    ' fields completed by "|" possibly provided by ' "'

    TRAILING NULLCOLS

    (ID,

    ASOF_DATE "decode (: ASOF_DATE, null,:ASOF_DATE,conv_date1(:ASOF_DATE))).

    )

    Function CONV_DATE1:

    FUNCTION to CREATE or REPLACE conv_date1 (p_str IN VARCHAR2)
    DATE OF RETURN
    IS
    RETURN_VALUE DATE;

    p_str1 VARCHAR2 (15): = NULL;

    FmtArray TYPE IS a TABLE OF VARCHAR2 (30);

    g_fmts fmtArray
    : = fmtArray ("yyyy-mm-dd",
    "yyyy/mm/dd"
    mm/dd/yyyy"."
    "dd-mm-yyyy",
    "dd/mm/yyyy",
    "mm-dd-yyyy");
    BEGIN
    p_str1: = SUBSTR (p_str, 1, 10);

    BECAUSE me in 1... g_fmts. COUNTY
    LOOP
    BEGIN
    return_value: = TO_DATE (p_str1, g_fmts (i));
    EXIT;
    EXCEPTION
    WHILE OTHERS
    THEN
    NULL;
    END;
    END LOOP;

    IF (return_value IS NULL)
    THEN
    RAISE PROGRAM_ERROR;
    END IF;

    RETURN Return_value;
    END;
    /

    In this case, if the year in the data file shown in 1945, date which is load in the poster 2045 database.

    But when I run this function by putting a sql editor - it returns the correct value.

    Select double conv_date1('12/09/1945');

    Please help me understand what is causing the problem.

    I think there may be an implicit conversion going on with the combination of decode and checking nvl and function within SQL * Loader.  I put the nvl checking in function and simply use the function in the control file, as shown below.

    OPTIONS (DIRECT = TRUE, SILENT (FEEDBACK) =, skip = 0)

    DATA RELATING TO SUNK COSTS

    REPLACE

    in the temp1234 table

    ' fields completed by "|" possibly provided by ' "'

    TRAILING NULLCOLS

    (ID,

    asof_date ' conv_date1 (: asof_date).

    )

    FUNCTION to CREATE or REPLACE conv_date1 (p_str IN VARCHAR2)

    DATE OF RETURN

    IS

    RETURN_VALUE DATE;

    p_str1 VARCHAR2 (15): = NULL;

    FmtArray TYPE IS a TABLE OF VARCHAR2 (30);

    g_fmts fmtArray

    : = fmtArray ("yyyy-mm-dd",

    "yyyy/mm/dd"

    mm/dd/yyyy"."

    "dd-mm-yyyy",

    "dd/mm/yyyy",

    "mm-dd-yyyy");

    BEGIN

    IF p_str IS NULL

    THEN RETURN NULL;

    ON THE OTHER

    p_str1: = SUBSTR (p_str, 1, 10);

    BECAUSE me in 1... g_fmts. COUNTY

    LOOP

    BEGIN

    return_value: = TO_DATE (p_str1, g_fmts (i));

    EXIT;

    EXCEPTION

    WHILE OTHERS

    THEN

    NULL;

    END;

    END LOOP;

    IF (return_value IS NULL)

    THEN

    RAISE PROGRAM_ERROR;

    END IF;

    RETURN Return_value;

    END IF;

    END;

    /

  • java.sql.SQLException: problems with the native/lack of loading methods library

    Hi all

    Please let me know how to fix the exception "java.sql.SQLException: problems with the native/lack of loading methods library: no ttJdbc in java.library.path".

    Thank you
    Prabhu

    Published by: Nina Prabhu on November 20, 2012 02:12

    Hi Prabhu,

    Probably, you must specify the LD_LIBRARY_PATH variable. Like the following:

    export LD_LIBRARY_PATH=$TIMESTEN_HOME/ttoracle_home/instantclient_11_1
    

    Best regards
    Gennady

  • Problem with SQL Loader ODI

    Hello

    I have problems using SQL Loader with ODI. I am filling an oracle table with data from a txt file. Initially, I had used 'File to SQL' LKM, but due to the size of the file (700 MB) source, I decided to use 'file to Oracle (SQLLDR)' LKM.
    The error that appears in myFile.txt.log is: "SQL * Loader-101: invalid argument for the name of user and password.

    I think the problem might be in the definition of the database server (physical JavaBeans in topology), because I left empty Host, user and password.

    What is the problem? What host and user should I use? With "File to SQL" works fine living that white, but takes too much time.

    Thanks in advance

    Note the last * @*. He expects a connection string after him.

    So, goto Oracle server topology, specify Instance/Dblink (server) as the SID of the oracle database you want to connect.

  • Problem loading xml using sql loader file

    I am trying to load data into the table test_xml (xmldata XMLType)

    I have an xml file and I want any file to load in a single column

    When I use the following control file and run from the command-line as follows
    sqlldr $1@$TWO_TASK direct control=$XXTOP/bin/LOAD_XML.ctl = true; :

    DOWNLOAD THE DATA
    INFILE *.
    TRUNCATE INTO TABLE test_xml
    XmlType (XMLDATA)
    FIELDS
    (
    tank fill ext_fname (100),
    XMLDATA LOBFILE (ext_fname) COMPLETED BY expressions of folklore
    )
    START DATA
    U01/appl/apps/apps_st/appl/XXTop/12.0.0/bin/file. XML

    the file is loaded in the table perfectly.

    Unfortunately I can't hard-code the name of file as file name will be changed dynamically.

    so I removed the block

    START DATA
    U01/appl/apps/apps_st/appl/XXTop/12.0.0/bin/file. XML

    control file and tried to run by giving the following command line path

    sqlldr $1@$TWO_TASK control=$XXTOP/bin/LOAD_XML.ctl direct data=/u01/APPL/apps/apps_st/appl/xxtop/12.0.0/bin/file.xml = true;

    But strangely it attempts to load each line of the xml file in the table instead of the whole file

    Please find the log of the program with the error

    ------------------------------------------------------------------
    Loading XML through SQL * Loader begins
    ------------------------------------------------------------------
    SQL * Loader-502: cannot open the data file ' <? XML version = "1.0"? > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< root >' XMLDATA field table TEST_XML
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< ScriptFileType >' field XMLDATA table TEST_XML
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < Type > forms < / Type > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < / ScriptFileType > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< ScriptFileType >' field XMLDATA table TEST_XML
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < Type > PLL < / Type > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file ' < / ScriptFileType > ' table field TEST_XML XMLDATA
    SQL * Loader-553: file not found
    SQL * Loader-509: System error: no such file or directory
    SQL * Loader-502: cannot open the data file '< ScriptFileType >' field XMLDATA table TEST_XML

    Please help me how can I load full xml in a single column using command line without Hardcoding in the control file

    Published by: 907010 on January 10, 2012 02:24

    But strangely it attempts to load each line of the xml file in the table instead of the whole file

    Nothing strange, that the data parameter specifies the file containing the data to load.
    If you use the name of the XML here, the control file will try to interpret each line of XML as being separate ways.

    The traditional approach this is to have the name of the file stored in another file, say filelist.txt and use, for example:

    echo "/u01/APPL/apps/apps_st/appl/xxtop/12.0.0/bin/file.xml" > filelist.txt
    sqlldr $1@$TWO_TASK control=$XXTOP/bin/LOAD_XML.ctl data=filelist.txt direct=true;
    
  • Encapsulate data problems when loading with sql loader

    Hi all

    I use sql loader to load data into a flat file HP UNIX.

    I find the fi the NUMBER data type or date type get wraped to the new line, the control file triggered errors.

    The data looks like to (field dilimiter is |, record dilimter is ~):

    1 A87CCH | 1 A87CCH | PLAN_ACCOUNT_PROMOTION | HIR6A-1 | 20100706 06:06:24 | 1 DNE1 | DC?
    2010.7 FY1011 Promoiton | 1 A87AW0 | 1 HJEZE | Private | 20100730 00:00:00 | 00 20100710
    : 00:00 | 0 | Completed | 20100730 00:00:00 | 20100710 00:00:00 | 0 | 1 4A6PKP | TFMAAI | N
    | 0 | 0 | 0 | 0 | 0 | 0 | 1 4A6PKP | Approved | 1 8U4E-163 | 00:00:20110630 00 |
    20100708 01:45:35 | 20100707 00:00:00 | -1||| 0 | 9000 | 0 | 0 ||| 100. N | 0 | 0 | 0 | 0
    | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | N | 20110426 04:01:34 | 1 8U4E-163 | 0|||||||||
    ||||| ~


    The control file looks like:

    OPTIONS (ERRORS = 1000, DIRECT = TRUE, PARALLEL = TRUE, DATE_CACHE = 5000, discardmax = 50)
    UNRECOVERABLE
    load data
    INFILE ' / home/bs7822/leon/leon.dat' "str" ~ "»
    BADFILE ' / home/bs7822/leon/leon.bad'
    DISCARDFILE ' / home/bs7822/leon/leon.discard'
    ADD THE LEON_123456 TABLE
    FIELDS TERMINATED BY ' | '. SURROUNDED OF POSSIBLY "" "
    TRAILING NULLCOLS
    (
    X_INTERFACED_DT EXPRESSION "to_date (replace (replace (: X_INTERFACED_DT_BF, chr (10),"), Chr (13), "), 'YYYYMMDD hh24:mi:ss')", "
    X_INTERFACED_DT_BF boundfiller,
    EXTERNAL DECIMAL X_ACCRUAL_AMT,
    X_PLAN_SHIPMENT_PATTERN_ID TANK (90)
    )

    I think that replace it can treat the wrapped date. But I want to know if we can find a faster or easier way to conquer this topic since the beginning.

    Best regards

    Leon

    user12064076 wrote:
    Thank you for your response. But how to ensure that a record is in a single line? For example, to unload data with coil?

    The table has more than 100 columns.

    Best regards
    Leon

    UH... which guarantee is implemented by anyone or anything that generates the data in the first place.
    for example if I am extracting data to CSV for a customer or another application, making sure that it is 1 card per line with delimiters known etc.

    What is your own code that produces the data in the first place? If so, how are you to produce? With large amounts of data I wouldn't do it with SQL * Plus spool command, but I do with UTL_FILE within PL/SQL, or generating data in a file CLOB and spell the CLOB in a go using one of the CLOB methods available writing files.

  • Problem using denounced by ' end_responder_Comments ~' in SQL * Loader

    When I run the sqlldr to through the program simultaneous host/UNIX in Oracle apps 11.5.10.2. I get the following error. I don't understand why it doesn't work. I have made a mistake in declaring? Please let me know.

    log file:
    SQL * Loader-350: at line 44 syntax error.
    Expecting tank single, found "end_responder_Comments ~".
    RESPONDER_COMMENT completed by ' end_responder_Comments ~ ', ^.
    SQL * Loader: Release 8.0.6.3.0 - Production on Wed Feb 16 11:38:21 2011

    CTL file:
    ---------
    DOWNLOAD THE DATA
    ADD
    IN THE TABLE 'NR_SPER_DATA2' WHEN SERVICE_REQUEST_NUMBER <>' 0'
    FIELDS TERMINATED BY ' ~'
    SURROUNDED OF POSSIBLY "" "
    TRAILING NULLCOLS
    (SECURITY_ID,
    ---
    ---
    "RESPONDER_COMMENT tank (32000) completed by ' end_responder_Comments ~' OPTIONALLY ENCLOSED BY '" '.
    "COMMENTS char (4000) completed by ' end_comments ~' OPTIONALLY ENCLOSED BY '" '.
    ---
    )

    Appreciate any help provided as soon as possible.

    Thank you
    REDA

    Hello

    CLOB column can take up to 4 GB of data, and default value for char is 255. Anything above 255, you must specify the length

    Concerning
    OrionNet

    Published by: OrionNet on February 16, 2011 15:13

  • Problem SQL Loader.

    Hi all

    DB 10.1.2.0

    I am trying to load the CSV file into a table called home_expenses, but sql loader retired all records.

    -Control file-
    load data
    INFILE 'C:\csv\personal1.txt '.
    in the home_expenses table
    fields completed by «,»
    (PURCHASE_DATE, TAKER, RUPEE_SPENT, CATEGORY, DESCRIPTION, SUB_CATEGORY)

    -Part of the sample Data-

    05/04/2009, grocery store, 83, food, grocery, mazaa
    05/05/2009, other, 50, Homeneeds, other, given Lali
    2009-02-05, grocery store, 60, food, groceries, ice cream for all
    2009-05-05, doctor, 400, health care, doctor, consult Dr. ABBAS
    08/05/2009, food, eating at the restaurant, eat at the restaurant, 35, juice


    Hare krishna

    Try:

    (PURCHASE_DATE Date "mm/dd/yyyy"
    BENEFICIARY
    RUPEE_SPENT
    CATEGORY
    SUB_CATEGORY
    DESCRIPTION)

  • Import data... Wizard creates the file SQL Loader ctl with columns out of order

    4.1.1.19 SQL Developer version. Connected to Oracle XE to test this.

    I'm trying to understand what the problem with the data in my import file when finally, I realize that the Import Wizard of data did not care how I traced the columns at all. The ctl SQL Loader file generated by the Wizard expects that the columns of data in my file to match the order that they appear in the definition of the table and not how they have been mapped in the wizard. Manually edit the ctl file is a workaround. Has anyone else seen elsewhere?

    I see that this is a bug.

  • SQL Loader failed

    Hi all

    I am load flat file in custom intermediate table using sql loader, but I'm betting that the error

    Record 2720: Rejected - error on the table XXPLL_SALES_FCST_BGA_TMPL, column MKTG_ASP.

    ORA-01722: invalid number

    XXPLL_SALES_FCST_BGA_TMPL - Custom intermediate Table


    MKTG_ASP - contains decimal values


    I created this column as a number data type.


    I've seen much after and it was proposed to use 'Decimal external' but it still does not work. All suggestions will be useful.



    Thank you

    Sharath Chander M



    Hi Barbara Boehmer

    Now, I changed in the file ctl under 'EXTERNAL DECIMAL Mktg_ASP DONE BY a SPACE' and now all data are allowed in / load. Is - this way?

    I will also try as you say. Also if the data file has a line any, as a null value for this column will be it's causing any problem for the amendment that I have performed in ctl file?

    Thank you

    Sharath Chander M

  • SQL Loader - ignore the lines with "rejected - all null columns."

    Hello

    Please see the attached log file. Also joined the table creation script, data file and the bad and throw the files after execution.

    Sqlldr customer in the version of Windows-

    SQL * Loader: release 11.2.0.1.0 - Production

    The CTL file has two clauses INTO TABLE due to the nature of the data. The data presented are a subset of data in the real world file. We are only interested in the lines with the word "Index" in the first column.

    The problem we need to do face is, according to paragraph INTO TABLE appears first in the corresponding CTL lines file to the WHEN CLAUSE it would insert and the rest get discarded.

    1. statement of Create table : create table dummy_load (varchar2 (30) name, number, date of effdate);

    2. data file to simulate this issue contains the lines below 10. Save this as name.dat. The intention is to load all of the rows in a CTL file. The actual file would have additional lines before and after these lines that can be discarded.

    H15T1Y Index | 2. 19/01/2016 |

    H15T2Y Index | 2. 19/01/2016 |

    H15T3Y Index | 2. 19/01/2016 |

    H15T5Y Index | 2. 19/01/2016 |

    H15T7Y Index | 2. 19/01/2016 |

    H15T10Y Index | 2. 19/01/2016 |

    CPDR9AAC Index | 2. 15/01/2016 |

    MOODCAVG Index | 2. 15/01/2016 |

    H15TXXX Index | 2. 15/01/2016 |

    H15TXXX Index | 2. 15/01/2016 |

    3. the CTL file - name.ctl

    DOWNLOAD THE DATA

    ADD

    IN THE TABLE dummy_load

    WHEN (09:13) = "Index".

    TRAILING NULLCOLS

    (

    COMPLETED name BY ' | ',.

    rate TERMINATED BY ' | '.

    COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").

    )

    IN THE TABLE dummy_load

    WHEN (08:12) = "Index".

    TRAILING NULLCOLS

    (

    COMPLETED name BY ' | ',.

    rate TERMINATED BY ' | '.

    COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").

    )

    invoke SQL loader in a file-> beats

    C:\Oracle\product\11.2.0\client\bin\sqlldr USERID = myid/[email protected] CONTROL=C:\temp\t\name.ctl BAD=C:\temp\t\name_bad.dat LOG=C:\temp\t\name_log.dat DISCARD=C:\temp\t\name_disc.dat DATA=C:\temp\t\name.dat

    Once this is run, the following text appears in the log file (excerpt):

    Table DUMMY_LOAD, charged when 09:13 = 0X496e646578 ('Index' character)

    Insert the option in effect for this table: APPEND

    TRAILING NULLCOLS option in effect

    Column Position Len term Encl. Datatype name

    ------------------------------ ---------- ----- ---- ---- ---------------------

    NAME                                FIRST     *   |       CHARACTER

    RATE                                 NEXT     *   |       CHARACTER

    EFFDATE NEXT * |       CHARACTER

    SQL string for the column: ' TO_DATE (: effdate, "MM/DD/YYYY").

    Table DUMMY_LOAD, charged when 08:12 = 0X496e646578 ('Index' character)

    Insert the option in effect for this table: APPEND

    TRAILING NULLCOLS option in effect

    Column Position Len term Encl. Datatype name

    ------------------------------ ---------- ----- ---- ---- ---------------------

    NAME                                 NEXT     *   |       CHARACTER

    RATE                                 NEXT     *   |       CHARACTER

    EFFDATE NEXT * |       CHARACTER

    SQL string for the column: ' TO_DATE (: effdate, "MM/DD/YYYY").

    Record 1: Ignored - all null columns.

    Sheet 2: Cast - all null columns.

    Record 3: Ignored - all null columns.

    Record 4: Ignored - all null columns.

    Sheet 5: Cast - all null columns.

    Sheet 7: Discarded - failed all WHEN clauses.

    Sheet 8: Discarded - failed all WHEN clauses.

    File 9: Discarded - failed all WHEN clauses.

    Case 10: Discarded - failed all WHEN clauses.

    Table DUMMY_LOAD:

    1 row loaded successfully.

    0 rows not loaded due to data errors.

    9 lines not loading because all WHEN clauses were failed.

    0 rows not populated because all fields are null.

    Table DUMMY_LOAD:

    0 rows successfully loaded.

    0 rows not loaded due to data errors.

    5 rows not loading because all WHEN clauses were failed.

    5 rows not populated because all fields are null.


    The bad file is empty. The discard file has the following

    H15T1Y Index | 2. 19/01/2016 |

    H15T2Y Index | 2. 19/01/2016 |

    H15T3Y Index | 2. 19/01/2016 |

    H15T5Y Index | 2. 19/01/2016 |

    H15T7Y Index | 2. 19/01/2016 |

    CPDR9AAC Index | 2. 15/01/2016 |

    MOODCAVG Index | 2. 15/01/2016 |

    H15TXXX Index | 2. 15/01/2016 |

    H15TXXX Index | 2. 15/01/2016 |


    Based on the understanding of the instructions in the CTL file, ideally the first 6 rows will have been inserted into the table. Instead the table comes from the line 6' th.

    NAMERATEEFFDATE
    H15T10Y Index2January 19, 2016



    If the INTO TABLE clauses were put in the CTL file, then the first 5 rows are inserted and the rest are in the discard file. The line 6' th would have a ""rejected - all columns null. "in the log file. "


    Could someone please take a look and advise? My apologies that the files cannot be attached.

    Unless you tell it otherwise, SQL * Loader assumes that each later in the table and what clause after the first back in the position where the previous left off.  If you want to start at the beginning of the line every time, then you need to reset the position using position (1) with the first column, as shown below.  Position on the first using is optional.

    DOWNLOAD THE DATA

    ADD

    IN THE TABLE dummy_load

    WHEN (09:13) = "Index".

    TRAILING NULLCOLS

    (

    name POSITION (1) TERMINATED BY ' | '.

    rate TERMINATED BY ' | '.

    COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").

    )

    IN THE TABLE dummy_load

    WHEN (08:12) = "Index".

    TRAILING NULLCOLS

    (

    name POSITION (1) TERMINATED BY ' | '.

    rate TERMINATED BY ' | '.

    COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").

    )

  • Question to load data using sql loader in staging table, and then in the main tables!

    Hello

    I'm trying to load data into our main database table using SQL LOADER. data will be provided in separate pipes csv files.

    I have develop a shell script to load the data and it works fine except one thing.

    Here are the details of a data to re-create the problem.

    Staging of the structure of the table in which data will be filled using sql loader

    create table stg_cmts_data (cmts_token varchar2 (30), CMTS_IP varchar2 (20));

    create table stg_link_data (dhcp_token varchar2 (30), cmts_to_add varchar2 (200));

    create table stg_dhcp_data (dhcp_token varchar2 (30), DHCP_IP varchar2 (20));

    DATA in the csv file-

    for stg_cmts_data-

    cmts_map_03092015_1.csv

    WNLB-CMTS-01-1. 10.15.0.1

    WNLB-CMTS-02-2 | 10.15.16.1

    WNLB-CMTS-03-3. 10.15.48.1

    WNLB-CMTS-04-4. 10.15.80.1

    WNLB-CMTS-05-5. 10.15.96.1

    for stg_dhcp_data-

    dhcp_map_03092015_1.csv

    DHCP-1-1-1. 10.25.23.10, 25.26.14.01

    DHCP-1-1-2. 56.25.111.25, 100.25.2.01

    DHCP-1-1-3. 25.255.3.01, 89.20.147.258

    DHCP-1-1-4. 10.25.26.36, 200.32.58.69

    DHCP-1-1-5 | 80.25.47.369, 60.258.14.10

    for stg_link_data

    cmts_dhcp_link_map_0309151623_1.csv

    DHCP-1-1-1. WNLB-CMTS-01-1,WNLB-CMTS-02-2

    DHCP-1-1-2. WNLB-CMTS-03-3,WNLB-CMTS-04-4,WNLB-CMTS-05-5

    DHCP-1-1-3. WNLB-CMTS-01-1

    DHCP-1-1-4. WNLB-CMTS-05-8,WNLB-CMTS-05-6,WNLB-CMTS-05-0,WNLB-CMTS-03-3

    DHCP-1-1-5 | WNLB-CMTS-02-2,WNLB-CMTS-04-4,WNLB-CMTS-05-7

    WNLB-DHCP-1-13 | WNLB-CMTS-02-2

    Now, after loading these data in the staging of table I have to fill the main database table

    create table subntwk (subntwk_nm varchar2 (20), subntwk_ip varchar2 (30));

    create table link (link_nm varchar2 (50));

    SQL scripts that I created to load data is like.

    coil load_cmts.log

    Set serveroutput on

    DECLARE

    CURSOR c_stg_cmts IS SELECT *.

    OF stg_cmts_data;

    TYPE t_stg_cmts IS TABLE OF stg_cmts_data % ROWTYPE INDEX BY pls_integer;

    l_stg_cmts t_stg_cmts;

    l_cmts_cnt NUMBER;

    l_cnt NUMBER;

    NUMBER of l_cnt_1;

    BEGIN

    OPEN c_stg_cmts.

    Get the c_stg_cmts COLLECT in BULK IN l_stg_cmts;

    BECAUSE me IN l_stg_cmts. FIRST... l_stg_cmts. LAST

    LOOP

    SELECT COUNT (1)

    IN l_cmts_cnt

    OF subntwk

    WHERE subntwk_nm = l_stg_cmts (i) .cmts_token;

    IF l_cmts_cnt < 1 THEN

    INSERT

    IN SUBNTWK

    (

    subntwk_nm

    )

    VALUES

    (

    l_stg_cmts (i) .cmts_token

    );

    DBMS_OUTPUT. Put_line ("token has been added: ' |") l_stg_cmts (i) .cmts_token);

    ON THE OTHER

    DBMS_OUTPUT. Put_line ("token is already present'");

    END IF;

    WHEN l_stg_cmts EXIT. COUNT = 0;

    END LOOP;

    commit;

    EXCEPTION

    WHILE OTHERS THEN

    Dbms_output.put_line ('ERROR' |) SQLERRM);

    END;

    /

    output

    for dhcp


    coil load_dhcp.log

    Set serveroutput on

    DECLARE

    CURSOR c_stg_dhcp IS SELECT *.

    OF stg_dhcp_data;

    TYPE t_stg_dhcp IS TABLE OF stg_dhcp_data % ROWTYPE INDEX BY pls_integer;

    l_stg_dhcp t_stg_dhcp;

    l_dhcp_cnt NUMBER;

    l_cnt NUMBER;

    NUMBER of l_cnt_1;

    BEGIN

    OPEN c_stg_dhcp.

    Get the c_stg_dhcp COLLECT in BULK IN l_stg_dhcp;

    BECAUSE me IN l_stg_dhcp. FIRST... l_stg_dhcp. LAST

    LOOP

    SELECT COUNT (1)

    IN l_dhcp_cnt

    OF subntwk

    WHERE subntwk_nm = l_stg_dhcp (i) .dhcp_token;

    IF l_dhcp_cnt < 1 THEN

    INSERT

    IN SUBNTWK

    (

    subntwk_nm

    )

    VALUES

    (

    l_stg_dhcp (i) .dhcp_token

    );

    DBMS_OUTPUT. Put_line ("token has been added: ' |") l_stg_dhcp (i) .dhcp_token);

    ON THE OTHER

    DBMS_OUTPUT. Put_line ("token is already present'");

    END IF;

    WHEN l_stg_dhcp EXIT. COUNT = 0;

    END LOOP;

    commit;

    EXCEPTION

    WHILE OTHERS THEN

    Dbms_output.put_line ('ERROR' |) SQLERRM);

    END;

    /

    output

    for link -.

    coil load_link.log

    Set serveroutput on

    DECLARE

    l_cmts_1 VARCHAR2 (4000 CHAR);

    l_cmts_add VARCHAR2 (200 CHAR);

    l_dhcp_cnt NUMBER;

    l_cmts_cnt NUMBER;

    l_link_cnt NUMBER;

    l_add_link_nm VARCHAR2 (200 CHAR);

    BEGIN

    FOR (IN) r

    SELECT dhcp_token, cmts_to_add | ',' cmts_add

    OF stg_link_data

    )

    LOOP

    l_cmts_1: = r.cmts_add;

    l_cmts_add: = TRIM (SUBSTR (l_cmts_1, 1, INSTR (l_cmts_1, ',') - 1));

    SELECT COUNT (1)

    IN l_dhcp_cnt

    OF subntwk

    WHERE subntwk_nm = r.dhcp_token;

    IF l_dhcp_cnt = 0 THEN

    DBMS_OUTPUT. Put_line ("device not found: ' |") r.dhcp_token);

    ON THE OTHER

    While l_cmts_add IS NOT NULL

    LOOP

    l_add_link_nm: = r.dhcp_token |' _TO_' | l_cmts_add;

    SELECT COUNT (1)

    IN l_cmts_cnt

    OF subntwk

    WHERE subntwk_nm = TRIM (l_cmts_add);

    SELECT COUNT (1)

    IN l_link_cnt

    LINK

    WHERE link_nm = l_add_link_nm;

    IF l_cmts_cnt > 0 AND l_link_cnt = 0 THEN

    INSERT INTO link (link_nm)

    VALUES (l_add_link_nm);

    DBMS_OUTPUT. Put_line (l_add_link_nm |) » '||' Has been added. ") ;

    ELSIF l_link_cnt > 0 THEN

    DBMS_OUTPUT. Put_line (' link is already present: ' | l_add_link_nm);

    ELSIF l_cmts_cnt = 0 then

    DBMS_OUTPUT. Put_line (' no. CMTS FOUND for device to create the link: ' | l_cmts_add);

    END IF;

    l_cmts_1: = TRIM (SUBSTR (l_cmts_1, INSTR (l_cmts_1, ',') + 1));

    l_cmts_add: = TRIM (SUBSTR (l_cmts_1, 1, INSTR (l_cmts_1, ',') - 1));

    END LOOP;

    END IF;

    END LOOP;

    COMMIT;

    EXCEPTION

    WHILE OTHERS THEN

    Dbms_output.put_line ('ERROR' |) SQLERRM);

    END;

    /

    output

    control files -

    DOWNLOAD THE DATA

    INFILE 'cmts_data.csv '.

    ADD

    IN THE STG_CMTS_DATA TABLE

    When (cmts_token! = ") AND (cmts_token! = 'NULL') AND (cmts_token! = 'null')

    and (cmts_ip! = ") AND (cmts_ip! = 'NULL') AND (cmts_ip! = 'null')

    FIELDS TERMINATED BY ' |' SURROUNDED OF POSSIBLY "" "

    TRAILING NULLCOLS

    ('RTRIM (LTRIM (:cmts_token))' cmts_token,

    cmts_ip ' RTRIM (LTRIM(:cmts_ip)) ")". "

    for dhcp.


    DOWNLOAD THE DATA

    INFILE 'dhcp_data.csv '.

    ADD

    IN THE STG_DHCP_DATA TABLE

    When (dhcp_token! = ") AND (dhcp_token! = 'NULL') AND (dhcp_token! = 'null')

    and (dhcp_ip! = ") AND (dhcp_ip! = 'NULL') AND (dhcp_ip! = 'null')

    FIELDS TERMINATED BY ' |' SURROUNDED OF POSSIBLY "" "

    TRAILING NULLCOLS

    ('RTRIM (LTRIM (:dhcp_token))' dhcp_token,

    dhcp_ip ' RTRIM (LTRIM(:dhcp_ip)) ")". "

    for link -.

    DOWNLOAD THE DATA

    INFILE 'link_data.csv '.

    ADD

    IN THE STG_LINK_DATA TABLE

    When (dhcp_token! = ") AND (dhcp_token! = 'NULL') AND (dhcp_token! = 'null')

    and (cmts_to_add! = ") AND (cmts_to_add! = 'NULL') AND (cmts_to_add! = 'null')

    FIELDS TERMINATED BY ' |' SURROUNDED OF POSSIBLY "" "

    TRAILING NULLCOLS

    ('RTRIM (LTRIM (:dhcp_token))' dhcp_token,

    cmts_to_add TANK (4000) RTRIM (LTRIM(:cmts_to_add)) ")" ""

    SHELL SCRIPT-

    If [!-d / log]

    then

    Mkdir log

    FI

    If [!-d / finished]

    then

    mkdir makes

    FI

    If [!-d / bad]

    then

    bad mkdir

    FI

    nohup time sqlldr username/password@SID CONTROL = load_cmts_data.ctl LOG = log/ldr_cmts_data.log = log/ldr_cmts_data.bad DISCARD log/ldr_cmts_data.reject ERRORS = BAD = 100000 LIVE = TRUE PARALLEL = TRUE &

    nohup time username/password@SID @load_cmts.sql

    nohup time sqlldr username/password@SID CONTROL = load_dhcp_data.ctl LOG = log/ldr_dhcp_data.log = log/ldr_dhcp_data.bad DISCARD log/ldr_dhcp_data.reject ERRORS = BAD = 100000 LIVE = TRUE PARALLEL = TRUE &

    time nohup sqlplus username/password@SID @load_dhcp.sql

    nohup time sqlldr username/password@SID CONTROL = load_link_data.ctl LOG = log/ldr_link_data.log = log/ldr_link_data.bad DISCARD log/ldr_link_data.reject ERRORS = BAD = 100000 LIVE = TRUE PARALLEL = TRUE &

    time nohup sqlplus username/password@SID @load_link.sql

    MV *.log. / log

    If the problem I encounter is here for loading data in the link table that I check if DHCP is present in the subntwk table, then continue to another mistake of the newspaper. If CMTS then left create link to another error in the newspaper.

    Now that we can here multiple CMTS are associated with unique DHCP.

    So here in the table links to create the link, but for the last iteration of the loop, where I get separated by commas separate CMTS table stg_link_data it gives me log as not found CMTS.

    for example

    DHCP-1-1-1. WNLB-CMTS-01-1,WNLB-CMTS-02-2

    Here, I guess to link the dhcp-1-1-1 with balancing-CMTS-01-1 and wnlb-CMTS-02-2

    Theses all the data present in the subntwk table, but still it gives me journal wnlb-CMTS-02-2 could not be FOUND, but we have already loaded into the subntwk table.

    same thing is happening with all the CMTS table stg_link_data who are in the last (I think here you got what I'm trying to explain).

    But when I run the SQL scripts in the SQL Developer separately then it inserts all valid links in the table of links.

    Here, she should create 9 lines in the table of links, whereas now he creates only 5 rows.

    I use COMMIT in my script also but it only does not help me.

    Run these scripts in your machine let me know if you also get the same behavior I get.

    and please give me a solution I tried many thing from yesterday, but it's always the same.

    It is the table of link log

    link is already present: dhcp-1-1-1_TO_wnlb-cmts-01-1

    NOT FOUND CMTS for device to create the link: wnlb-CMTS-02-2

    link is already present: dhcp-1-1-2_TO_wnlb-cmts-03-3
    link is already present: dhcp-1-1-2_TO_wnlb-cmts-04-4

    NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-5

    NOT FOUND CMTS for device to create the link: wnlb-CMTS-01-1

    NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-8
    NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-6
    NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-0

    NOT FOUND CMTS for device to create the link: wnlb-CMTS-03-3

    link is already present: dhcp-1-1-5_TO_wnlb-cmts-02-2
    link is already present: dhcp-1-1-5_TO_wnlb-cmts-04-4

    NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-7

    Device not found: wnlb-dhcp-1-13

    IF NEED MORE INFORMATION PLEASE LET ME KNOW

    Thank you

    I felt later in the night that during the loading in the staging table using UNIX machine he created the new line for each line. That is why the last CMTS is not found, for this I use the UNIX 2 BACK conversion and it starts to work perfectly.

    It was the dos2unix error!

    Thank you all for your interest and I may learn new things, as I have almost 10 months of experience in (PLSQL, SQL)

Maybe you are looking for

  • Portege M100 just run half the speed - 600 Mhz

    HelloI have a Portege M100 that I found very slow until I discovered it was running half speed (IE 600 mhz). I tried everything in the Bios and in Toshiba utility, but nothing to do: always clocked at 600 Mhz. Is there something I missed? y at - it '

  • Unable to connect smartphones to C50-A-1E2 Satellite Pro using Bluetooth

    How can I check to see if I have the correct drivers installed? Cannot connect my Galaxy S2 phone or Tablet Galaxy Note 8 Post edited by: fireballflyer The devices say they are paired, but the Toshiba laptop computer says connection and then not conn

  • HP Officejet 4500 wireless connect installation problem

    I've just set up my wireless Officejet 4500 (model G510). My network is detected by the installation CD and manual configuration wizard wireless, but not by automatic wireless Assistant. After you connect, the two have shown the result "the printer c

  • Cannot access my wifi using an external keyboard... Help...

    I had to get my laptop because of the buttons keyboard not working not properly. I use an external keyboard, but I can't access my wifi. I tried to use the F12 key to activate the wifi on the external keyboard, but with no luck. Any help would be app

  • BlackBerry smartphones, I can't connect to Internet with WIFI

    Hello! First of all, sorry for my so bad English but I am French ;-) I'm so desperate! I have a Blackberry Curve 8520. I bought it in July. It worked very well, but since 3 months ago, I can't connect the BB Internet (with WiFi or WAP). I tried a lot