SQL*Loader job exits unexpectedly and causes table to be locked with NOWAIT

I have a weekly report job that I run where I have to load about 48 logs with about 750k rows of data in each log. To facilitate this, we have been using a Java job that runs SQL*Loader as an external Process (using ProcessBuilder), one after the other. Recently however, this process has been terminating abnormally during the load which is causing a lock on the table and basically causes the process to grind to a halt until we can open a ticket with the DB team to kill the session that is hung. Is there maybe a better way to handle this upload process than using SQL*Loader or is there some change I could make in either the control file or command line to stop it from dying a horrible death?
At the start of the process, I truncate the table that I'm loading to and then run this command line with the following control file:
COMMAND LINE:
C:\Oracle\ora92\BIN\SQLLDR.EXE userid=ID/PASS@DB_ID load=10000000 rows=100000 DIRECT=TRUE SKIP_INDEX_MAINTENANCE=TRUE control=ControlFile.ctl data=logfile.log
CONTROL FILE:
UNRECOVERABLE
Load DATA
INFILE *
Append
PRESERVE BLANKS
INTO TABLE MY_REPORT_TABLE
FIELDS TERMINATED BY ","
     filler_field1          FILLER char(16),
     filler_field2          FILLER char(16),
     time               TIMESTAMP 'MMDDYYYY-HH24MISSFF3' ENCLOSED BY '"',
     partne          ENCLOSED BY '"',
     trans               ENCLOSED BY '"',
     vendor          ENCLOSED BY '"' "SUBSTR(:vendor, 1, 1)",
     filler_field4          FILLER ENCLOSED BY '"',
     cache_hit_count,
     cache_get_count,
     wiz_trans_count,
     wiz_req_size,
     wiz_res_size,
     wiz_trans_time,
     dc_trans_time,
     hostname          ENCLOSED BY '"',
     trans_list          CHAR(2048) ENCLOSED BY '"' "SUBSTR(:trans_list, 1, 256)",
     timeouts,
     success ENCLOSED BY '"'
Once all of the logs have finished loading, I rebuild the indexes on the table and then start the report process. It seems like it's just dying on random logs now, re-running the process it will fail at a different point each time.
EDIT: The reasons for the UNRECOVERABLE and SKIP_INDEX_MAINTENANCE are to speed the load up. As it is, it still can take 7-12 minutes for each log to load, it's even worse without those on. Overall it's taking about 18 hours for this process to run from start to finish.
Edited by: user6676140 on Jul 7, 2011 11:37 AM

Please note that my post stated:  "I have opened a ticket with Oracle support. after 6 days have not had the help that I need."
I also agree that applying the latest PSU is a Best Practice, which Oracle defines as "a cumulative collection of high impact, low risk, and proven fixes for a specific product or component".
With that statement I feel there should not be the drastic issues that we have seen.  Our policy is to always apply PSUs, no matter what the product or component, without issue. 
Except for now.  We did our research, and only open an Oracle ticket when we need expert help.  That has not been forthcoming from them, but we are still working the ticket.
Hence, I opened this forum because many times I have found help here, where others have faced the same issue and now have an insight.  When having a serious problem I like to use all of my resources, this forum being one of those.
To restate the question:
(1)     97% of our databases reside on RAC.  From the Search List for Databases, we do not see the columns Sessions:CPU, Sessions: I/O, Sessions: Other, Instance CPU%, and are told this is working as designed because you must monitor the instance, not the database, with RAC. 
     (a) After applying PSU2 the Oracle Load Map no longer showed any databases. 
All of this in (1) is making the tool less useful for monitoring at the database level, which we do most of the time.
(2) Within a few days of applying PSU2, we couldn't log into EM and got the error "Authentication failed. If problem persists, contact your system administrator."
    (b) searching through the emoms.trc files we found the errors listed above posting frantically. 
After rolling back PSU we are back in business.
However, there is still the need to remain current with the components of EM.
I am looking for suggestion, insights, experience.  While I appreciate Akanksha answering so quickly, a recommendation to open an SR is not what I need.
Sherrie

Similar Messages

  • How to load data to dimensions and fact table is it simialr to sql server

    How to load data to dimensions and fact table in a data ware house environment, is it simialr to sql server, oracle?
    Never migrated or loaded data to datawarehouse server.
    I have an interview and am really confused if they ask anything related to the dataware house side elements.
    Coudl you please if you don't mind provide me some steps and dimension and fact table info, an example only.
    Atleast for my knowledge.
    Thank you very much for the helpful info.

    Some discussions in previous forums should help you
    http://forums.sdn.sap.com/thread.jspa?threadID=2019448
    http://forums.sdn.sap.com/thread.jspa?threadID=1908902
    In the SAP tutorial, you can see a sample example of making fact tables.
    http://help.sap.com/businessobject/product_guides/boexir32SP1/en/xi321_ds_tutorial_en.pdf
    Arun

  • How Can I Run a SQL Loader Job from Schedular

    How Can I Run a SQL Loader Job from Schedular , So that It Runs every Day.

    Depends on a couple of factors.
    If you are on a UNIX platform, you can create a shell script and schedule it with cron.
    If you are on a Windows platform, you can create a batch file and schedule it with the Windows scheduler.
    Or, if you are on Oracle 9i or 10g, you could use the external table feature instead of SQL*Loader. Then you could write a stored procedure to process the external table and schedule it using the Oracle scheduler (DBMS_JOB). This would probably be my preference.

  • SQL Loader - read 1st line to one table, rest of data to another

    Hi
    I looked around the FAQs and forums and find similar cases but not mine...
    I am running Oracle 9i and have a text file which has the 1st line as a control header and everything beneath it as data, something like this:
    14/07/2010|8
    12345678|0
    12345679|0
    12345680|10.87
    12345681|7655.8
    12345682|100
    12345683|0
    12345684|-90.44
    12345685|0
    The first (header) line has a date field and a counter (the number of records expected beneath it)
    The rest of the data is an account number and balance.
    Since SQL Loader is invoked outside of Oracle (Unix in my case) I assume I should create two tables, such as:
    Create table
    TIF_CURRENT_BALANCE_DTL
      ACCOUNT_REF_NO   VARCHAR2(30),  
      BALANCE_AMT      NUMBER(12,2)         
    Create table
    TIF_CURRENT_BALANCE_HDR
      HDR_DATE         DATE,  
      HDR_COUNT        NUMBER(10)
    );And use a control file which will load line 1 to TIF_CURRENT_BALANCE_HDR and other lines (SKIP=1) to TIF_CURRENT_BALANCE_DTL.
    Since the header/detail lines are not (necessarily) distinguishable, is there a way to achieve this, without modifying the input file in anyway?
    Thanks
    Martin

    Thanks for your reply - the solution should not be OS dependant as it will run on a Linux and UNIX installation.
    The DB will be (for now) Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
    I looked at that web page you provided and had some hope with the ROWS option, but this is the number of rows to load before each commit.
    Any other solutions?
    I know I could load it to a common table (text and number) and then convert the values accordingly in the PL/SQL procedure which will run afterwards, but I feel loading the data in the final format is going to be faster.
    I am considering using SQL Load to load records (SKIPping row 1) into the DTL table and within the PL.SQL loading the 1st record and performing validation. Since the file has approx 2million rows and is processed daily, 1.99999 million records read with SQL Loader and 1 with conventional methods will still be a vast improvement!
    Thanks

  • Running a SQL Loaded Job from Schedular

    How Can I Run a SQL Loader Job from Schedular ,
    Message was edited by:
    jus

    The trick is to create a wrapper script that is referred to by the PROGRAM object with arguments. The wrapper should do the work.
    /usr/local/bin/do_sqlldr.sh:
    #!/usr/bin/env ksh
    # setup actions
    sqlldr control=...
    Don't forget to check who is the owner of $ORACLE_HOME/bin/extjob and that the owner is available.
    My question is how this can be fitted in an DTAP environment where Developement and Test environment are on the same server and have the same job definitions. Development and Test should use different datafile and logfile locations.
    regards,
    Ronald
    http://ronr.nl/unix-dba

  • I have just downloaded OSX Yosemite and attempted to use photoshop CS5 but was prompted to install JavaForOSX2014-001dmg and now photoshop won't open saying ' an unexpected and unrecoverable problem has occurred.photoshop will now exit".  ??

    I have just downloaded OSX Yosemite and attempted to use photoshop CS5 but was prompted to install JavaForOSX2014-001dmg and now photoshop won't open saying ' an unexpected and unrecoverable problem has occurred.photoshop will now exit".  ??
    Can I revert to the older operating system?
    I am not familiar with tech speak, so plain english please. Thank you in advance.

    Do a backup, preferably 2.
    Revert to a Previous OS X
    Revert Yosemite to Mavericks

  • I created a book in iBooks Author using the Photo Book template. When I rotate to portrait orientation, the photo or widget disappears and a table of contents appears with only the interactive media showing.

    I created a book in iBooks Author using the Photo Book template. When I rotate to portrait orientation, the photo or widget disappears and a table of contents appears with only the interactive media showing.

    Thanx for the prompt response, KT. I have indeed seen that thread, only just after I posted the question.
    I have spent hours on the phone with what I now know is a call center in Texas on this question.
    I think Apple could be a little more "hands on" with iBooks Author users, and it should also be pointed out that landscape photos will not display in portrait mode.
    In my case, I used gallery widgets to display vertical photos, since they look better in portrait mode.
    But instead of simply rotating, the page disappears and a TOC of interactive media appears. The gallery behaves as expected when tapped. This is not what I expected, but since the gallery works, I can live with it.
    Right now I have "tickets" telling me to "fix" this "problem or to disable portrait mode.
    I don't want to disable portrait mode.
    Will Apple accept the books if I tell them this is not an "error?"

  • My iphone 4 got damp last night and this morning it is locked with a lock symbol in the upper right corner.  How do I unlock my phone?

    My iphone 4 got damp last night and this morning it is locked with a lock symbol in the upper right corner.  How do I unlock this so I can use my phone?

    The orientation lock was turned on by someone. See https://sites.google.com/site/appleclubfhs/support/advice-and-articles/locking-o rientation

  • SQL Loader Inserts chr(13) and chr(10) in the first column of every row.

    Hi,
    I have exported a data in a pipe delimited file using TOAD in one database. Now I want to load the data in my local database using SQL Loader. However every time I try to load the data a double quote followed by a new line is entered for the first column of each row. Unfortunately the delimited file is very big and hence can't be posted here. However I tried the same with a customized table and its data and found the same problem. Below are the table structures and control file that I used.
    create table test_sql
    a varchar2(30),
    b date
    insert into test_sql values('51146263',sysdate-3);
    insert into test_sql values('51146261,sysdate-1);
    EXPORTED PIPE DELIMITED FILE_
    A|B|!##!
    51146261|04/14/13 4:55:18 PM|!##!
    51146263|04/12/13 4:55:32 PM|!##!
    create table test_sql1 as select * from test_sql where 1=2;
    CONTROL FILE_
    OPTIONS(SKIP=1)
    LOAD DATA
    INFILE 'C:\Users\Prithwish\Desktop\Test.txt' "str '!##!'"
    PRESERVE BLANKS
    INTO TABLE TEST_SQL1
    FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    A CHAR(2000),
    B DATE "MM/DD/YYYY HH12:MI:SS AM"
    select * from TEST_SQL1;
    After this when I paste it in notepad I get the following result
    A B
    51146261"     14-APR-0013 16:55:18
    51146263"     12-APR-0013 16:55:32.
    I have no idea how the quotes or the newline appear. Is this a Toad bug? Any help would be greatly appreciated. Really urgent.
    Thanks in advance
    Regards

    Hi Harry,
    I actually thought that the str !##! was causing the problem. Actually my original export has some new lines in some specific columns so I can't keep the new line as my line terminator and hence I kept the !##! as my terminator.
    When I put the same data in a notepad and load it there is no problem at all. For e.g I just typed the following in a notepad and the data loaded just fine.
    A|B|!##!
    51146261|01-01-01 10:10:10 AM|!##!
    51146263|01-01-01 11:11:11 AM|!##!
    Its just when I load the exported file there the problem arises though I have verified the file using UNIX as well using octal dump and found no hidden characters.
    Regards,
    Prithwish

  • SQL Loader to append data in same table but using differnet WHEN clauses

    In my data file i have a header record and a detail record identified by Record_type = 1 and 2 respectively.
    The Database table has all the columns to capture detail records but i want to capture jus one column of header record now also in my existing table. So i have added that column (DATA_DATE)in my table but how to capture that value ?
    im writing my control file using two WHEN clauses, something like -
    load data
    into table t_bdn
    append
    when RECORD_TYPE = '2'
    FIELDS TERMINATED BY "|" TRAILING NULLCOLS
    SEQUENCE_NO
    , RECORD_TYPE
    , DISTRIBUTOR_CODE
    , SUPPLIER_CODE
    , SUPPLIER_DISTRIBUTOR_CODE
    , DISTRIBUTOR_SKU
    , SUPPLIER_SKU
    when RECORD_TYPE = '1'
    FIELDS TERMINATED BY "|" TRAILING NULLCOLS
    SEQUENCE_NO FILLER
    , RECORD_TYPE FILLER
    , CREATE_DATE FILLER
    , DATA_DATE "NVL(to_date(:DATA_DATE, 'YYYY/MM/DD'),to_date('9999/12/31', 'YYYY/MM/DD'))"
    im getting error " expecting INTO and foung WHEN RECORD_TYPE = '1' "
    if i give iNTO second time it will append a new row altogether in my table but i want the same row to be updated with this DATA_DATE value coming from RECORD_TYPE =1 and header record has 4 delimited data text fields only and i am interested in fetching just the 4th column..
    KIndly suggest what to do ?

    Ravneek, I could be wrong but sqlldr is a 'load' program, that is, it inserts data. I am unaware of any ability to update existing rows as you seem to want. What you appear to want to do is more the job of a merge statement.
    I would look at writing a pro* language, a .net, or a java program to perform inserts where some or all of the newly inserted rows are also to be updated.
    From the manual: (Oracle® Database Utilities 10g Release 2 (10.2) Part Number B14215-01)
    Updating Existing Rows
    The REPLACE method is a table replacement, not a replacement of individual rows. SQL*Loader does not update existing records, even if they have null columns. To update existing rows, use the following procedure:
    1. Load your data into a work table.
    2. Use the SQL language UPDATE statement with correlated subqueries.
    3. Drop the work table.
    HTH -- Mark D Powell --

  • Automate a sql loader job

    Hi,
    I need to automate schedule job to import excel files into Oracle tables using SQL Loader.
    Can any one please tell me how to do this?
    thanks
    Jenny

    Depends on a couple of factors.
    If you are on a UNIX platform, you can create a shell script and schedule it with cron.
    If you are on a Windows platform, you can create a batch file and schedule it with the Windows scheduler.
    Or, if you are on Oracle 9i or 10g, you could use the external table feature instead of SQL*Loader. Then you could write a stored procedure to process the external table and schedule it using the Oracle scheduler (DBMS_JOB). This would probably be my preference.

  • Creating SQL-Loader script for more than one table at a time

    Hi,
    I am using OMWB 2.0.2.0.0 with Oracle 8.1.7 and Sybase 11.9.
    It looks like I can create SQL-Loader scripts for all the tables
    or for one table at a time. If I want to create SQL-Loader
    scripts for 5-6 tables, I have to either create script for all
    the tables and then delete the unwanted tables or create the
    scripts for one table at a time and then merge them.
    Is there a simple way to create migration scripts for more than
    one but not all tables at a time?
    Thanks,
    Prashant Rane

    No there is no multi-select for creating SQL-Loader scripts.
    You can either create them separately or create them all and
    then discard the one you do not need.

  • SQL*LOADER, the WHEN clause and WILDCARDS

    has anybody ever used wildcards in a WHEN clause in the SQL*LOADER control file?
    WHEN string_2_load = 'GOOD' , all 'good' rows load
    WHEN string_2_load = 'GO%', all rows fail the WHEN clause and end up in the discard file.
    thanks in advance - if i don't go crazy first
    burt

    I have also faced a similar problem like this. Try this control file
    LOAD DATA
    INFILE 'DATA.dat'
    BADFILE 'MLIMA.bad'
    INTO TABLE Brok_Gl_Interface
    APPEND
    WHEN record_type = '10'
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    record_type CHAR ,
    currency CHAR ,
    entity CHAR ,
    cost_centre CHAR ,
    usd_account CHAR ,
    amount CHAR
    INTO TABLE Brok_Gl_Interface
    WHEN record_type = '99'
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    record_type POSITION(1) CHAR ,
    record_count CHAR
    INTO TABLE Brok_Gl_Interface
    WHEN record_type = '00'
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    record_type POSITION(1) CHAR,
    run_date CHAR,
    effective_date CHAR
    )Regards,
    Mohana

  • SQL*Loader error ORA-00600 and ORA-26095

    Hi all,
    We have a problem with the SQL*Loader Utility. We use an 8i-Database (8.1.7) and SQL*Loader 9.2.0.1.0. We have no Trims or other functions active in the control file and do a direct path load.
    It used to work properly until this morning.
    Now we have the following errors (it is in German - but I can translate it):
    Satz 90153: Abgelehnt - Fehler in Tabelle SCHEMA1.T_IMPORT.
    ORA-00600: Interner Fehlercode, Argumente: [klaprs_50], [7], [], [], [], [], [], []
    ... about 50 equal errors
    Specify SKIP=90171 when continuing the load.
    SQL*Loader-926: OCI-Fehler; uldlm:OCIDirPathFinish für Tabelle SCHEMA1.T_IMPORT
    ORA-26095: Nicht verarbeitete Stream-Daten vorhanden
    SQL*Loader-2026: Der Ladevorgang wurde abgebrochen, weil er nicht fortgesetzt werden kann.
    Specify SKIP=90171 when continuing the load.
    Trnaslation:
    00600 - Internal error code, arguments: ...
    OCI-Fehler = OCI error
    für Tabelle = for table
    ORA-26095: Nicht verarbeitete Stream-Daten vorhanden = Non processed stream data existing
    SQL*Loader-2026: Der Ladevorgang wurde abgebrochen, weil er nicht fortgesetzt werden kann. = Load process has been cancelled as it cannot be continued.
    Has anyone got a clue?!?!?!

    Hi,
    It's very clear that import 9i is for an import into 9i database.
    Upgrade 8i to 9i indicates that we can make an export 8i from 8i database and import 9i into 9i database, but never use a tools like export from other version...
    If you want import data from 9i database into 8i use exp tools 8i, and imp 8i.
    I devise you to read Metalink note 132904.1 - compatibility matrix for export & import between different oracl version.
    Nicolas.

  • SQL Loader: Multiple data files to Multiple Tables

    How do you create one control file that refrences multiple data file and each file loads data in a different table.
    Eg.
    DataFile1 --> Table 1
    DataFile2 --> Table 2
    Contents and Structure of both data files are different. Data file is comma seperated.
    Below example is for 1 data file to 1 table. Need to modify this or create a wrapper that would call multiple control files.
    OPTIONS (SKIP=1)
    LOAD DATA
    INFILE DataFile1
    BADFILE DataFile1_bad.txt'
    DISCARDFILE DataFile1_dsc.txt'
    REPLACE
    INTO TABLE Table1
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    Col1,
    Col2,
    Col3,
    create_dttm sysdate,
    MySeq "myseq.nextval"
    Welcome any other suggestions.

    I was thinking if there is a way to indicate what file goes with what table (structure) in one control file.
    Example ( This does not work but wondering if something similar is allowed..)
    OPTIONS (SKIP=1)
    LOAD DATA
    INFILE DataFile1
    BADFILE DataFile1_bad.txt'
    DISCARDFILE DataFile1_dsc.txt'
    REPLACE
    INTO TABLE Table1
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    Col1,
    Col2,
    Col3,
    create_dttm sysdate,
    MySeq "myseq.nextval"
    INFILE DataFile2
    BADFILE DataFile2_bad.txt'
    DISCARDFILE DataFile2_dsc.txt'
    REPLACE
    INTO TABLE "T2"
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    T2Col1,
    T2Col2,
    T2Col3
    )

Maybe you are looking for