Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Do "imp", "exp", and "sqlplus" return status?

Re: Do "imp", "exp", and "sqlplus" return status?

From: John P. Higgins <jh33378nospam_at_deere.com>
Date: 1998/01/07
Message-ID: <34B43CD4.690A@deere.com>#1/1

Alex Jentilucci wrote:

> 
> >
> > Beware! exp can fail to export a table and still end with a zero code!
> >
> 
>         Care to share with us events that would cause this to happen??

This is part of an export log:

. . exporting table ZZJD00A 1002718 rows
exported
. . exporting table ZZJD00O 4507 rows
exported
. . exporting table ZZJD00P 156 rows
exported
. . exporting table ZZJD00T 8821 rows
exported
. . exporting table ZZLICENSE 396 rows
exported
. . exporting table ZZZCOEPB_OLD
EXP-00014: error on row 13622 of table ZZZCOEPB_OLD

EXP-00222:
System error message 2

EXP-00008: ORACLE error 1578 encountered
ORA-01578: ORACLE data block corrupted (file # 17, block # 102268)
ORA-01110: data file 17: '/oracle/CCC/sapraw/btabd_1'

. about to export OPS$PCCADM's tables ...
. . exporting table SAPUSER 1 rows
exported
. about to export PATROL's tables ...
. . exporting table P$DEPENDENCIES 66 rows
exported
. . exporting table P$OBJ_EXCLUSIONS 0 rows
exported
. . exporting table P$PREFERENCES 30 rows
exported
. . exporting table P$TS_FRAGMENTS 0 rows
exported
. . exporting table P$TS_SIZES 28 rows
exported
. . exporting table P$USER_EPOCH 45 rows
exported
. . exporting table P$USER_EPOCH_DETAIL 5 rows
exported
. about to export OPS$CCCADM's tables ...
. . exporting table SAPUSER 1 rows
exported
. exporting referential integrity constraints
. exporting posttables actions
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting triggers
. exporting default and system auditing options
Export terminated successfully with warnings.

So I wrap up my export script with this check:

if [[ $(grep -i -c "export terminated successfully without warnings" $HOME/local
/export.log) > 0 ]]
  then
    mailx -s "Export $ORACLE_SID succeeded" jh33378_at_deere.com ou90221_at_deere.com <<-EOF3

        Export $ORACLE_SID succeeded.
        EOF3

  else
    mailx -s "Export $ORACLE_SID failed" jh33378_at_deere.com <<-EOF4
        Export $ORACLE_SID failed.
        EOF4

fi Received on Wed Jan 07 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US