Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

how to check dbexport for errors

how to check dbexport for errors

how to check dbexport for errors


I would like to know if it is possible to check if dbexport ran without problems, what does an error look like and how can I simulate one? I want to make sure that the export files are OK, so I would like to do some error checking.


RE: how to check dbexport for errors


I've used two methods:

1) search for the string "export complete" in the last 5 lines of the dbexport file:
dbexport testdb -c -ss -t /dev/tape -b 32 -s 2000000

cnt=`tail -5 ./dbexport.out|grep -i "dbexport completed"|wc -l`
if [ $cnt = 1 ];then
   echo "\n Successfully ended database export @ `date`...\n"|tee -a $log
   echo "\ndbexport failed!   Check dbexport.out file for error message @ `date`.

2)  dbexport like most all unix commands sets the exit code, $?, to zero if it completes properly or non-zero if it doesn't:

dbexport testdb ....
if [ "$?" -eq 0 ]
then echo "dbexport worked"
else echo "dbexport failed"

The easiest way of simulating an error is interrupting the dbexport process and answering "Y"es to the abort question.  Also, a dbexport fails if a user or other process is using the database you're trying to export.



RE: how to check dbexport for errors

Thanks! That answers my question exacty!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close