Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Using Oracle export utility (exp)
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.
![]() |
![]() |