6 Administering Backup and Recovery

Oracle? Database 2 Day + Real Application Clusters Guide

11g Release 2 (11.2)

E17264-13

Overview of Oracle RAC Database Backup and Recovery

Note:

For the RMAN utility to work properly on Linux platforms, the $ORACLE_HOME/bin directory must appear in the PATH variable before the /usr/X11R6/bin directory.

The Enterprise Manager Guided Recovery capability provides a Recovery Wizard that encapsulates the logic required for a wide range of file restoration and recovery scenarios, including the following:

Complete restoration and recovery of the database

Point-in-time recovery of the database or selected tablespaces

Flashback Database

Other flashback features of Oracle Database for logical-level repair of unwanted changes to database objects

Media recovery at the block level for data files with corrupt blocks

If the database files are damaged or need recovery, then Enterprise Manager can determine which parts of the database must be restored from a backup and recovered, including early detection of situations such as corrupted database files. Enterprise Manager
guides you through the recovery process, prompting for needed information and performing the required recovery actions.

注意:在linux平台上,为了保持RMAN功能可以正常,$ORACLE_HOME/bin必须在PATH的定义里面,而且必须要在/usr/X11R6/bin的前面,切记!!!

About the Fast Recovery Area in Oracle RAC

Using a fast recovery area minimizes the need to manually manage disk space for your backup-related files and balance the use of space among the different types of files. Oracle recommends that you enable a fast recovery area to simplify your backup management.

The larger the fast recovery area is, the more useful it becomes. Ideally, the fast recovery area should be large enough to contain all the following files:

A copy of all data files

Incremental backups

Online redo logs

Archived redo log files that have not yet been backed up

Control files and control file copies

Autobackups of the control file and database initialization parameter file

The fast recovery area for an Oracle RAC database must be placed on an Oracle ASM disk group, a cluster file system, or on a shared directory that is configured through a network file system file for each Oracle RAC instance. In other words, the fast recovery
area must be shared among all of the instances of an Oracle RAC database. The preferred configuration for Oracle RAC is to use Oracle Automatic Storage Management (Oracle ASM) for storing the fast recovery area, using a different disk group for your recovery
set than for your data files.

The location and disk quota must be the same on all instances. Oracle recommends that you place the fast recovery area on the shared Oracle ASM disks. In addition, you must set the DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE parameters to the same
values on all instances.

To use the fast recovery feature, you must first configure the fast recovery area for each instance in your Oracle RAC database.

----Oracle强烈建议把fast recovery area放在共享的ASM磁盘上,并且在所有实例都设置相同的DB_RECOVERY_FILE_DEST,DB_RECOVERY_FILE_DEST_SIZE 参数.

Archiving the Oracle Real Application Clusters Database Redo Logs

To make your data highly available, it is important to configure the database so you can recover your data after a system failure. Redo logs contain a record of changes that were made to datafiles. Redo logs are stored in redo log groups, and you must have
at least two redo log groups for your database.

After the redo log files in a group have filled up, the log writer process (LGWR) switches the writing of redo records to a new redo log group. Oracle Database can automatically save the inactive group of redo log files to one or more offline destinations,
known collectively as the archived redo log (also called the archive log). The process of turning redo log files into archived redo log files is called archiving.

When you archive your redo log, you write redo log files to another location before they are overwritten. This location is called the archived redo log. These copies of redo log files extend the amount of redo data that can be saved and used for recovery. Archiving
can be either enabled or disabled for the database, but Oracle recommends that you enable archiving.

About Archived Redo Log Files for an Oracle RAC Database

When you use Oracle Database Configuration Assistant (DBCA) to create your Oracle Real Application Clusters (Oracle RAC) database, each instance is configured with at least two redo log files that are stored in the shared storage area. If you have a two-node
Oracle RAC database, then at least four redo logs are created for the database, two for each instance.

If you use a cluster file system to store the archived redo log files for your Oracle RAC database, then the redo log files are shared file system files. If you use Oracle ASM to store the archived redo log files for your Oracle RAC database, then each instance
automatically has access to all the archived redo log files generated by the database. If you use shared storage or raw devices to store the archived redo log files on each node, then you must configure the operating system to grant access to those directories
for each instance of the cluster database that needs access to them.

The primary consideration when configuring archiving is to ensure that all archived redo logs can be read from every node during recovery, and if possible during backups. During recovery, because the archived log destinations are visible from the node that
performs the recovery, Oracle RAC can successfully recover the archived redo log data. For creating backups of your Oracle RAC database, the strategy that you choose depends on how you configure the archiving destinations for each node. Whether only one node
or all nodes perform archived redo log backups, you must ensure that the archived redo logs for every instance are backed up.

To backup the archived redo logs from a single node, that node must have access to the archived log files of the other instances. The archived redo log naming scheme that you use is important because when a node writes to a log with a specific filename on its
file system, the file must be readable by any node that must access this archived redo log. For example, if node1 archives a log to /oracle/arc_dest/log_1_100_23452345.arc, then node2 can back up this archived redo log only if it can read/oracle/arc_dest/log_1_100_23452345.arc
on its own file system.

About Parallelism and Backups Across Multiple RMAN Channels

Recovery Manager (RMAN) depends on server sessions, processes that run on the database server, to perform backup and recovery tasks. Each server session in turn corresponds to an RMAN channel, representing one stream of data to or from a backup device. RMAN
supports parallelism, which is the use of multiple channels and server sessions to perform the work of a single backup job or file restoration task.

Because the control file, SPFILE, and data files are accessible by any instance, the backup operation of these files is distributed across all the allocated channels. For backups of the archived redo log, the actions performed by RMAN depend on the type of
archiving scheme used by your Oracle RAC database.

If you use a local archiving scheme, then each instance writes the archived redo log files to a local directory. When multiple channels are allocated that have access to the archived redo log, for each archived redo log file, RMAN determines which channels
have access to that archived redo log file. Then, RMAN groups the archived redo log files that can be accessed by a channel and schedules a backup job using that channel.

If each node in the cluster writes the archived redo log files to Oracle ASM, a clustered file system, or other type of shared storage, then each instance has access to all the archived redo log files. In this case, the backup of the archived redo log is distributed
across all the allocated channels.

Configuring Archiving for Your Oracle RAC Database

For Oracle RAC, each instance has its own thread of redo. The preferred configuration for Oracle RAC is to configure the fast recovery area using an Oracle ASM disk group that is separate from the Oracle ASM disk group used for your data files. Alternatively,
you can use a cluster file system archiving scheme.

To configure archiving for your Oracle RAC database:

On the Database Home page of Enterprise Manager Database Control, while logged in as a SYSDBA user, select Availability.

The Availability subpage appears.

In the Backup/Recovery section, under the heading Setup, select Recovery Settings.

The Recovery Settings page appears.

In the Media Recovery section, select the ARCHIVELOG mode option.

In the Log Archive Filename Format field, accept the default value, or enter the desired format.

For clustered databases, the format for the archive log file name should contain the %t modifier, to indicate which redo log thread the archived redo log file belongs to. As a best practice, the format for the archive log file name should also include the %s
(log sequence number) and %r (resetlogs identifier) modifiers.

If the archive log destination is the same for all instances, then in the Archive Log Destination field, change the value to the location of the archive log destination for the cluster database.

For example, you might set it to +DATA if using Oracle ASM, or to /u01/oradata/arch if you want local archiving on each node.

If you must configure a different archive log destination for any instance, then you must go to the Initialization Parameters page and modify the LOG_ARCHIVE_DEST_1 parameter that corresponds to the instance for which you want to configure the archive log destination.
The Instance column should display the name of the instance, for example sales1. Change the Value field to contain the location of the archive log destination for that instance.

About Configuring Access to the Archive Log

During recovery, because the archive log file destinations are visible from the node that performs the recovery, Oracle RAC can successfully access the archived redo log files during recovery.

If you do not use shared storage or a clustered file system to store the archived redo log files for your cluster database, then you must make the archived redo log files available to the node performing the recovery.

时间: 2024-10-11 18:11:00

6 Administering Backup and Recovery的相关文章

Backup and Recovery Strategies1

2.1.Data Recovery Strategy Determines Backup Strategy 当设计备份策略时,应该以数据恢复需求和数据恢复策略开始.每一种类型的数据恢复需要你采取适当的备份类型.失败会发生在用户错误,数据文件块损坏,介质失败.你可以重新开始数据库的正常操作的速度是哪种还原.恢复技术类型的运行过程.每种还原和恢复技术强加需要在备份策略上,包括数据库要使用的特性,存储和管理你的备份. 当考虑恢复策略时,要问自己的问题有: (1)如果磁盘失败和损坏一些数据库文件,比如数

Backup and Recovery Basics2

1.6.Automatic Disk-Based Backup and Recovery: The Flash Recovery Area 创建不同备份和恢复文件的组件对每一个文件系统的大小没有不论什么了解.使用Automatic Disk-Based Backup and Recovery,你能够创建一个闪回恢复区,使备份文件的管理自己主动化. 在磁盘上选择一个位置,为存储空间提供一个更大的边界,同一时候设置一个备份策略,那么数据库在那块空间管理用做备份的存储.归档日志和其它与恢复相关的文件.

官方文档备份指南一 Introduction to Backup and Recovery

1.备份分为:物理备份和逻辑备份 物理备份:备份数据文件  控制文件  归档日志文件 逻辑备份:EXP EXPDP备份等 物理备份为主,逻辑做补充 2.错误的类型 media failure :介质失败.磁盘不能读写 user error: 操作错误 application error:应用程序错误 3.备份的方式 RMAN                                :RMAN备份 User managed backup      :用户手工备份 4. 关于RMAN备份的一些

Database Backup and Recovery Basics2

1.6.Automatic Disk-Based Backup and Recovery: The Flash Recovery Area 创建不同备份和恢复文件的组件对每个文件系统的大小没有任何了解.使用Automatic Disk-Based Backup and Recovery,你可以创建一个闪回恢复区,使备份文件的管理自动化.在磁盘上选择一个位置,为存储空间提供一个更大的边界,同时设置一个备份策略,那么数据库在那块空间管理用做备份的存储.归档日志和其他与恢复相关的文件.oracle建议

Database Backup and Recovery Basics

一.Backup and Recovery Overview 1.Backup and Recovery Overview 1.1 What is Backup and Recovery? 一般,备份和恢复引用各个策略和过程保护你的数据库背离数据丢失,同时在任何一种数据丢失后重建数据库. 1.1.1 Physical Backups and Logical Backups 一个备份是来自数据库文件的一个拷贝,它可以用做重建数据.备份可以被分为物理备份和逻辑备份. 物理备份是被用做还原和恢复数据库

Backup and Recovery Basics(10g)- 目录

今天先把目录搬上来,后续会翻译相应的章节,并更新超链接,希望对想学习oracle的人有所帮助.fighting Contents Title and Copyright Information Preface Audience Documentation Accessibility Related Documentation Conventions 1 Backup and Recovery Overview 1.1 What is Backup and Recovery? 1.1.1 Phys

Performing User-Managed Database-18.7、Performing Complete User-Managed Media Recovery

18.7.Performing Complete User-Managed Media Recovery 完毕一致性备份,把数据库恢复到当前的scn是最好的结果.能够恢复整个数据库.恢复单个表空间.或恢复数据文件.一致性恢复不须要resetlogs打开数据库,非一致性恢复须要resetlogs打开数据库.Backup and Recovery Basics提供了关于介质恢复的信息. 18.7.1.Performing Closed Database Recovery 能够在一个操作中恢复全部损坏

官方文档 恢复备份指南三 Recovery Manager Architecture

本节讨论以下问题: About the RMAN Environment                        关于RMAN环境 RMAN Command-Line Client                            RMAN命令行 RMAN Channels                                                      RMAN通道 RMAN Repository                                

Setting Up and Configuring Backup and Recovery1

3.Setting Up and Configuring Backup and Recovery 这个单元讲述如何启动.与rman client如何互动,准备rman环境,实现备份和恢复策略 注意:尽管闪回数据库和安全还原点不是真的数据库备份,但是它们是数据保护策略一个重要部分.这些特性需要一些初始化设置,这些设置依赖于在备份策略中你怎么混合它们.Chapter 5-Data Protection with Restore Points andFlashback Database 提供了关于怎么