Team Fly |
Page 195
also restored. We have changed the archive log directory destination to write the archive log restores to. Notice that there is no mention of file names in this script. The recovery catalog has kept track of all of the files for us and if files were stored on tape, the Media Management Layer software may have also assisted with this.
RMAN> connect catalog rmancat/rmancat@ora10g
RMAN> connect target sys/change_on_install@ora10g
MAN> replace script fullRestoreTEST1 {
allocate channel ch1 type disk;
# Set a new location for logs
set archivelog destination to '/TD70/sandbox/TEST1/arch';
startup nomount;
restore archivelog from logseq 2123 until logseq 2145;
restore controlfile;
alter database mount;
restore database;
recover database;
alter database open resetlogs;
release channel ch1;
}
host 'echo ''start 'date'"';
run {execute script fullRestoreTEST1;}
host 'echo "stop 'date'"';
exit
That's it! This script is simple and very powerful. We've now covered some basic RMAN backup options to give you an overview of how you can use RMAN on your databases. You should now test out various backup and recovery options to see how they function and how well the different options work in your environment. The settings that you use on one set of servers may not be the ones you will use on another, so testing your RMAN backup and recovery setup is essential!
Project 5-1 RMAN End-to-End
This project will take you from start to finish using RMAN. We will first assume that you have two Oracle databases to work with. The target database will be called ora10g in this project and the catalog database will be called oracat. You will first set up the RMAN catalog and then connect to the target database and register that database in the catalog. A full database backup will be performed and once that has been successfully completed, we will use that backup to perform a full database restore using RMAN. Look carefully at the output that RMAN produces to help better understand what is going on behind the scenes. Once you've completed this project, you will have used RMAN from end to end and will be comfortable with basic RMAN functionality.
Team Fly |
No comments:
Post a Comment