Friday, February 14, 2014

COLD BACKUP Script (For Oracle Database)

Creating a script to take a cold backup of a database may be a time consuming task, but creating a script to restore this cold backup is certainly a daunting task.

This script will take a cold backup then will create a restore script (just a script but will not restore the cold backup) in one shot.

To download:
https://www.dropbox.com/s/sjibiupwic9oxt1/COLD_BACKUP.sh?dl=0

How it works:

The script will check the current running databases on the server and will ask you to select the number of the database you want to backup from the list (in case that you have multiple running databases on the server).

It will shutdown the database, take a cold backup, create a script to restore the cold backup and finally startup the database.

This script is RAC aware, it will detect if your database is RAC or a standalone one, if it's a RAC DB the script will ensure that there is no other instances are currently running for the same database before starting the cold backup procedure.

Note: This script is not designed for databases having their files located on ASM  :-)

DISCLAIMER: THIS SCRIPT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY. IT IS PROVIDED "AS IS".

The script is part of the database administration bundle, this bundle includes more than 30 scripts covering day to day database administration tasks, you can download the DBA BUNDLE from here: 
[http://dba-tips.blogspot.ae/2014/02/oracle-database-administration-scripts.html].



No comments: