Posts

Showing posts from August, 2012

Backup and restore of Database before upgrade using RMAN

Make sure you always take Database backup before any upgrades and patches.It is always good idea to do this. In the below example I am showing how to take a backup of full database to some location and how to restore it back from backup in-case of any failures. backup database before upgrade: rman "target / nocatalog" RUN { ALLOCATE CHANNEL C1 TYPE DISK; BACKUP DATABASE FORMAT '/u02/backup/backup_%U' TAG "before_upgrade"; BACKUP CURRENT CONTROLFILE FORMAT '/u02/backup/controlfilebkp.ctl'; } Restoring database from backup in-case of upgrade fail: RMAN> restore controlfile from '/u02/backup/controlfilebkp.ctl'; Starting restore at 18-JUL-12 using channel ORA_DISK_1 channel ORA_DISK_1: restoring control file channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 output filename=/u01/app/oracle/oradata/test/control01.ctl output filename=/u01/app/oracle/oradata/test/control02.ctl output filename=/u01/app/oracle/oradata/test/control03.ctl ...