Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 8 Complete Recovery with Recovery Manager
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 2 Chapter Objectives Identify the benefits of using RMAN List the basic RMAN recovery procedures Recover a database that is in NOARCHIVELOG mode Recover a database that is in ARCHIVELOG mode Use RMAN to move a data file to a new location
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 3 Basic Recovery Steps Mount the target database Issue RESTORE command Issue RECOVER command Open the database
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 4 Why Use RMAN? Does not require the DBA to locate and restore the appropriate files – managed by RMAN
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 5 Recovering a NOARCHIVELOG Mode Database Mount the target database RESTORE command – all database files are restored Open the database The RECOVER command is NOT issued – file contents do not require updating
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 6 Mounting the Target Database Command to mount target database
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 7 Restoring the Data Files Command to restore files
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 8 Opening the Database Using RMAN
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 9 GUI Approach - Accessing Recovery Wizard
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 10 Operation Selection Through Recovery Wizard
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 11 RMAN Job Submitted Through Recovery Wizard
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 12 Recovering an ARCHIVELOG Mode Database Recovery required to update data files
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 13 Moving Files to New Location Take tablespace offline Use SET NEWNAME FOR DATAFILE to specify new name or location Execute RESTORE to physically move file Execute SWITCH to update control file with new information Execute RECOVER to update file’s contents Place tablespace back online
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 14 Relocating File – Example
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 15 Recovery Wizard to Relocate a File
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 16 Relocating Job Submission to Recovery Wizard
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 17 Chapter Summary To recover a database using Recovery Manager, a database in NOARCHIVELOG mode must be mounted, but not opened. The RESTORE command will automatically determine the most appropriate backup set or image copy for restoring the database files. With RMAN, the user is not required to manually restore the database files.
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 18 Chapter Summary (Cont.) Multiple channels can only be used during the restore process if more than one backup set is being restored. If two channels are used to backup a database, RMAN will divide the data files into two backup sets.
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 19 Chapter Summary (Cont.) When only one channel is allocated to restore multiple backup sets, the backup sets will be restored one at a time. The SET command is used to specify a new location for a data file.
Chapter 8Oracle9i DBA II: Backup/Recovery and Network Administration 20 Chapter Summary (Cont.) The SWITCH command is used to update the control file with the new location for a data file. The SQL command can be used to execute SQL statements through RMAN.