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: Using Oracle export utility (exp)

Re: Using Oracle export utility (exp)

From: Murali <oraclems_at_hotmail.com>
Date: 17 Jan 2002 15:50:18 -0800
Message-ID: <22e6597b.0201171550.2ee494b7@posting.google.com>


mark.powell_at_eds.com (Mark D Powell) wrote in message news:<178d2795.0201170632.58b66144_at_posting.google.com>...
> tferrazz_at_hotmail.com (Tony Ferrazzo) wrote in message news:<b12473a5.0201161500.6f2064b2_at_posting.google.com>...
> > Hi,
> > I am using exp with its many wonderful switches to do table
> > maintenance. I am using a unix shell script which will be setup to run
> > as a cron job. My question is:
> >
> > The exp utility does not seem to give any indication of success or
> > failure, for example, I deliberately ran the script to exp a non
> > existant table. The log showed the exp utility reporting the table did
> > not exist but then went on to say the "Export terminated successfully
> > without warnings." A unix check with $? always returns a 0 indicating
> > success. AS we want to exp tables, drop them and then import them
> > back, we need to be 100% sure the exp did in fact work.
> >
> > Hopefully someone can provide some ideas or assistance with this
> > issue.
> >
> > Thanks in advance
> >
> > Tony Ferrazzo
>
> Tony, I can't remember ever bothering to check the return code from
> exp before so I tested it and when I exported a non-existent table I
> did get a UNIX return code of 0, but the message was "Export
> terminated successfully with warnings."
> so I can think of two possible checks:
>
> 1- Check the output message for "with warnings" or "without warnings"
> OR
> 2- Check the size of the .dmp file for reasonableness
>
> An alternative is to run the exports manually so you know they worked.
> I do not believe in automating table reorganizations since normally a
> table should not need to be re-organized that frequently. I would
> rather work the midnight to four shift a few times a year than trust
> things to work. System administrators and co-workers make too many
> changes without notifing you to rely on an automated process. Indexes
> generally are more likely to benefit from maintenance than a table and
> in the event of a problem are easier to recover. But if you really
> need to automate the process the above is what came to mind.
>
> -- Mark D Powell --

Tony,

The error code in the variable $? in no way indicates whether the actual export of data was successful or not. It just means that the executable 'exp' was found where it was supposed to be and you have the correct permissions to use it. What happens after the export starts (error or no error) will not be recorded in the shell variable. You might want log the export and then grep that log file for the 'EXP-' string or the 'without warnings' string.

Murali
http://www.dbaquest.com/ Received on Thu Jan 17 2002 - 17:50:18 CST

Original text of this message

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