Good techniques
Doug, November 17, 2001 - 1:57 pm UTC
These will come in handy - and it probably took you less than 10 minutes.
Ravi, April 27, 2005 - 8:59 am UTC
Tom,
Is there a way to capture the Output of Export ONLY when it fails. I've tried 2> \temp\exp.log but it records SUCCESSFUL exports, as well, which I dont need.
Thanks
Ravi
April 27, 2005 - 9:20 am UTC
in 10g, when an export can be a stored procedure (API) call -- yes, using the data pump.
Using a command line tool -- it'll be a matter of grepping log files -- and defining what you mean by "success".
Ravi, April 27, 2005 - 9:29 am UTC
B. Successful export/import with warnings.
---------------------------------------
Result : Export terminated successfully with warnings
Import terminated successfully with warnings
Exit Code : EX_OKWARN
Exit Level: 0 (for Unix platforms)
1 (for Windows platform with Oracle9i, Oracle8i, and below)
3 (for Windows platform with Oracle10g and higher)
C. Unsuccessful export/import.
---------------------------
Result : Export terminated unsuccessfully
Import terminated unsuccessfully
Exit Code : EX_FAIL
Exit Level: 1 (for Unix platforms, and for Windows platforms with
Oracle10g and higher)
3 (for Windows platform with Oracle9i, Oracle8i, and below)
CHECK
=====
To determine the errorlevel at the commandline after a command ends:
- Unix Bourne/Korn shell:
echo $?
- Unix C Shell:
echo $status
- Windows:
echo %ERRORLEVEL%
Had a closer look at help, I want to interogate the EX_OKWARN value in Unix. NOT the Error level using echo $?, as you would have guessed my Export actually fails with a Warning but returns exit code 0.
April 27, 2005 - 9:31 am UTC
<quote>as you would have guessed my Export actually
fails with a Warning</quote>
"fails with a warning"?
(i've never found the return codes to be 100% reliable...)