Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Check For Successful Exp/Imp

Status
Not open for further replies.

mmemon

Programmer
Nov 21, 2002
46
US
Hello Everyone,
I have created a cron job on my Solaris box that calls a script that is coded to run the exp and import utility. I am exporting 2 tables and importing them on a weekly basis.
How do I check if the export was successful or has data? Is there a number that is returned that tells me if it was successful and had no errors?
Or do I code commands in the cron to see if the cron ran successfully?

Any help will be appreciated..

Thanks
Michele
 
You could try something like this:

exp $ORACLE_LOGON_ID FILE=$PEXP $EXPTYPE GRANTS=Y INDEXES=Y LOG=$LOG_FILE STATISTICS=COMPUTE COMPRESS=Y ROWS=Y CONSTRAINTS=Y DIRECT=Y >/dev/null

if [ $? -ne 0 ]
then
echo -e "\n+-------------------------------------------------------+"
echo -e "+--- !ERROR: Export failed - Job aborted. ---+"
echo -e "+-------------------------------------------------------+\n"
exit 1
fi

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top