sqlldr question
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: sqlldr question

  1. #1
    Join Date
    May 2002
    Location
    USA
    Posts
    462

    sqlldr question

    Hi friends ,

    can i capture sqlldr error message or exception when sqlldr gets some bad records

    actually we are invoking this in shell script .

    sqlldr xyz/xyz@test control=/usr/local/weblogic/upload_vol.ctl direct=true log=/usr/local/weblogic/upload_vol.log

    --- upload_vol control file

    LOAD DATA
    INFILE '$FILE_NM'
    INTO TABLE upload_volume
    TRUNCATE
    FIELDS TERMINATED BY ','

    Thanks in advance .

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    bad=bad.log

  3. #3
    Join Date
    May 2002
    Location
    USA
    Posts
    462
    hi dave ,

    thanks for quick response ..

    i want this operation to fail .. whenever a single bad record is present in the flat file ..

    by putting bad=bad.log it is writing bad records in bad.log file .. which continues the sqlldr .

    i want this to exit with error message whenever a bad record comes .

    Thanks

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    oh right, there is a max error parameter - ill try look it up

  5. #5
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    errors=1 (default is 50)

  6. #6
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Actually, use ERRORS=0. If you use ERRORS=1 the loader will terminate only when it encounters a *second* bad record. This parameters specifies how many bad records you allow before stopping the loading process.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  7. #7
    Join Date
    May 2002
    Location
    USA
    Posts
    462
    I will let you know once i try eith errors = 0
    Last edited by prakashs43; 08-19-2004 at 01:46 PM.

  8. #8
    Join Date
    May 2002
    Location
    USA
    Posts
    462
    I tried errors = 0 in following command

    sqlldr xyz/xyz@isrprod control=/usr/local/weblogic/upload_vol.ctl log=/usr/local/weblogic/upload_vol.log bad=/usr/local/weblogic/upload_vol.bad discard=/usr/local/weblogic/Web_data/upload_vol.dis errors=0

    but it still continued though there was one bad record .
    and it showed that record in .bad file .

    am i missing anything here .

    thanks

  9. #9
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Is the command line being truncated?
    How about putting OPTIONS (ERRORS=0) in the control file?

  10. #10
    Join Date
    May 2002
    Location
    USA
    Posts
    462
    Hi Friends ,

    errors=0 is actually exiting sqlldr whenever 1st bad record comes

    actually i am calling sqlldr from java
    can i actually capture
    success and failure return codes ..

    thanks for all your help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width