RMAN Offline Backup Script

Posted By Sagar Patil

rman> shutdown immediate;
rman> startup mount

1. Let’s validate if there is ample of space for backup at Target device type i.e DISK/TAPE

ALLOCATE CHANNEL c1 DEVICE TYPE sbt;

RMAN>
run {
ALLOCATE CHANNEL c1 DEVICE TYPE sbt;
BACKUP VALIDATE DATABASE;
}

allocated channel: c1
channel c1: sid=18 devtype=SBT_TAPE
channel c1: VERITAS NetBackup for Oracle – Release 4.5MP6 (00000000)

Starting backup at 14-JAN-09
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset

input datafile fno=00010 name=/oradata/oradataTEST/tspace/TESTO5TEST_TESTmes_idx_01.dbf
input datafile fno=00007 name=/oradata/oradataTEST/tspace/TESTO5TEST_TESTtrn_dat_01.dbf
input datafile fno=00009 name=/oradata/oradataTEST/tspace/TESTO5TEST_TESTmes_dat_01.dbf
input datafile fno=00017 name=/oradata/oradataTEST/tspace/TESTO5TEST_TESTtrn_idx_02.dbf
input datafile fno=00019 name=/oradata/oradataTEST/tspace/TESTO5TEST_TESTvch_idx_02.dbf

2. If validate doesn’t return any errors go head with following script to backup entire database.

rman target sys/manager nocatalog

RMAN> shutdown immediate

RMAN> startup mount

RMAN>
run { allocate channel c1 device type disk format ‘%Directory%\backup_db_%d_S_%s_P_%p_T_%t’;
# I need to create a compressed backup set due to lack of drive space.
# The entire database backup was compressed from 77GB to 5GB (10G new feature) so it does work well.
backup as compressed backupset full skip inaccessible
tag rman_backup_Offline_full
filesperset 10
(database include current controlfile);
delete obsolete;
crosscheck backup
}

Leave a Reply

You must be logged in to post a comment.

One Response to “ RMAN Offline Backup Script ”

  1. sorry ,i cant understant in ORACLE 11G r2 wether need to set alter system set cluster_database=TRUE?

Top of Page

Top menu