SQL Loader reads 2 records

Hi all

I'm downloading a file XML with SQL Loader trying to download 2 documents and throw one of them!

file Ctrl:

CHARGE DATE infile * ' str «< Contact >»»
Add in the contacts table
TRAILING NULLCOLS
(fill model finished by '< Contact >',
FIRSTNAME framed by '< FirstName >' and ' < / FirstName >. "
..........,
< / contact >

Data file:

<? XML version = "1.0" encoding = "UTF-8"? >
< contact >
John < FirstName > < / name >
< name > Smith < / LastName >
< / contact >

Log file:

value used for the parameter LINES increased from 64 to 24
Sheet 2: Cast - all null columns.

Thank you

Try again with the CHARACTERSET UTF8 in your control file.
For example

LOAD DATA
CHARACTERSET UTF8
infile * "str''"
....

Tags: Database

Similar Questions

  • 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)

  • Pls help: SQL Loader support only a single record

    Hello!!!

    I'm trying to insert data into a table using SQL Loader.

    I entered on the command line,

    > sqlldr userid = abc\abc control = "contrl_file_name.ctl."

    It does not perform any operation and simply crashes... table does no data... no data in the log file...

    It simply shows the SQL Loader Release... production... Copyright messages and do not stop.

    Am new on SQL loader... Kindly help

    *************************************************************

    Another problem:

    I have my file loading_data.dat with multiple entries as below which are records to be inserted for a single column in my table.

    233207332711 < EOFD > < EORD > 233208660745 < EOFD > < EORD > 233200767380 < EOFD > < EORD >...

    My control file is like this:

    data continue_load

    INFILE loading_data.dat '.

    Insert

    in table T1

    fields terminated by '< EOFD > < EORD >.

    (msisdn)

    When I execute the following statement of sqlldr, he inserts a single record and says loading completed - logical number of records 1.

    Why my other documents are not get inserted?

    Post edited by: 3cd7ad85-b56c-4a9c-ae91-83be047aac2c

    Continue_load can only be used with direct path, unconventional path.  You must specify the record terminator and terminator of field, which is the same when your data are only a single column.  Please see the example below.  As for your digital problem, as you can see, it does not reproduce below.  Your problem could be due to many things.  He might try to read something else that what you think, he tries to read, because of something else being wrong.  It is possible that you need to use:

    (msisdn "to_number (ltrim (rtrim (: msisdn)))")

    to remove the leading and trailing spaces and convert it to a number.  You must provide a copy and pasting a full example, as I did below.

    -loading_data.dat content:

    233207332711 233208660745 233200767380

    -control_file_name.ctl:

    load data

    INFILE loading_data.dat "str"".

    Insert

    in table T1

    fields terminated by ' '.

    (msisdn)

    Scott@orcl12c_11gR2 > create table t1 (msisdn number)

    2.

    Table created.

    Scott@orcl12c_11gR2 > host sqlldr scott/tiger control = control_file_name.ctl log = test.log

    Scott@orcl12c_11gR2 > numLargeur 20 the value

    Scott@orcl12c_11gR2 > select * from t1

    2.

    MSISDN

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

    233207332711

    233208660745

    233200767380

    3 selected lines.

  • SQL * Loader - rejected records - error on table ORA-01722: invalid number

    Get the following errors:

    Please tell me where I'm wrong?
    The log file and extracts the data file with the control file is attached.
    Also guide me please how I can download 4900 files at once?

    -------------------------------------
    SQL * Loader: release 11.1.0.7.0 - Production on Fri 14 Oct 03:06:06 2011

    Copyright (c) 1982, 2007, Oracle. All rights reserved.

    Control file: sample.ctl
    Data file: Cities.csv
    Bad leadership: Cities.bad
    Discard File: none is specified

    (Allow all releases)

    Number of loading: ALL
    Number of jump: 0
    Authorized errors: 50
    Link table: 64 lines, maximum of 256000 bytes
    Continuation of the debate: none is specified
    Path used: classics

    Table CITY, loaded from every logical record.
    Insert the option in effect for this table: INSERT

    Column Position Len term Encl. Datatype name
    ------------------------------ ---------- ----- ---- ---- ---------------------
    FIRST ID *, CHARACTER
    35. ACCORDING TO NAME, ' CHARACTER
    COUNTRYCODE 3, ' CHARACTER
    THE NEXT POPULATION * CHARACTER WHT

    Sheet 1: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 2: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 3: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Folder 4: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 5: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 6: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 7: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 8: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    File 9: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Case 10: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Factsheet 11: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 12: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    File 13: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Fact sheet 14: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Fact sheet 15: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 16: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    File 17: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 18: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    File 19: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 20: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 21: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Account 22: rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 23: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record number of 24: rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 25: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Fact sheet 26: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Fact sheet 27: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 28: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 29: rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 30: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record of 31: rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    • Statement 32: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 33: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Page 34: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 35: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 36: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 37: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 38: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 39: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 40: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 41: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Page 42: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 43: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Sheet 44: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 45: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    • Statement 46: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 47: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 48: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 49: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Page 50: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number

    Record 51: Rejected - error on the table CITY, POPULATION column.
    ORA-01722: invalid number


    NUMBER of MAXIMUM ERRORS EXCEEDED - above the statistics reflect partial performance.

    CITY table:
    0 rows successfully loaded.
    51 lines not filled due to data errors.
    0 rows not loading because all WHEN clauses were failed.
    0 rows not populated because all fields are null.


    The space allocated to bind table: 35840 bytes (64 lines)
    Bytes of read buffer: 1048576

    Total logical records ignored: 0
    Total logical records read: 64
    Total rejected logical records: 51
    Total logical records ignored: 0

    Run started on Fri 14 Oct 03:06:06 2011
    Run finished Fri Oct 14 03:06:12 2011

    Time was: 00:00:06.18
    Time processor was: 00:00:00.03



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

    my control file (sample.ctl):

    Load data infile 'Cities.csv '.
    in the town of table
    fields completed by «,»
    (external id integer,
    char (35) name box by ' ', '
    CountryCode tank (3) box by ' ', '
    external population integer terminated by '\n '.
    )

    my data (Cities.csv) file (it contains 4900 documents, but I show 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!

    Watch when I have a little change your database as follows

    1,'Kabul','AFG',1780000
    2,'Qandahar','AFG','237500'
    3,'Herat','AFG','186800'  
    

    I got the same error (last 2 rows rejected for the same number invalid error)

    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.09
    

    Value of the population within the data file must be a number

    Best regards

    Mohamed Houri

  • SQL loader is loading only one record

    I use SQL loader to load a CSV file into database

    sqlldr CON CONTROL = 'test.ctl' = 'TEST.log' = bad "bad.bad" LOG DATA = ' test. DAT'

    How ever I always only one record

    CTL file

    OPTIONS (ERRORS = 50)

    DOWNLOAD THE DATA

    ADD

    CONTINUEIF NEXT(1:1) = ' # '.

    IN TABLEtest

    FIELDS TERMINATED BY' '

    SURROUNDED OF POSSIBLY ' "" ' AND ' "'"

    TRAILING NULLCOLS)

    "Etest_ID" (27) TANK.

    'test_IND' CHAR (8),

    'test_SUB_IND' CHAR (12),

    "test_GIND1" TANK (9).

    "test_GIND2" TANK (9).

    'test_STATUS' CHAR (11),

    'test_STATUS' CHAR (11),

    'test_AMOUNT1' CHAR (14).

    'test_AMOUNT2' CHAR (14).

    'test_AMOUNT3' CHAR (14).

    'test_AMOUNT4' CHAR (14).

    "test_GIND21" TANK (9).

    "tet_GIND3" TANK (9).

    'test_STATUS1' CHAR (11),

    'test_STATUS2' CHAR (11),

    'test_AMOUNT1' CHAR (14).

    'test_AMOUNT2' CHAR (14).

    "test_FLAG" TANK (9).

    'test_USED_FLAG' CHAR (15).

    "test_FLAG" TANK (9).

    'TtestL_TRF_AMOUNT' CHAR (16).

    'testF_DATE' CHAR (8),

    'test_STATUS' CHAR (14))

    data file

    'AB00431MT00377_110915_00000 '."PP"."    "« Y »« Y »'TRAN '."FAILURE."'00000008667.15 '.'00000000000.00 '.'00000000000.00 '.'00000000000.00 '.« Y »« Y »'ZERO '.'ZERO '.'00000000000.00 '.'00000000000.00 '.« Y »« Y »" "'00000008667.15 '.'2111014 '.« S »
    'AB00431MT00377_110915_00000 '."PP"."    "« Y »" "'ZERO '."    "'00000000000.00 '.'00000000000.00 '.'00000000000.00 '.'00000000000.00 '.« Y »" "'ZERO '."    "'00000000000.00 '.'00000000000.00 '.« Y »" "" "'00000000000.00 '."0000000".« R »

    Help, please

    I tried generating CTL gall in various Noah this option worked. It is urgent please help

  • SQL * Loader vs external tables to a single file with several types of records (intercalated)

    I have a file of sample data (we will have the a 'true' at a later date and put in day after that) which includes a header, footer, and 5 types of records, that have different columns and lengths, noticed by the first two characters. The different types of records are not all together. On the contrary, some (in particular, two of these types in this example) are intertwined. I am currently working on a SQL * Loader configuration file when it was suggested that I use external tables. I know very little of either, then I would ask what is the best to use.

    Scott@orcl12c > host type test.dat

    header line

    AB, 123, efg

    CD, hij, 456

    Scott@orcl12c > type host test.ctl

    options (Skip = 1)

    load data

    in the ab table truncate where table_name = 'ab'

    fields ended by ',' trailing nullcols

    (table_name filler position (1), col1, col2)

    in the cd table add where table_name = 'cd'

    fields ended by ',' trailing nullcols

    (table_name filler position (1), col3, col4)

    Scott@orcl12c > create table ab

    2 (col1 number,

    3 col2 varchar2 (8))

    4.

    Table created.

    Scott@orcl12c > insert into ab values (1, 'old data')

    2.

    1 line of creation.

    Scott@orcl12c > create table cd

    2 (col3 varchar2 (8))

    3 col4 number)

    4.

    Table created.

    Scott@orcl12c > insert into cd values ("old data", 1).

    2.

    1 line of creation.

    Scott@orcl12c > commit

    2.

    Validation complete.

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

    SQL * Loader: release 12.1.0.1.0 - Production on Thu Mar 27 13:11:47 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 AB:

    1 row loaded successfully.

    Table D:

    1 row loaded successfully.

    Check the log file:

    test.log

    For more information on the charge.

    Scott@orcl12c > select * AB

    2.

    COL1 COL2

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

    EFG 123

    1 selected line.

    Scott@orcl12c > select * from cd

    2.

    COL3 COL4

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

    old data 1

    hij 456

    2 selected lines.

  • Issue when inserting records from sql loader

    Hello
    I'm trying to insert record of sql loader, but it's inclusion only a row.
    Help, please.

    Check the log file of causes.

  • Associating a header for his record in detail record in SQL Loader

    I have a SQL loader script that loads the data in 2 separate tables, a table containing the header and one giving details. Once the charge is completed there is no way of knowing what element is associated with his header.
    Is there a way to associate a header record with its corresponding details?

    Published by: 934858 on May 16, 2012 16:49

    >
    2. the header and detail have the item number in the column
    >
    So I expect that 'Article number' provides the association.

    If this isn't the case, then show the header and detail DDL table and some sample data and remember where is the problem.

    This is why I am asking about (and you do not answer) how data loading; a single file or two, flat or hierarchical, files etc. to see how your sql * control of loading script dealt with data.

  • Extraction of multiple logical records through sql loader

    Hello gurus,
    I have a few questions about the sql loader. I m totally new to this, I've never used, this is the first time that I m using

    1.
    How can I find the position of the character number or a number? I have to physically count the position? is it textpad metering or usage in a specific way to do this?
    I know it sounds like a silly question... but I wanted to know if there is a better way to do

    2.
    example data 
    
    1119 Smith      1120 Yvonne 
    1121 Albert     1130 Thomas 
    
    The following control file extracts the logical records:
    
    INTO TABLE emp 
         (empno POSITION(1:4)  INTEGER EXTERNAL, 
          ename POSITION(6:15) CHAR) 
    INTO TABLE emp 
         (empno POSITION(17:20) INTEGER EXTERNAL, 
          ename POSITION(21:30) CHAR)
    ---

    2 can it please contact what is the "null deptno = white if"? "»
    deptno POSITION(1:2)  INTEGER EXTERNAL(2)
                  NULLIF deptno=BLANKS,
    I really appriciate it ~
    Thank you

    Hello

    The NULLIF means white load as NULL

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14215/ldr_field_list.htm#sthref1129

    Not sure I understand your first question. Of course you know the file format, TextPad might be an ok tool to determine this format for a fixed-width file.

    Concerning
    Peter

  • SQL Loader for single registration repetitive data reading

    Hello

    I have my incoming data as follows:
    NAME, ID, Date1, Date2, Date3 Date4
    AST1_IDX1_EXCH_SERIES1, TD234512, (20070314,130000,112.5), (20070313,120000,112), (20070312,130000,116), (20070309,130000,115)
    AST2_IDX2_EXCH_SERIES2, TD234524, (20070314,130000,123.5), (20070313,120000,120.9), (20070312,130000,126.1), (20070309,130000,135.2)

    I have my DB such as:
    Create table (FACTOR)
    NAME VARCHAR2 (50).
    ID VARCHAR2 (20).
    DATE OF CLOSE_DATE,
    NUMBER OF CLOSE_TIME
    CLOSE_VALUE NUMBER (20,10)
    )

    I want to load the data so that the first two values go in columns (NAME, ID) and the other triplets go to the fields (CLOSE_DATE, CLOSE_TIME, CLOSE_VALUE) several times depending on the number of those present triplets. Is it possible to do so using SQL Loader?

    I'm trying to load this file (containing approximately 40000 these records) using SQL loader and tried options using CONTINUEIF, OBJECT of COLUMN, etc. but nothing works for me. Guidance in this regard will be highly appreciated.

    Thank you
    POOJA
  • Trouble with the adapter SQL Loader

    Hi all

    I'm trying to sue the adapter SQL Loader to collect my SQL server instance performance statistics.  I followed the instructions in Appendix A of this document: https://www.vmware.com/files/pdf/solutions/Monitoring-Business-Critical-Applications-VMware-vCenter-Operations-Manager-white-paper.pdf

    Our environment is one vCOps 5.8 vCloud Suite Enterprise license licensed.  SQL server SQL 2008 R2 and is reasonably up-to-date on patches, etc.  (CUA8, I think)

    I've gotten to the point where the database is logged in and my query is running, but it seems that the values returned by the query correspond to default values (0).  I don't know why this is happening, but because the newspapers seem to show the actual values from the database:

    2014-02-10 17:29:50, 438 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - #SELECT "SQL LOADER" ADAPTERKIND, query

    "SQL Server PERFMON STATS" RESOURCEKIND,.

    GETUTCDATE() TIMESTAMP,

    'Agent' RESOURCEKIND,

    "SVC-mgmt-sql SQL Server" RESOURCENAME,.

    (LTRIM (RTRIM (replace ([parameter], ':', '-'))) + "|" + counter_name) METRICNAME1,

    Sum (cntr_value) VALUE1

    FROM sys.dm_os_performance_counters

    WHERE

    (GETUTCDATE() > = (CONVERT (datetime, ' 02/10/2014 17:9:0 ', 101))) AND

    (' 01 / 01/2000 ' < (CONVERT (datetime, ' 02/10/2014-17:29:50 ', 101))) AND

    counter_name in)

    "User connections"

    "Compilations SQL/s."

    "SQL Recompilations/sec."

    "Server memory target (KB)"

    "Total server memory (KB)"

    "Scriptures delayed/s."

    "Checkpoint pages/sec.

    "Page life expectancy."

    'Memory waiting requests',

    "IO Page lock expects."

    "Wait worker."

    "Writing waiting to connect."

    "IO expects network")

    GROUP BY (LTRIM (RTRIM (replace ([parameter], ':', '-'))) + "|" + counter_name)

    ORDER OF TIMESTAMP

    2014-02-10 17:29:50, 467 com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB DEBUG [Collector worker thread 8] (20583) - try to connect...

    2014-02-10 17:29:50, 478 com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB DEBUG [Collector worker thread 8] (20583) - connected...

    2014-02-10 17:29:50, 490 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - QueryExecutionTime = 12

    2014-02-10 17:29:50, 509 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - strMetricCount = 0

    2014-02-10 17:29:50, 533 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getResourceKeyFromResultSet (20583) - work on resource: SVC - mgmt - sql SQL Server

    2014-02-10 17:29:50, 538 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.isResourceRenameAllowed - rename audit allowed for resource key {resourceName = SVC - mgmt - sql SQL Server & adapterKindKey = SQL LOADER & resourceKindKey = SQL Server PERFORMANCE Monitor STATS}

    2014-02-10 17:29:50, 571 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - resource of treatment: SVC-mgmt-sql SQL Server extract the metric values are 12921

    2014-02-10 17:29:50, 612 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getResourceKeyFromResultSet (20583) - work on resource: SVC - mgmt - sql SQL Server

    2014-02-10 17:29:50, 624 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.isResourceRenameAllowed - rename audit allowed for resource key {resourceName = SVC - mgmt - sql SQL Server & adapterKindKey = SQL LOADER & resourceKindKey = SQL Server PERFORMANCE Monitor STATS}

    2014-02-10 17:29:50, 624 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - resource of treatment: SVC-mgmt-sql SQL Server extract the metric values are 10

    2014-02-10 17:29:50, 626 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getResourceKeyFromResultSet (20583) - work on resource: SVC - mgmt - sql SQL Server

    2014-02-10 17:29:50, 626 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.isResourceRenameAllowed - rename audit allowed for resource key {resourceName = SVC - mgmt - sql SQL Server & adapterKindKey = SQL LOADER & resourceKindKey = SQL Server PERFORMANCE Monitor STATS}

    2014-02-10 17:29:50, 626 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - resource of treatment: SVC-mgmt-sql SQL Server extract the metric values are 72869

    2014-02-10 17:29:50, 626 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getResourceKeyFromResultSet (20583) - work on resource: SVC - mgmt - sql SQL Server

    2014-02-10 17:29:50, 626 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.isResourceRenameAllowed - rename audit allowed for resource key {resourceName = SVC - mgmt - sql SQL Server & adapterKindKey = SQL LOADER & resourceKindKey = SQL Server PERFORMANCE Monitor STATS}

    2014-02-10 17:29:50, 626 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - resource of treatment: SVC-mgmt-sql SQL Server extract the metric values are 17

    2014-02-10 17:29:50, 627 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getResourceKeyFromResultSet (20583) - work on resource: SVC - mgmt - sql SQL Server

    2014-02-10 17:29:50, 627 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.isResourceRenameAllowed - rename audit allowed for resource key {resourceName = SVC - mgmt - sql SQL Server & adapterKindKey = SQL LOADER & resourceKindKey = SQL Server PERFORMANCE Monitor STATS}

    2014-02-10 17:29:50, 627 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - resource of treatment: SVC-mgmt-sql SQL Server extract the metric values are 72869

    2014-02-10 17:29:50, 627 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getResourceKeyFromResultSet (20583) - work on resource: SVC - mgmt - sql SQL Server

    2014-02-10 17:29:50, 628 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.isResourceRenameAllowed - rename audit allowed for resource key {resourceName = SVC - mgmt - sql SQL Server & adapterKindKey = SQL LOADER & resourceKindKey = SQL Server PERFORMANCE Monitor STATS}

    2014-02-10 17:29:50, 628 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - resource of treatment: SVC-mgmt-sql SQL Server extract the metric values are 10644

    2014-02-10 17:29:50, 628 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getResourceKeyFromResultSet (20583) - work on resource: SVC - mgmt - sql SQL Server

    2014-02-10 17:29:50, 628 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.isResourceRenameAllowed - rename audit allowed for resource key {resourceName = SVC - mgmt - sql SQL Server & adapterKindKey = SQL LOADER & resourceKindKey = SQL Server PERFORMANCE Monitor STATS}

    2014-02-10 17:29:50, 628 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - resource of treatment: SVC-mgmt-sql SQL Server extract the metric values are 77

    2014-02-10 17:29:50, 629 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getResourceKeyFromResultSet (20583) - work on resource: SVC - mgmt - sql SQL Server

    2014-02-10 17:29:50, 629 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.isResourceRenameAllowed - rename audit allowed for resource key {resourceName = SVC - mgmt - sql SQL Server & adapterKindKey = SQL LOADER & resourceKindKey = SQL Server PERFORMANCE Monitor STATS}

    2014-02-10 17:29:50, 629 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - resource of treatment: SVC-mgmt-sql SQL Server extract the metric values are 0

    2014-02-10 17:29:50, 629 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getResourceKeyFromResultSet (20583) - work on resource: SVC - mgmt - sql SQL Server

    2014-02-10 17:29:50, 629 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.isResourceRenameAllowed - rename audit allowed for resource key {resourceName = SVC - mgmt - sql SQL Server & adapterKindKey = SQL LOADER & resourceKindKey = SQL Server PERFORMANCE Monitor STATS}

    2014-02-10 17:29:50, 630 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - resource of treatment: SVC-mgmt-sql SQL Server extract the metric values are 425692

    2014-02-10 17:29:50, 630 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getResourceKeyFromResultSet (20583) - work on resource: SVC - mgmt - sql SQL Server

    2014-02-10 17:29:50, 630 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.isResourceRenameAllowed - rename audit allowed for resource key {resourceName = SVC - mgmt - sql SQL Server & adapterKindKey = SQL LOADER & resourceKindKey = SQL Server PERFORMANCE Monitor STATS}

    2014-02-10 17:29:50, 630 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - resource of treatment: SVC-mgmt-sql SQL Server extract the metric values are 11747062

    2014-02-10 17:29:50, 630 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getResourceKeyFromResultSet (20583) - work on resource: SVC - mgmt - sql SQL Server

    2014-02-10 17:29:50, 631 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.isResourceRenameAllowed - rename audit allowed for resource key {resourceName = SVC - mgmt - sql SQL Server & adapterKindKey = SQL LOADER & resourceKindKey = SQL Server PERFORMANCE Monitor STATS}

    2014-02-10 17:29:50, 631 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - resource of treatment: SVC-mgmt-sql SQL Server extract the metric values are 29360128

    2014-02-10 17:29:50, 631 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getResourceKeyFromResultSet (20583) - work on resource: SVC - mgmt - sql SQL Server

    2014-02-10 17:29:50, 631 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.isResourceRenameAllowed - rename audit allowed for resource key {resourceName = SVC - mgmt - sql SQL Server & adapterKindKey = SQL LOADER & resourceKindKey = SQL Server PERFORMANCE Monitor STATS}

    2014-02-10 17:29:50, 631 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - resource of treatment: SVC-mgmt-sql SQL Server extract the metric values are 29360128

    2014-02-10 17:29:50, 632 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getResourceKeyFromResultSet (20583) - work on resource: SVC - mgmt - sql SQL Server

    2014-02-10 17:29:50, 632 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.isResourceRenameAllowed - rename audit allowed for resource key {resourceName = SVC - mgmt - sql SQL Server & adapterKindKey = SQL LOADER & resourceKindKey = SQL Server PERFORMANCE Monitor STATS}

    2014-02-10 17:29:50, 632 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - resource of treatment: SVC-mgmt-sql SQL Server extract the metric values are 0

    2014-02-10 17:29:50, 632 DEBUG [Collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB (20583) - number of records processed 13 - used memory (MB): free Mem in 1757 (Mo): 1104

    2014-02-10 17:29:50, 632 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.getDataFromDB - for request #= "SQL LOADER' SELECT ADAPTERKIND,.

    "SQL Server PERFMON STATS" RESOURCEKIND,.

    GETUTCDATE() TIMESTAMP,

    'Agent' RESOURCEKIND,

    "SVC-mgmt-sql SQL Server" RESOURCENAME,.

    (LTRIM (RTRIM (replace ([parameter], ':', '-'))) + "|" + counter_name) METRICNAME1,

    Sum (cntr_value) VALUE1

    FROM sys.dm_os_performance_counters

    WHERE

    (GETUTCDATE() > = %f)) AND

    (' 01 / 01/2000 ' < %t)) AND

    counter_name in)

    "User connections"

    "Compilations SQL/s."

    "SQL Recompilations/sec."

    "Server memory target (KB)"

    "Total server memory (KB)"

    "Scriptures delayed/s."

    "Checkpoint pages/sec.

    "Page life expectancy."

    'Memory waiting requests',

    "IO Page lock expects."

    "Wait worker."

    "Writing waiting to connect."

    "IO expects network")

    GROUP BY (LTRIM (RTRIM (replace ([parameter], ':', '-'))) + "|" + counter_name)

    ORDER OF TIMESTAMP

    RecordCount = 13 FilteredRecordCount = 0

    2014-02-10 17:29:50, 632 DEBUG [Collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.addDefaultData - Default Metrics size after a data loop = 13

    2014-02-10 17:29:50, 633 INFO [collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.addDefaultData - number of default values for this piece of data = 13

    2014-02-10 17:29:50, 633 INFO [collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.DataReader.read - 26 returned query parameters

    2014-02-10 17:29:50, 634 INFO [collector worker thread 8] com.integrien.adapter3.generalsqldataloader.DataReader.updateResourceTimeMapAndRemoveDuplicates (20583) - 26 data 0 resource comments who have been sent the last time.

    2014-02-10 17:29:50, 634 INFO [collector worker thread 8] (20583) com.integrien.adapter3.generalsqldataloader.GeneralSQLDataLoaderAdapter.groupByResource - grouping of resources

    2014-02-10 17:29:50, 634 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 634 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 634 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 634 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 634 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 634 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 634 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 634 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 635 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 635 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 635 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 635 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 635 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 635 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 635 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 635 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 635 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 635 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 636 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 636 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 636 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 636 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 636 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 636 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 636 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2014-02-10 17:29:50, 636 DEBUG [Collector worker thread 8] (20583) com.integrien.alive.common.adapter3.AdapterBase.addMetricData - 1 added metrics to collect the result for the "SVC - mgmt - sql SQL Server" resource, resId = 20584, adapter "GeneralSQLDataLoaderAdapter".

    2

    Has anyone out there dealt with this or found a way around this kind of problem?  There only seems to be a lot of information regarding the use of this (or of the) adapters.

    Thank you

    Jason

    IS to use the option you gave.

    Looks like that time is not the same timezone between solutions if he just started working after 5 to 6 hours. Make sure you that you don't need to use a different zone such as GMT.

  • SQL Loader Help in 10g

    Hello

    Is it possible to abort the sql loader with force when a value is not present? I have data like this file

    1. XXX123 | XXX | 20121121 |
    4. XXX123 | XXX |
    5. XXX123 | XXX | 1.
    5. XXX123 | XXX | 2.
    5. XXX123 | XXX |
    9. XXX123 | XXX |

    Model:
    record type | Batch number. lot desc | date | detail line num | other

    1,4,5,9 are the types of records, if you see this line 5. XXX123 | XXX | 1| .. 1 represents a number of detail line, my requirement is if the number of detail line is null for the record type 5 then I want to abort the sqlloader.

    Is this possible?

    Published by: 940838 on November 21, 2012 23:54

    940838 wrote:
    I think that I am not clear in my requirement...

    The question was how to abort the charger if the number of detail line is not present in the record type 5. It is, however, normal detailing line num is not required for other types of records. points of view.

    Hello

    you were clear, and I did a quick test. Unfortunately you can not do this check in SQL * Loader as the WHEN in the control file clause allows not just GOLD.

    Even if you add this check using a constraint in your table and specify the maximum number of errors to 0, SQL * Loader will load the files until this error.

    Let me show you an example:

    (1) create a table with a constraint that, for record_type detail_line_number 5, may not be null.

    CREATE TABLE test
    (
       record_type    INTEGER
     , batch_number   VARCHAR2 (10)
     , batch_desc     VARCHAR2 (10)
     , batch_date     DATE
     , detail_line_num INTEGER
     , other          VARCHAR2 (10)
    );
    
    ALTER TABLE test
      ADD CONSTRAINT check_rec_5
         CHECK (   record_type = 5 AND detail_line_num IS NOT NULL
                OR record_type != 5) ENABLE;
                
    

    In this table, you will not be able to load lines with a record_type = 5 and NULL detail_line_num as this will be considered an error.

    We will prepare your input file:

    1|XXX123|XXX|20121121||
    4|XXX123|XXX|||
    5|XXX123|XXX||1|
    5|XXX123|XXX|||
    5|XXX123|XXX|||
    9|XXX123|XXX|||
    1|XXX123|XXX|20121121||
    4|XXX123|XXX|||
    5|XXX123|XXX||1|
    5|XXX123|XXX||2|
    5|XXX123|XXX|||
    9|XXX123|XXX|||1|XXX123|XXX|20121121||
    4|XXX123|XXX|||
    5|XXX123|XXX||1|
    5|XXX123|XXX||2|
    5|XXX123|XXX|||
    9|XXX123|XXX|||1|XXX123|XXX|20121121||
    4|XXX123|XXX|||
    5|XXX123|XXX||1|
    5|XXX123|XXX||2|
    

    As you can see that the input file has the fourth line with record_type = 5 and detail_line_num NULL. It is a mistake of the constraint.

    Here I used the control file:

    --test.ctl
    load data
    INFILE 'test.dat'
    APPEND
    INTO TABLE test
    FIELDS TERMINATED BY '|'
    TRAILING NULLCOLS
    (
     record_type     ,
     batch_number    ,
     batch_desc      ,
     batch_date      Date 'YYYYMMDD',
     detail_line_num ,
     other
    )
    

    If I try to run the SQL * Loader and ask to stop at the first error in this way:

    sqlldr userid=yourname/yourpass@yourdb control=test.ctl errors=0 rows=100
    

    SQL * Loader performs only 3 folders because it encounters an error in line 4 and having specified errors = 0 will not continue to load. In fact, the process will continue until she reached the point of validation (in this case 100 lines), but it is not loading any record after the error, or continue to read the file.

    So, if I check the table

    SELECT * FROM test;
    
    RECORD_TYPE BATCH_NUMBER BATCH_DESC BATCH_DATE            DETAIL_LINE_NUM OTHER
    ----------- ------------ ---------- --------------------- --------------- ----------
              1 XXX123       XXX        21-11-2012 00:00:00
              4 XXX123       XXX
              5 XXX123       XXX                                            1           
    

    You will only see the records until you have reached the error.

    This can be avoided, as documented in SQL * Loader manual reference:

    Load interrupted because they exceeded the maximum number of errors


    If the maximum number of errors is exceeded, SQL * Loader stops loading documents in any table and the work accomplished so far is committed.

    As you can see SQL * Loader to interrupt the treatment, but it engage in any case files until this error.

    Another solution is to create an external table in Oracle and do all the checks you want before you copy your table in a database table, as suggested BluShadow.

    Kind regards.
    Al

  • Error loading XML file in the column of XMLTYPE through SQL loader

    Hi gurus,

    I am trying to load the XML file into the column of XMLTYPE through SQL Loader but the errors themselves. Here are the details

    Databases
    SQL*Plus: Release 10.2.0.3.0 - Production on Tue Jul 24 17:17:55 2012
    
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    
    
    Connected to:
    Oracle Database 10g Release 10.2.0.3.0 - 64bit Production
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Release 10.2.0.3.0 - 64bit Production
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for Linux: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    The table structure
    CREATE TABLE TH_XML
    (
      COL_ID_1   VARCHAR2(100 BYTE),
      IN_FILE_1  XMLTYPE
    )
    XMLTYPE IN_FILE_1 STORE AS CLOB (TABLESPACE SMDAT)
    XML (simple.xml) file
    <?xml version="1.0"?>
     <catalog> 
     <book id="bk101"> 
               <author>Some Author1</author> 
               <title>Some Title1</title> 
               <genre>Computer</genre> 
               <price>44.95</price> 
               <publish_date>2000-10-01</publish_date> 
               <description>creating applications</description> 
       </book> 
       <book id="bk112"> 
               <author>Some Author2</author> 
               <title>Some Title2</title> 
               <genre>Computer</genre> 
               <price>49.95</price> 
               <publish_date>2001-04-16</publish_date> 
               <description>Microsoft Visual Studio 7 is explored in depth</description> 
    </book> 
    </catalog>
    Control file
    LOAD DATA
    INFILE 'c:\simple.xml'
    APPEND
    INTO TABLE TH_XML 
    XMLTYPE(in_file_1)
    (
    col_id_1 filler  CHAR (100),
    in_file_1 LOBFILE(CONSTANT "c:\simple.xml") TERMINATED BY EOF
    )
    LOG file
    SQL*Loader: Release 10.2.0.3.0 - Production on Tue Jul 24 16:42:25 2012
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    Control File:   c:\my_file.ctl
    Data File:      c:\simple.xml
      Bad File:     c:\simple.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 TH_XML, loaded from every logical record.
    Insert option in effect for this table: APPEND
    
       Column Name                  Position   Len  Term Encl Datatype
    ------------------------------ ---------- ----- ---- ---- ---------------------
    COL_ID_1                            FIRST   100           CHARACTER            
      (FILLER FIELD)
    IN_FILE_1                         DERIVED     *  EOF      CHARACTER            
        Static LOBFILE.  Filename is c:\simple.xml
    
    Record 1: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 2: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 3: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 4: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 5: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 6: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 7: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 8: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 9: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 10: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 11: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 12: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 13: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 14: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 15: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 16: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 17: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 18: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 19: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 20: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 21: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 22: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    Record 23: Rejected - Error on table TH_XML.
    ORA-00904: "SYS_NC_ROWINFO$": invalid identifier
    
    
    Table TH_XML:
      0 Rows successfully loaded.
      23 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:                    256 bytes(64 rows)
    Read   buffer bytes: 1048576
    
    Total logical records skipped:          0
    Total logical records read:            23
    Total logical records rejected:        23
    Total logical records discarded:        0
    
    Run began on Tue Jul 24 16:42:25 2012
    Run ended on Tue Jul 24 16:42:26 2012
    
    Elapsed time was:     00:00:00.23
    CPU time was:         00:00:00.05
    I get error ORA-00904: "SYS_NC_ROWINFO$": invalid identifier in the logfile (mentioned above). Could someone help me know where I am doing wrong?

    Thanks in advance.

    Published by: 876991 on 24 July 2012 14:18

    Hello

    This remove the control file:

    XMLTYPE(in_file_1)
    

    It is used only if the target table is an array of XMLType object.

    For an XMLType column LOBFILE is sufficient, for example:

    LOAD DATA
    INFILE *
    APPEND INTO TABLE TH_XML
    (
     col_id_1  CHAR (100),
     in_file_1 LOBFILE(CONSTANT "c:\simple.xml") TERMINATED BY EOF
    )
    begindata
    MYID1
    

    It tells SQL * Loader data consisting of one record with COL_ID_1 = "MYID1" and content = "c:\simple.xml" IN_FILE_1

    SQL> CREATE TABLE TH_XML
      2  (
      3    COL_ID_1   VARCHAR2(100 BYTE),
      4    IN_FILE_1  XMLTYPE
      5  );
    
    Table created.
    
    SQL> host sqlldr control=test.ctl
    Username:dev
    Password:
    
    SQL*Loader: Release 11.2.0.2.0 - Production on Mer. Juil. 25 01:30:46 2012
    
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    
    Commit point reached - logical record count 1
    
    SQL> set long 5000
    SQL> column col_id_1 format a15
    SQL> select * from th_xml;
    
    COL_ID_1        IN_FILE_1
    --------------- --------------------------------------------------------------------------------
    MYID1           
                     
                     
                               Some Author1
                               Some Title1
                               Computer
                               44.95
                               2000-10-01
                               creating applications
                       
                       
                               Some Author2
                               Some Title2
                               Computer
                               49.95
                               2001-04-16
                               Microsoft Visual Studio 7 is explored in depth
                    
     
    
  • query SQL loader

    Hello

    I load a CSV for emp table data using sql loader.
    I wrote the control as file below. How to run so that the data can be inserted into the emp table.

    Control file:
    DOWNLOAD THE DATA
    INFILE ' C:\VINOD\EMP_DATA. CSV'
    INSERT INTO THE TABLE EMP
    FIELDS ENDED BY ',' POSSIBLY FRAMED BY "" "
    TRAILING NULLCOLS
    (ENO, ENAME, SAL);


    Thank you

    910575 wrote:
    Hello

    I load a CSV for emp table data using sql loader.
    I wrote the control as file below. How to run so that the data can be inserted into the emp table.

    Control file:
    DOWNLOAD THE DATA
    INFILE ' C:\VINOD\EMP_DATA. CSV'
    INSERT INTO THE TABLE EMP
    FIELDS ENDED BY ',' POSSIBLY FRAMED BY "" "
    TRAILING NULLCOLS
    (ENO, ENAME, SAL);

    Thank you

    bcm@bcm-laptop:~$ sqlldr 
    
    SQL*Loader: Release 11.2.0.1.0 - Production on Sun Jun 24 11:28:59 2012
    
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    
    Usage: SQLLDR keyword=value [,keyword=value,...]
    
    Valid Keywords:
    
        userid -- ORACLE username/password
       control -- control file name
           log -- log file name
           bad -- bad file name
          data -- data file name
       discard -- discard file name
    discardmax -- number of discards to allow          (Default all)
          skip -- number of logical records to skip    (Default 0)
          load -- number of logical records to load    (Default all)
        errors -- number of errors to allow            (Default 50)
          rows -- number of rows in conventional path bind array or between direct path data saves
                   (Default: Conventional path 64, Direct path all)
      bindsize -- size of conventional path bind array in bytes  (Default 256000)
        silent -- suppress messages during run (header,feedback,errors,discards,partitions)
        direct -- use direct path                      (Default FALSE)
       parfile -- parameter file: name of file that contains parameter specifications
      parallel -- do parallel load                     (Default FALSE)
          file -- file to allocate extents from
    skip_unusable_indexes -- disallow/allow unusable indexes or index partitions  (Default FALSE)
    skip_index_maintenance -- do not maintain indexes, mark affected indexes as unusable  (Default FALSE)
    commit_discontinued -- commit loaded rows when load is discontinued  (Default FALSE)
      readsize -- size of read buffer                  (Default 1048576)
    external_table -- use external table for load; NOT_USED, GENERATE_ONLY, EXECUTE  (Default NOT_USED)
    columnarrayrows -- number of rows for direct path column array  (Default 5000)
    streamsize -- size of direct path stream buffer in bytes  (Default 256000)
    multithreading -- use multithreading in direct path
     resumable -- enable or disable resumable for current session  (Default FALSE)
    resumable_name -- text string to help identify resumable statement
    resumable_timeout -- wait time (in seconds) for RESUMABLE  (Default 7200)
    date_cache -- size (in entries) of date conversion cache  (Default 1000)
    no_index_errors -- abort load on any index errors  (Default FALSE)
    
    PLEASE NOTE: Command-line parameters may be specified either by
    position or by keywords.  An example of the former case is 'sqlldr
    scott/tiger foo'; an example of the latter is 'sqlldr control=foo
    userid=scott/tiger'.  One may specify parameters by position before
    but not after parameters specified by keywords.  For example,
    'sqlldr scott/tiger control=foo logfile=log' is allowed, but
    'sqlldr scott/tiger control=foo log' is not, even though the
    position of the parameter 'log' is correct.
    

    alternative, you could always Read The Fine Manual

    http://docs.Oracle.com/CD/E11882_01/server.112/e22490/part_ldr.htm#i436326

  • How to call sql loader control file with in the pl/sql procedure

    Hi friends,

    I am doing a project in relation to the transfer data using queues. In the queue, I'll get a data delimited by tabs in the form of CLOB variable/message. I don't want to keep this dat in the oracle table.
    During the updating of the data in the table.

    1. don't want to write data to a file. (You want to access directly after the specific queue).

    2. as the data is in the form of delimited by tabs, I want to use sql loader concept.

    How can I call the ctrl charger sql file with in my pl/sql procedure. When I searched, most forums recommending the external procedure or a Java program.

    Please guide me on this issue. My preferrence is pl sql, but don't know the external procedure. If no other way, I'll try Java.

    I'm using oracle 9.2.0.8.0.

    Thanks in advance,
    Vimal...

    Or SQL * Loader, or external tables are designed to read data from a CLOB stored in the database. They both work on files stored on the file system. If you don't want the data to be written to a file, you have to roll your own parsing code. It is certainly possible. But it will be much less effective than SQL * Loader or external tables. And it is likely to lead to a little more code.

    The simplest possible thing that might work would be to use something like Tom Kyte string tokenization package to read a line in the CLOB, divide the component parts and save the different chips in a significant collection (i.e. an object type or a record type that matches the table definition). Of course, you need manage things like the conversion of strings to numbers or dates, rejecting the lines, writing to log files, etc.

    Justin

Maybe you are looking for