 |
|
Oracle Tips by Burleson |
Oracle10g Grid Computing
with RAC Chapter 13 - Oracle RAC Backup and Recovery
Deletion of
Backed-up Archive Logs
After a
successful backup, the archive logs should be deleted. If you use RMAN,
the deletion of archive logs can be automated. It is suggested that
only the logs that have actually been backed up be deleted. To achieve
the deletion of backed up archive logs, the BACKUP command is issued
with either the delete INPUT or delete ALL INPUT clause following the
ARCHIVELOG portion of the command.
To delete
just the archive logs that have been backed up the command for
instance v10g1 would be:
BACKUP
DATABASE PLUS ARCHIVELOG delete INPUT;
To delete
all of the archive logs at the archive log destination:
BACKUP
DATABASE PLUS ARCHIVELOG delete ALL INPUT;
To be
absolutely sure that only backed up archive logs are deleted, use the
delete command with a MAINTENANCE connection in RMAN. In our example
with instances v10g1 and v10g2:
ALLOCATE
CHANNEL FOR MAINTENANCE DEVICE TYPE DISK CONNECT 'SYS/kr87m@v10g1';
DELETE
ARCHIVELOG LIKE '%arc_dest_1%'
BACKED UP 1
TIMES TO DEVICE TYPE sbt;
RELEASE
CHANNEL;
ALLOCATE
CHANNEL FOR MAINTENANCE DEVICE TYPE DISK CONNECT
'SYS/kr87m@v10g2';
DELETE
ARCHIVELOG LIKE '%arc_dest_1%'
BACKED UP 1
TIMES TO DEVICE TYPE sbt;
RELEASE
CHANNEL;
Notice the
BACKED UP 1 TIMES clause in the above commands. This tells RMAN not to
delete the archive logs unless it has a record of them being backed up
at least once. The $arch_dest_1% token tells what logs to remove and
translates into the value specified for log_archive_dest_1 for the
instance specified in the connection alias (example: @v10g1).
RMAN is
capable of autolocating files it needs to backup. RMAN, through the
database synchronization and resync processes, is aware of which files
it needs to backup for each node. RMAN can only backup the files it
has autolocated for each node on that node.
During
recovery, autolocation means that only the files backed up from a
specific node will be written to that node.
For more information,
see the book
Oracle 11g Grid and Real Application Clusters - 30% off if
you buy it directly from Rampant TechPress .
Written by top
Oracle experts, this RAC book has a complete online code depot with
ready to use RAC scripts.
Customized Oracle Training
Classes
Burleson Consulting offers
on-site
Oracle courses
year-round in a variety of Oracle topics. All on-site Oracle training can be
custom fit to
meet your specific training needs. For
customized
syllabus development or a price quote, please visit
www.fast-track.cc or email
.

|