Presentation is loading. Please wait.

Presentation is loading. Please wait.

Backup & Recovery Backup and Recovery Strategies on Windows Server 2003.

Similar presentations


Presentation on theme: "Backup & Recovery Backup and Recovery Strategies on Windows Server 2003."— Presentation transcript:

1 Backup & Recovery Backup and Recovery Strategies on Windows Server 2003

2 Objectives At the end of this module the student will understand the following tasks and concepts. Understand the difference between off- line and on-line backups. Understand how to backup RAC databases Understand how to do backups in Windows.

3 Off-Line Backup Best Solution System is Quiescent Backup is complete

4 Off-Line Backup Oracle is shut down Backup files Data Data Log Log Control Control Parameter Parameter

5 Off-Line Backup Complete Backup Does not require ARCHIVELOG mode Does not require ARCHIVELOG mode Can only recover complete database unless running in ARCHIVELOG mode Can only recover complete database unless running in ARCHIVELOG mode If not ARCHIVELOG mode can only recover backed up database If not ARCHIVELOG mode can only recover backed up database Tablespace Backup Requires ARCHIVELOG mode for recovery Requires ARCHIVELOG mode for recovery Can backup and recover on tablespace basis Can backup and recover on tablespace basis

6 ARCHIVELOG Mode Automatically copies redo log files to archive log files Copies after a log switch. Copies after a log switch. Copies to archive log destination + generated file name. Copies to archive log destination + generated file name. Uses archive log files for recovery Uses archive log files for recovery

7 On-Line Backup Writes to the data files are stopped All changed blocks are redirected to the redo logs Process Mark tablespace as under backup Mark tablespace as under backup Use OS facility to backup data files Use OS facility to backup data files Mark tablespace as done with backup Mark tablespace as done with backup

8 On-Line Backup Streamlined version of on-line backup Place all tablespaces in backup at once with “Alter database begin backup” Place all tablespaces in backup at once with “Alter database begin backup” Backup all files with an OS command Backup all files with an OS command End the backup with “Alter database end backup” End the backup with “Alter database end backup” Requires a fast method for backing up files, or the redo logs will fill rapidly Requires a fast method for backing up files, or the redo logs will fill rapidly

9 Types of Backup Database backups Tablespace backups Datafile backups Control file backups Archive log file backups

10 Database Backups Entire database is backed up Data files Data files Redo Log files Redo Log files Control files Control files Parameter files Parameter files Provides consistent picture of the database Best type of backup (if possible)

11 Tablespace Backups Backup of a single tablespace ALTER TABLESPACE tsname BEGIN BACKUP ALTER TABLESPACE tsname BEGIN BACKUP Backup datafiles used by the tablespace Backup datafiles used by the tablespace ALTER TABLESPACE tsname END BACKUP ALTER TABLESPACE tsname END BACKUP Provides for recovery of a single tablespace

12 Datafile Backups Backup of a single datafile Same files as with full and tablespace backup Useful if a datafile is damaged Reduces recovery time

13 Control File Backups Backup of a control file Should be done whenever the schema changes ALTER DATABASE BACKUP CONTROLFILE TO ‘filename’

14 Archive Log Backups Archive log files should be backed up immediately upon creation This can be automated Save recent archive log files in accessible area Be prepared to immediately restore them

15 RMAN Backup Managed by Oracle GUI or script interfaces Backups catalogued in a repository Can be off-line or on-line backups Does not use “backup tablespace” method for on-line backups Can be integrated with vendor backup software and hardware RMAN must be used to backup 10g ASM databases

16 OCOPY Backups OCOPY utility is a command-line tool that can make the following types of backups: Backups when Oracle database is shut down (cold backups) Backups when Oracle database is shut down (cold backups) Backups of a tablespace that is offline when the database is open Backups of a tablespace that is offline when the database is open Backups of a tablespace that is online when the database is open Backups of a tablespace that is online when the database is open OCOPY can back up only to disk and can perform only local backups.

17 OCOPY and Raw Files The OCOPY utility is particularly useful for backing up raw files. In the following example, \\.\G is a raw data file that is being backed up to a normal file system on C:\ \\.\G OCOPY "\\.G:" C:\backup\datafile12.bak

18 Third-Party Vendor Backup Interfaces with Oracle Backup and Recovery Wizards Requires vendor-supplied Media management Layer (MML) to back up to tape. May use OS backup methods or RMAN

19 RAC Database Backups RAC database backups are essentially the same as single instance backups Backup from one node Exception: you must back up all threads of archive log files (all nodes) Exception: you must back up all threads of archive log files (all nodes) Restore to one node Apply archive logs from all nodes as requested Apply archive logs from all nodes as requested

20 Review If you have the luxury of time, what is the best method to use for backups? Name three types of Oracle backup What command can you use to backup a database implemented on RAW disks? What can you use to backup a database implemented on ASM disk groups? What is the syntax to backup a controlfile? What do you have to remember to backup for RAC databases?

21 Summary Off-line backup On-line backup RMAN backups RAC backups Backups under Windows


Download ppt "Backup & Recovery Backup and Recovery Strategies on Windows Server 2003."

Similar presentations


Ads by Google