Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: korn and sqlerror / export questions
Dah..... I was looking at the wrong logfile..... I told you it was probably
something stupid....
-----Original Message-----
From: Manjula Krishnan [mailto:oradba_la_at_yahoo.com]
Sent: Friday, August 06, 2004 5:10 PM
To: oracle-l_at_freelists.org
Subject: Re: korn and sqlerror / export questions
Shouldn't you be looking for the errors in weekly_deletes.log?
"Duret, Kathy" <kduret_at_starkinvestments.com> wrote: And yes, I did google...
ok, what I want to do is do a weekly export for some tables based upon a query for some tables.
If the export is ok then I want to delete from the tables.
If not, like there is a EXP error or warning I don't want to do the deletes
So I want to check the return code from the export. However, when I have a warning from the export, I am still doing the delete.....
This is what I have....
sqlplus -s /nolog << sql_block > $LOGFILE
whenever oserror exit 1
whenever sqlerror exit 2
!exp $USERID tables=table1,table_rates file=weekly_deletes.dmp
log=weekly_deletes.log query=\"where id in \(select id from table1 where
close_date \< sysdate-32 \)\"
exit
sqlblock
ret_code=$?
oerr=`echo $LOGFILE | egrep -ic "ora-|exp-|pls-|sp2-"`
Probably something stupid I am doing wrong..... can't seem to see it...need many margueritas....
Kathy
This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
![]() |
![]() |