Databases Reference
In-Depth Information
In the following example, we show how to use the ability of manually releasing channels to configure different
options ( format and maxpiecesize ) for tape backups:
run {
allocate channel c1 device type sbt format 'bkup_%U';
allocate channel c2 device type sbt maxpiecesize = 5M;
backup channel c1 datafile 1,2,3;
release channel c1;
backup datafile 4,5,6;
}
The first backup command backs up the data files numbered 1, 2, and 3 to a tape drive using channel c1. Once
these three data files are backed up, the release channel command releases channel c1. The second backup data
file command will then use the only remaining open channel, channel c2, to back up data files 4, 5, and 6.
Allocating an RMAN Maintenance Channel
Problem
You want to allocate a channel in order to perform maintenance tasks, such as deleting obsolete RMAN backups.
Solution
Use the allocate channel for maintenance command to allocate a maintenance channel before running a change ,
delete , or crosscheck command. Suppose you've already backed up to a tape device and sent off-site all RMAN
backups you made to a tape device first. You now want to delete permanently the original backups on tape so you
can reuse those tapes for future backup space. Assume you've configured only a disk device by default. You can then
allocate a maintenance channel as a preparatory step to deleting those backups you don't need on tape any longer:
RMAN> allocate channel for maintenance device type sbt;
RMAN> delete backup of database completed before 'sysdate-30';
The allocate channel command allocates the previously unallocated tape channel to perform the deletion
of the backups. The delete command will then delete all backups of the database that were completed before
'sysdate-30.' RMAN will ask you for confirmation before it deletes all the backup objects:
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
6 6 1 1 AVAILABLE DISK /u01/app/oracle/backup/ORCL_level__16_U0gnhv6hg_1_1.bak
7 6 1 2 AVAILABLE DISK /u01/app/oracle/backup/ORCL_level__16_U0gnhv6hg_1_2.bak
...
36 25 1 1 AVAILABLE DISK /u01/app/oracle/backup_1bnhvpig11
Do you really want to delete the above objects (enter YES or NO)?
 
Search WWH ::




Custom Search