Presentation is loading. Please wait.

Presentation is loading. Please wait.

2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.

Similar presentations


Presentation on theme: "2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability."— Presentation transcript:

1 2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability

2 Copyright © 2007, Oracle. All rights reserved. 2 - 2 Objectives After completing this lesson, you should be able to: Invoke RMAN and set and list simple configurations Configure your database in ARCHIVELOG mode Configure multiple archive log file destinations to increase availability Specify a retention policy Configure the Flash Recovery Area Describe the benefits of using the Flash Recovery Area

3 Copyright © 2007, Oracle. All rights reserved. 2 - 3 Purpose of Backup and Recovery Functionality Backup and recovery functionality is needed for the following: Data protection –Media failure –User errors –Application errors Data preservation Data transfer

4 Copyright © 2007, Oracle. All rights reserved. 2 - 4 Typical Backup and Recovery Tasks To be able to recover from data loss problems with minimal down time, you should be prepared to do the following: Configure the database for recoverability. Define a backup schedule. Plan and test different types of failure scenarios. Monitor and troubleshoot the backup and recovery environment. Restore data from backups. Recover transactions to a desired point in time.

5 Copyright © 2007, Oracle. All rights reserved. 2 - 5 Typical Backup and Recovery Tasks Full Notes Page

6 Copyright © 2007, Oracle. All rights reserved. 2 - 6 Oracle Backup and Recovery Solutions These Oracle utilities and features provide the tools necessary to maintain a recoverable system: Recovery Manager (RMAN) –Incremental backups –Block media recovery –Unused block compression –Binary compression –Backup encryption Data Pump

7 Copyright © 2007, Oracle. All rights reserved. 2 - 7 Using Recovery Manager $ rman target / RMAN> BACKUP DATABASE; Starting backup at 10-JUN-07. RMAN> LIST BACKUP; BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ------- ----------- ------------ --------------- 1 Full 1.06G DISK 00:01:49 10-JUN-07. RMAN> DELETE OBSOLETE;. Do you really want to delete the above objects (enter YES or NO)? YES deleted archived log.

8 Copyright © 2007, Oracle. All rights reserved. 2 - 8 Using Recovery Manager Full Notes Page

9 Copyright © 2007, Oracle. All rights reserved. 2 - 9 Types of RMAN Commands RMAN commands are of the following types: Stand-alone command: –Is executed individually at the RMAN prompt –Cannot appear as subcommands within RUN Job command: –Must be within the braces of a RUN command –Is executed as a group Some commands can be executed as either a stand-alone or a job command.

10 Copyright © 2007, Oracle. All rights reserved. 2 - 10 Job Commands: Example Job commands appear inside a RUN command block: RMAN>RUN 2> { 3> ALLOCATE CHANNEL c1 DEVICE TYPE DISK 4> FORMAT "/disk2/%U"; 5> BACKUP AS BACKUPSET DATABASE; 6> SQL 'alter system archive log current'; 7> } Deallocated after the RUN block completes Execution of entire block starts when this line is entered.

11 Copyright © 2007, Oracle. All rights reserved. 2 - 11 Configuring Your Database for Backup and Recovery Operations Operate the database in ARCHIVELOG mode. Configure the Flash Recovery Area. Archiver (ARCn) Archived redo log files Online redo log files Archived redo log files Control file backups Data file backups

12 Copyright © 2007, Oracle. All rights reserved. 2 - 12 ARCHIVELOG Mode Archiver (ARCn) Archived redo log files Online redo log files

13 Copyright © 2007, Oracle. All rights reserved. 2 - 13 Configuring ARCHIVELOG Mode To place the database in ARCHIVELOG mode, perform the following steps: Using Enterprise Manager –Select the “ARCHIVELOG Mode” check box. –Click Apply. The database can be set to ARCHIVELOG mode only from the MOUNT state. –Click Yes when asked whether you want to restart the database. Using SQL commands –Mount the database. –Issue the ALTER DATABASE ARCHIVELOG command. –Open the database.

14 Copyright © 2007, Oracle. All rights reserved. 2 - 14 Configuring ARCHIVELOG Mode Full Notes Page

15 Copyright © 2007, Oracle. All rights reserved. 2 - 15 Configuring Archive Log Destinations Online redo log files Archived redo log files Archived redo log files Online redo log files Archived redo log files LOG_ARCHIVE_DEST_n LOG_ARCHIVE_DEST LOG_ARCHIVE_DUPLEX_DEST Local and remote destinations: Local-only destinations:

16 Copyright © 2007, Oracle. All rights reserved. 2 - 16 Configuring Archive Log Destinations Full Notes Page

17 Copyright © 2007, Oracle. All rights reserved. 2 - 17 Guaranteeing Archive Log Success Online redo log files LOG_ARCHIVE_MIN_SUCCEED_DEST = 2 Standby1 1 2 3

18 Copyright © 2007, Oracle. All rights reserved. 2 - 18 Guaranteeing Archive Log Success Full Notes Page

19 Copyright © 2007, Oracle. All rights reserved. 2 - 19 Specifying a Backup Destination Backups can be written to: Disk directory Tape, using Oracle Secure Backup Media Management Library –Tape –Disk or tape, using proxy copy Flash Recovery Area: Disk area set aside for backup and recovery and flashback database purposes

20 Copyright © 2007, Oracle. All rights reserved. 2 - 20 Specifying a Backup Destination Full Notes Page

21 Copyright © 2007, Oracle. All rights reserved. 2 - 21 Specifying a Retention Policy Retention policy: Describes which backups will be kept and for how long Two types of retention policies: –Recovery window: Establishes a period of time within which point-in-time recovery must be possible –Redundancy: Establishes a fixed number of backups that must be kept Retention policies are mutually exclusive. Backup SYSDATE Recovery window Backup 1 SYSDATE Backup 2

22 Copyright © 2007, Oracle. All rights reserved. 2 - 22 Retention Policies Full Notes Page

23 Copyright © 2007, Oracle. All rights reserved. 2 - 23 A Recovery Window Retention Policy: Example Now Recovery window of 7 days Log 200 Backup B Log 300 Backup C Log 400Log 100 Backup A Log 500 Backup B and archive logs 201 through 500 are required to satisfy this retention policy. Backup Obsolete Not Obsolete

24 Copyright © 2007, Oracle. All rights reserved. 2 - 24 Using a Flash Recovery Area Permanent items: –Multiplexed copies of the current control file –Multiplexed copies of online redo logs Transient items: –Archived redo logs –Data file copies –Control file copies –Control file autobackups –Backup pieces –Flashback logs Database Flash Recovery Area

25 Copyright © 2007, Oracle. All rights reserved. 2 - 25 Using a Flash Recovery Area Full Notes Page

26 Copyright © 2007, Oracle. All rights reserved. 2 - 26 Defining a Flash Recovery Area The Flash Recovery Area is defined by setting both of the following initialization parameters: – DB_RECOVERY_FILE_DEST_SIZE : Sets the disk limit – DB_RECOVERY_FILE_DEST : Sets the location for the Flash Recovery Area These parameters are dynamic.

27 Copyright © 2007, Oracle. All rights reserved. 2 - 27 Defining a Flash Recovery Area Using Enterprise Manager

28 Copyright © 2007, Oracle. All rights reserved. 2 - 28 Flash Recovery Area Space Management Space limit is reached and a new file needs to be written into the Flash Recovery Area. 1 2 Backup files to be deleted Database file backup 1 2 3 4 Warning issued to user Flash Recovery Area Space pressure occurs. RMAN updates list of files that may be deleted. Files that are no longer required on disk are Deleted.

29 Copyright © 2007, Oracle. All rights reserved. 2 - 29 Flash Recovery Area Space Management Full Notes Page

30 Copyright © 2007, Oracle. All rights reserved. 2 - 30 Flash Recovery Area Space Usage Configure the retention policy to the minimum value appropriate for your database. Back up the archive log files regularly and delete the files upon completion of the backup. Use the RMAN REPORT OBSOLETE and DELETE OBSOLETE commands to remove backups and file copies that are not required.

31 Copyright © 2007, Oracle. All rights reserved. 2 - 31 Flash Recovery Area Space Usage Full Notes Page

32 Copyright © 2007, Oracle. All rights reserved. 2 - 32 Monitoring the Flash Recovery Area

33 Copyright © 2007, Oracle. All rights reserved. 2 - 33 Benefits of Using a Flash Recovery Area Using the Flash Recovery Area for recovery-related files: Simplifies the location of database backups Automatically manages the disk space allocated for recovery files

34 Copyright © 2007, Oracle. All rights reserved. 2 - 34 Summary In this lesson, you should have learned how to: Invoke RMAN and set and list simple configurations Configure your database in ARCHIVELOG mode Configure multiple archive log file destinations to increase availability Specify a retention policy Configure the Flash Recovery Area Describe the benefits of using the Flash Recovery Area

35 Copyright © 2007, Oracle. All rights reserved. 2 - 35 Practice 2 Overview: Configuring for Recoverability This practice covers the following topics: Placing the database in ARCHIVELOG mode Verifying that the Flash Recovery Area is configured Using RMAN to connect to the target database

36 Copyright © 2007, Oracle. All rights reserved. 2 - 36


Download ppt "2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability."

Similar presentations


Ads by Google