Fault-Tolerant Backup Scripts ?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Fault-Tolerant Backup Scripts ?

  1. #1
    Join Date
    Feb 2001
    Posts
    22

    Lightbulb

    Hi there,

    In the net, there are many backup/recovery scripts available. However, none of the script checks following conditions.

    1) ALTER TABLESPACE xyz BEGIN BACKUP
    2) SQL> !cp somewhere.dbf /tmp/somewhere.dbf.bak

    For Case 1, if we can't ALTER TABLESPACE xyz BEGIN BACKUP, the backup file is useless.

    For Case 2, if the /tmp did not have enough capacity, the scripts will still proceed eventhough the cp is not successful.

    Any way to detect above error conditions in scripts?

    Regards,
    Edward.


  2. #2
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    guess you should include the following at the beginning of your scripts ... if I have correctly understood your pb ;)

    WHENEVER OSERROR exit;
    WHENEVER SQLERROR exit;

  3. #3
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    The best way for automated backup scripts is to check the available space in the target directory. If the space is not available, send a mail to DBA and do not start "ALTER TABLESPACE XXXX BEGIN BACKUP" at all.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width