Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright  Oracle Corporation, 1999. All rights reserved. 3 Oracle Backup and Recovery Configuration.

Similar presentations


Presentation on theme: "Copyright  Oracle Corporation, 1999. All rights reserved. 3 Oracle Backup and Recovery Configuration."— Presentation transcript:

1 Copyright  Oracle Corporation, 1999. All rights reserved. 3 Oracle Backup and Recovery Configuration

2 3-2 Copyright  Oracle Corporation, 1999. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Identify recovery implications of operating in NOARCHIVE mode Describe the differences between ARCHIVELOG and NOARCHIVELOG modes Configure a database for ARCHIVELOG mode and automatic archiving Use init.ora parameters to configure multiple destinations for archived log files and multiple archive processes Perform manual archive of logs After completing this lesson, you should be able to do the following: Identify recovery implications of operating in NOARCHIVE mode Describe the differences between ARCHIVELOG and NOARCHIVELOG modes Configure a database for ARCHIVELOG mode and automatic archiving Use init.ora parameters to configure multiple destinations for archived log files and multiple archive processes Perform manual archive of logs

3 3-3 Copyright  Oracle Corporation, 1999. All rights reserved. Online redo log files 052 No redo history Redo Log History 054053 LGWR 052 051 Redo history 1 2

4 3-4 Copyright  Oracle Corporation, 1999. All rights reserved. Online redo log files 052 No redo history NOARCHIVELOG Mode 054 053 LGWR 052 054 052

5 3-5 Copyright  Oracle Corporation, 1999. All rights reserved. ARCHIVELOG Mode Online redo log files LGWR Archived log files 053 052 051 Redo history 054 052 054 052 053 051 053 051

6 3-6 Copyright  Oracle Corporation, 1999. All rights reserved. Set ARCHIVELOG Destination ARC0 LOG_ARCHIVE_DEST LOG_ARCHIVE_FORMAT /disk1/archive/ Archived log file Online redo log files 052 053 Group 1 Group 2 052 053 arch%s.arc

7 3-7 Copyright  Oracle Corporation, 1999. All rights reserved. Duplexing ARCHIVELOG Files ARC0 Online redo log files 052 053 LOG_ARCHIVE_DUPLEX_DEST 052 Group 1 Group 2 LOG_ARCHIVE_DEST Archived log files

8 3-8 Copyright  Oracle Corporation, 1999. All rights reserved. Specifying Multiple Archive Locations Specify up to five archival destinations by using LOG_ARCHIVE_DEST_n Either local disk or remote database Use LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST Specify up to five archival destinations by using LOG_ARCHIVE_DEST_n Either local disk or remote database Use LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST log_archive_dest = /archive1/arch log_archive_duplex_dest = /archive2/arch log_archive_dest = /archive1/arch log_archive_duplex_dest = /archive2/arch log_archive_dest_1 = "LOCATION=/archive1" log_archive_dest_2 = "SERVICE=standby_db1" log_archive_dest_1 = "LOCATION=/archive1" log_archive_dest_2 = "SERVICE=standby_db1"

9 3-9 Copyright  Oracle Corporation, 1999. All rights reserved. Multiple Archive Options Set archive location as MANDATORY or OPTIONAL Define time before retry in case of failures Set archive location as MANDATORY or OPTIONAL Define time before retry in case of failures log_archive_dest_1="LOCATION=/archive MANDATORY REOPEN" log_archive_dest_2="SERVICE=standby_db1 MANDATORY REOPEN=600" log_archive_dest_3="LOCATION=/archive2 OPTIONAL" log_archive_dest_1="LOCATION=/archive MANDATORY REOPEN" log_archive_dest_2="SERVICE=standby_db1 MANDATORY REOPEN=600" log_archive_dest_3="LOCATION=/archive2 OPTIONAL"

10 3-10 Copyright  Oracle Corporation, 1999. All rights reserved. Specifying Minimum Number of Local Destinations LOG_ARCHIVE_MIN_SUCCEED_ DEST parameter An online redo log group can be reused only if: – Archiving has been done to all mandatory locations – The number of local locations archived is greater than or equal to the value of the LOG_ARCHIVE_MIN_SUCCEED_ DEST parameter LOG_ARCHIVE_MIN_SUCCEED_ DEST parameter An online redo log group can be reused only if: – Archiving has been done to all mandatory locations – The number of local locations archived is greater than or equal to the value of the LOG_ARCHIVE_MIN_SUCCEED_ DEST parameter log_archive_min_succeed_dest = 2

11 3-11 Copyright  Oracle Corporation, 1999. All rights reserved. Controlling Archiving to a Destination An archival destination may be disabled by a new (dynamic) initialization parameter: LOG_ARCHIVE_DEST_STATE _n Archiving to a destination can be enabled again: An archival destination may be disabled by a new (dynamic) initialization parameter: LOG_ARCHIVE_DEST_STATE _n Archiving to a destination can be enabled again: log_archive_dest_state_2 = DEFER log_archive_dest_state_3 = DEFER log_archive_dest_state_2 = DEFER log_archive_dest_state_3 = DEFER log_archive_dest_state_2 = ENABLE ALTER SYSTEM SET log_archive_dest_state_3 = ENABLE

12 3-12 Copyright  Oracle Corporation, 1999. All rights reserved. Enabling ARCHIVELOG Mode Init.ora Control file Shutdown normal 1 Startup mount 2 Alter database ARCHIVELOG 3 Alter database open 4 Shutdown normal or immediate 5 Full database backup 6

13 3-13 Copyright  Oracle Corporation, 1999. All rights reserved. Set Multiple ARCn Processes The dynamic parameter controls the number of archive processes: LOG_ARCHIVE_MAX_PROCESSES The parameter LOG_ARCHIVE_START set to TRUE or FALSE controls automatic or manual archiving The dynamic parameter controls the number of archive processes: LOG_ARCHIVE_MAX_PROCESSES The parameter LOG_ARCHIVE_START set to TRUE or FALSE controls automatic or manual archiving

14 3-14 Copyright  Oracle Corporation, 1999. All rights reserved. Automatic archiving by setting the LOG_ARCHIVE_START initialization parameter to TRUE Manual archiving by setting the LOG_ARCHIVE_START initialization parameter to FALSE Automatic archiving by setting the LOG_ARCHIVE_START initialization parameter to TRUE Manual archiving by setting the LOG_ARCHIVE_START initialization parameter to FALSE Enabling Archive Process 053 DBA ARC1 ARC0

15 3-15 Copyright  Oracle Corporation, 1999. All rights reserved. Enabling Automatic Archiving in an Opened Instance ALTER SYSTEM ARCHIVE LOG START TO ‘?/dbs/arch’; 1 2 ARC0 052 051052 3 051 Online redo logs

16 3-16 Copyright  Oracle Corporation, 1999. All rights reserved. Enabling Archive Processes at the Start of an Instance ARC0 052 051 Archived log files 053 051 052 Archived Archived Current LOG_ARCHIVE_START=TRUE LOG_ARCHIVE_MAX_PROCESSES=n Online redo logs LOG_ARCHIVE_DESTLOG_ARCHIVE_DUPLEX_DEST LOG_ARCHIVE_DEST_n

17 3-17 Copyright  Oracle Corporation, 1999. All rights reserved. Stop or Start Additional Archive Processes LOG_ARCHIVE_MAX_PROCESSES=2 1 Archived redo logs 053 Online redo logs ARC 0 ARC 1 2 ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES = 3; ARC2

18 3-18 Copyright  Oracle Corporation, 1999. All rights reserved. Disabling Archive Processing 1 2 Online redo logs ALTER SYSTEM ARCHIVE LOG STOP; ARC0 LOG_ARCHIVE_START 052 051 052 init.ora

19 3-19 Copyright  Oracle Corporation, 1999. All rights reserved. Selectively Archiving Log Files 1 Online redo logs ALTER SYSTEM ARCHIVE LOG SEQUENCE 052; Server Process 2 052 051 05 2 05 3

20 3-20 Copyright  Oracle Corporation, 1999. All rights reserved. Obtaining Archive Log Information V$ARCHIVE_DEST V$ARCHIVED_LOG V$LOG_HISTORY Data dictionary views Command line ARCHIVE LOG LIST; V$DATABASE V$ARCHIVE_PROCESSES

21 3-21 Copyright  Oracle Corporation, 1999. All rights reserved. Factors Influencing Time to Recover Fast-start recovery time is at best an estimate Recovery may take longer because: – Checkpoint target is changed only at specific time intervals – Additional recovery activities such as reading logs are not accounted for – Recovery time may be faster if parallel recovery is used Fast-start recovery time is at best an estimate Recovery may take longer because: – Checkpoint target is changed only at specific time intervals – Additional recovery activities such as reading logs are not accounted for – Recovery time may be faster if parallel recovery is used

22 3-22 Copyright  Oracle Corporation, 1999. All rights reserved. Monitoring Recovery Time Define FAST_START_IO_TARGET based on: – Service level required – AVGIOTIM column in V$FILESTAT Check impact of parameters from: – V$INSTANCE_RECOVERY – V$TARGETRBA Define FAST_START_IO_TARGET based on: – Service level required – AVGIOTIM column in V$FILESTAT Check impact of parameters from: – V$INSTANCE_RECOVERY – V$TARGETRBA

23 3-23 Copyright  Oracle Corporation, 1999. All rights reserved. Summary In this lesson, you should have learned that: Complete database recovery requires: – ARCHIVELOG mode – Archiving of redo logs – A database backup immediately after it is put into ARCHIVELOG mode Recovery time depends on: – FAST_START_IO_TARGET parameter – Parallelism – Other nonpredictable factors In this lesson, you should have learned that: Complete database recovery requires: – ARCHIVELOG mode – Archiving of redo logs – A database backup immediately after it is put into ARCHIVELOG mode Recovery time depends on: – FAST_START_IO_TARGET parameter – Parallelism – Other nonpredictable factors


Download ppt "Copyright  Oracle Corporation, 1999. All rights reserved. 3 Oracle Backup and Recovery Configuration."

Similar presentations


Ads by Google