<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unable to trap the correct $? from SQL* Loader in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/unable-to-trap-the-correct-from-sql-loader/m-p/3259592#M888271</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;The script itself can generate a failure message and becouse it has done its programmed task (even though it has generated an error) can exit with a 0 (zero) error and be correct.&lt;BR /&gt;&lt;BR /&gt;Paula</description>
    <pubDate>Mon, 26 Apr 2004 20:46:50 GMT</pubDate>
    <dc:creator>Paula J Frazer-Campbell</dc:creator>
    <dc:date>2004-04-26T20:46:50Z</dc:date>
    <item>
      <title>Unable to trap the correct $? from SQL* Loader</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unable-to-trap-the-correct-from-sql-loader/m-p/3259591#M888270</link>
      <description>All,&lt;BR /&gt;&lt;BR /&gt;I am trying to trap the exit status after executing sql*loader.&lt;BR /&gt;&lt;BR /&gt;Although the script fails and writes the failure message in the log file. The exit status '$?' comes out to 0. &lt;BR /&gt;&lt;BR /&gt;Is there anyway I can trap the correct exit status so I may know whether sql*loader has executed successfully or not? I don't want to go the log file and grep for error.&lt;BR /&gt;&lt;BR /&gt;Thank You,&lt;BR /&gt;Suman</description>
      <pubDate>Mon, 26 Apr 2004 15:55:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unable-to-trap-the-correct-from-sql-loader/m-p/3259591#M888270</guid>
      <dc:creator>Suman_7</dc:creator>
      <dc:date>2004-04-26T15:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to trap the correct $? from SQL* Loader</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unable-to-trap-the-correct-from-sql-loader/m-p/3259592#M888271</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;The script itself can generate a failure message and becouse it has done its programmed task (even though it has generated an error) can exit with a 0 (zero) error and be correct.&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Mon, 26 Apr 2004 20:46:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unable-to-trap-the-correct-from-sql-loader/m-p/3259592#M888271</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2004-04-26T20:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to trap the correct $? from SQL* Loader</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unable-to-trap-the-correct-from-sql-loader/m-p/3259593#M888272</link>
      <description>Hi Suman,&lt;BR /&gt;&lt;BR /&gt;The return code of sql*loader will return zero as it has completed its task and exited. If there are error while loading the data then the log file will tell you the error detals as to how many records loaded and how many records rejected. And there will be a bad file in the directory with the rejected data records.&lt;BR /&gt;&lt;BR /&gt;So it is not possible to get the return code of an sql*loader to find it there are errors or not. The bestway will be to check the log file.&lt;BR /&gt;&lt;BR /&gt;Oherwise if you need to know if there are error without checking the log file you can check for an existence of a bad file with extension (.bad) in the directory  and this will tell you that there was an error while loading. This can be done by the script automatically. Check for existence of bad file and echo error or send auto e-mail.&lt;BR /&gt;&lt;BR /&gt;I hope this helps.&lt;BR /&gt;&lt;BR /&gt;Indira A&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Apr 2004 23:17:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unable-to-trap-the-correct-from-sql-loader/m-p/3259593#M888272</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2004-04-26T23:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to trap the correct $? from SQL* Loader</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unable-to-trap-the-correct-from-sql-loader/m-p/3259594#M888273</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Check your OracleX Database Utilities documentation : &lt;BR /&gt;&lt;BR /&gt;Exit Codes for SQL*Loader&lt;BR /&gt;All rows loaded successfully EX_SUCC&lt;BR /&gt;All or some rows rejected EX_WARN&lt;BR /&gt;All or some rows discarded EX_WARN&lt;BR /&gt;Discontinued load EX_WARN&lt;BR /&gt;Command-line or syntax errors EX_FAIL&lt;BR /&gt;Oracle errors nonrecoverable for SQL*Loader EX_FAIL&lt;BR /&gt;Operating system errors (such as file open/close and malloc) EX_FAIL&lt;BR /&gt;&lt;BR /&gt;For UNIX, the exit codes are as follows:&lt;BR /&gt;EX_SUCC 0&lt;BR /&gt;EX_FAIL 1&lt;BR /&gt;EX_WARN 2&lt;BR /&gt;EX_FTL 3&lt;BR /&gt;&lt;BR /&gt;Oracle offers a script to test the return code : &lt;BR /&gt;#!/bin/sh&lt;BR /&gt;sqlldr scott/tiger control=ulcase1.ctl log=ulcase1.log&lt;BR /&gt;retcode=`echo $?`&lt;BR /&gt;case "$retcode" in&lt;BR /&gt;0) echo "SQL*Loader execution successful" ;;&lt;BR /&gt;1) echo "SQL*Loader execution exited with EX_FAIL, see logfile" ;;&lt;BR /&gt;2) echo "SQL*Loader execution exited with EX_WARN, see logfile" ;;&lt;BR /&gt;3) echo "SQL*Loader execution encountered a fatal error" ;;&lt;BR /&gt;*) echo "unknown return code";;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;But, I'm with Indira on this, it's best to check the log and look for specific errors. Espacially if you exepect normal discard, head / footer ...&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;&lt;BR /&gt;Nicolas</description>
      <pubDate>Tue, 27 Apr 2004 06:06:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unable-to-trap-the-correct-from-sql-loader/m-p/3259594#M888273</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-04-27T06:06:37Z</dc:date>
    </item>
  </channel>
</rss>

