Rman Enhancements(增强) In Oracle 11g. (Doc ID 1115423.1)

Rman Enhancements In Oracle 11g. (Doc ID 1115423.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.2.0.3 [Release 11.1 to 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.

PURPOSE

This article provides us the list of RMAN enhancements in Oracle 11g release. 本文为我们提供了Oracle 11g发行版中RMAN增强功能的列表

SCOPE

This article is intended for DBA's having strong RMAN knowledge.  本文适用于具有丰富RMAN知识的DBA

DETAILS

Improved handling of long-term backups  改进了长期备份的处理

You can create a long-term or archival backup with BACKUP ... KEEP that retains only the archived log files needed to make the backup consistent.
您可以使用 BACKUP ... KEEP 创建长期备份或档案备份,该备份仅保留使备份保持一致所需的存档日志文件。
Prior to Oracle Database 11g, if you needed to preserve an online backup for a specified amount of time, RMAN assumed you might want to perform point-in-time recovery for any time within that period and RMAN retained all the archived logs for that time period unless you specified NOLOGS. However, you may have a requirement to simply keep the backup (and what is necessary to keep it consistent and recoverable) for a specified amount of time.
在Oracle Database 11g之前,如果您需要在指定时间内保留在线备份,RMAN假定您可能要在该时间段内的任何时间执行时间点恢复,并且RMAN会保留该时间段内的所有归档日志,除非您指定了NOLOGS。但是,您可能需要简单地将备份(以及保持一致和可恢复的必要条件)保留指定的时间。

From oracle 11g for the backup with keep option,RMAN includes the data files, archived log files (only those needed to recover an online backup), the relevant autobackup files, and spfiles. All these files must go to the same media family (or group of tapes) and have the same KEEP attributes.
在oracle 11g中,使用keep选项进行备份时,RMAN包括数据文件,归档日志文件(仅恢复在线备份所需的日志文件),相关的自动备份文件和spfile。所有这些文件都必须属于相同的介质系列(或磁带组),并且具有相同的KEEP属性。
The archival backup provides the RESTORE POINT clause which creates a œconsistency point in the control file. It assigns a name to a specific SCN. The SCN is captured just after the data-file backup completes. The archival backup can be restored and recovered for this point in time, enabling the database to be opened. In contrast, the UNTIL TIME clause specifies the date until which the backup must be kept.
档案备份提供了 RESTORE POINT 子句,该子句可创建“一致性”的点在控制文件中。它将名称分配给特定的SCN。数据文件备份完成后立即捕获SCN。可以在此时间点还原和恢复档案备份,从而可以打开数据库。相反,UNTIL TIME子句指定必须保留备份的日期。

Example
======
RMAN> backup database
2> tag monthly_backup
3> format 'd:\backup_%U'
4> keep forever
5> restore point y2007May;

Starting backup at 01-JUN-2010 19:57:58
current log archived

using channel ORA_DISK_1
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=D:\DATABASE\ORA11G\ORA11G\SYSTEM01.
input datafile file number=00002 name=D:\DATABASE\ORA11G\ORA11G\SYSAUX01.
input datafile file number=00004 name=D:\DATABASE\ORA11G\ORA11G\USERS01.D
input datafile file number=00003 name=D:\DATABASE\ORA11G\ORA11G\UNDOTBS01
channel ORA_DISK_1: starting piece 1 at 01-JUN-2010 19:58:04
channel ORA_DISK_1: finished piece 1 at 01-JUN-2010 20:01:00
piece handle=D:\BACKUP_06LF5PAC_1_1 tag=MONTHLY_BACKUP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:56

using channel ORA_DISK_1
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 01-JUN-2010 20:01:00
channel ORA_DISK_1: finished piece 1 at 01-JUN-2010 20:01:03
piece handle=D:\BACKUP_07LF5PFS_1_1 tag=MONTHLY_BACKUP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03


current log archived
using channel ORA_DISK_1
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=48 RECID=47 STAMP=720561667
channel ORA_DISK_1: starting piece 1 at 01-JUN-2010 20:01:12
channel ORA_DISK_1: finished piece 1 at 01-JUN-2010 20:01:15
piece handle=D:\BACKUP_08LF5PG7_1_1 tag=MONTHLY_BACKUP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

using channel ORA_DISK_1
backup will never be obsolete
archived logs required to recover from this backup will be backed up
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 01-JUN-2010 20:01:24
channel ORA_DISK_1: finished piece 1 at 01-JUN-2010 20:01:31
piece handle=D:\BACKUP_09LF5PGC_1_1 tag=MONTHLY_BACKUP comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 01-JUN-2010 20:01:31

Backup failover for archived redo logs in the flash recovery area  闪回恢复区域中归档重做日志的备份故障转移

The 11g Archived Redo Log Failover feature enables RMAN to complete a backup even when some archiving destinations are missing logs or contain logs with corrupt blocks where a local archivelog destination is configured alongside the FRA. If at least one log corresponding to a given log sequence and thread is available in the flash recovery area or any of the archiving destinations, then RMAN tries to back it up. If RMAN finds a corrupt block in a log file during backup, it searches other destinations for a copy of that log without corrupt blocks.
11g Archived Redo Log Failover 功能使RMAN能够完成备份,即使某些归档目标缺少日志或包含具有损坏块的日志,并且在本地归档日志目标与FRA一起配置的情况下。如果在闪回恢复区域或任何归档目标中至少有一个与给定日志序列和线程相对应的日志可用,则RMAN尝试对其进行备份。如果RMAN在备份过程中在日志文件中发现损坏的块,它将在其他目标位置搜索该日志的副本,而不会损坏块。
The following article explains this feature in detail.  下面的文章详细说明了此功能

Note 464860.1 11g New Features: Archived Redo Log Failover

Archived log deletion policy enhancements   归档日志删除策略增强

When you CONFIGURE an archived log deletion policy, the configuration applies to all archiving destinations, including the flash recovery area. Both BACKUP ... DELETE INPUT and DELETE ... ARCHIVELOG obey this configuration, as does the flash recovery area. You can also CONFIGURE an archived redo log deletion policy so that logs are eligible for deletion only after being applied to or transferred to standby database destinations. You can set the policy for mandatory standby destinations only, or for any standby destinations.
当您配置归档的日志删除策略时,该配置将应用于所有归档目标,包括闪回恢复区。BACKUP ... DELETE INPUT 和 DELETE ... ARCHIVELOG 都遵循此配置,闪回恢复区也是如此。您还可以配置归档的重做日志删除策略,以便仅在将日志应用于或转移到备用数据库目标之后才有资格删除日志。您可以仅对强制性备用目标或任何备用目标设置策略。

Examples
=======
RMAN> configure archivelog deletion policy to applied on standby;
RMAN> configure archivelog deletion policy to applied on standby;
RMAN> configure archivelog deletion policy to backed up 2 times to disk;

Network-enabled database duplication without backups  支持网络的数据库 duplication 而无需备份

From Oracle 11g release 1 you can use the DUPLICATE command to create a duplicate database or physical standby database over the network without a need for pre-existing database backups. This form of duplication is called active database duplication.
在 Oracle 11g release 1 中,您可以使用 DUPLICATE 命令通过网络创建重复数据库或物理备用数据库,而无需预先存在数据库备份。这种复制形式称为 active database duplication。
Please refer the following article for good understanding of active duplicate operation.  请参考以下文章,以更好地了解 active duplicate 操作

Note 452868.1 RMAN 'Duplicate Database' Feature in 11G

Rman Duplicate without target and recovery catalog connections.  

Oracle 11g release 2 provides the leverage of creating a duplicate database without connecting to the target database and recovery catalog.
Oracle 11g release 2 提供了无需创建目标数据库和恢复目录即可创建重复数据库的功能。
Please refer the following article for good understanding of this feature.  请参考以下文章,以更好地了解此功能

For disk backups:

( Doc ID 874352.1) RMAN 11GR2 : DUPLICATE Without Target And Recovery Catalog Connection

For disk and tape backups:
Note 1375864.1 Perform Backup Based RMAN DUPLICATE Without Connecting To Target Database For Both Disk & Tape Backups

Virtual Private Catalog

The owner of a recovery catalog can GRANT or REVOKE access to a subset of the catalog to other database users in the same recovery catalog database. This subset is called a virtual private catalog.
恢复目录的所有者可以向同一恢复目录数据库中的其他数据库用户授予或撤消对目录子集的访问权限。该子集称为虚拟专用目录
The owner of a centralized recovery catalog, which is also called the base recovery catalog, cangrant or revoke restricted access to the catalog to other database users. All metadata is stored in the base catalog schema.Each restricted user has full read-write access to his or her own metadata, which is called a virtual private catalog.
集中式恢复目录的所有者(也称为基本恢复目录)可以向其他数据库用户授予或撤消对该目录的受限访问。所有元数据都存储在基本目录架构中。每个受限制的用户对其自己的元数据拥有完全的读写访问权限,这称为虚拟私有目录。

Import Catalog command

With the IMPORT CATALOG command, you can import the metadata from one recovery catalog schema into a different catalog schema. If you created catalog schemas of different versions to store metadata for multiple target databases, then this command enables you to maintain a single catalog schema for all databases.
使用 IMPORT CATALOG 命令,可以将元数据从一个恢复目录架构导入到另一个目录架构。如果创建了不同版本的目录架构来存储多个目标数据库的元数据,则此命令使您能够为所有数据库维护单个目录架构
The following article explains about this feature.  下面的文章介绍了有关此功能

Note.419173.1 RMAN 11G Import Catalog

Multisection backups  

RMAN can back up a single file in parallel by dividing the work among multiple channels. Each channel backs up one file section. You create a multisection backup by specifying SECTION SIZE on the BACKUP command. Restoring a multisection backup in parallel is automatic and requires no option.
RMAN可以通过在多个通道之间分配工作来并行备份单个文件。每个通道备份一个文件部分。通过在BACKUP命令上指定SECTION SIZE,可以创建多节备份。并行还原多部分备份是自动的,不需要任何选择
The following article explains about this feature.  下面的文章介绍了有关此功能

Note.406295.1 RMAN 11G MultiSection Backups

Undo Optimization  Undo优化

In backup undo optimization, RMAN excludes undo not needed for recovery from the backup, that is, for transactions which have already been committed. For example, a user updates the salaries table in the USERS tablespace. The change is written to the USERS tablespace, while the before image of the data is written to the UNDO tablespace. The user commits. A subsequent RMAN backup of the UNDO tablespace does not include the undo information for the salary changes as a restore of this backup would already have the committed data.
在备份undo中,RMAN从备份中排除恢复所不需要的undo,即对于已提交的事务而言,不需要undo。例如,用户更新了USERS表空间中的薪金表。更改将被写入USERS表空间,而数据的前映像将被写入UNDO表空间。用户提交。后续的UNDO表空间的RMAN备份不包括工资变动的撤消信息,因为该备份的恢复中已经具有已提交的数据。
The following article explains about this feature.  下面的文章介绍了有关此功能

Note.406468.1 RMAN 11G RMAN UNDO backup optimization

Improved block media recovery performance  改善了块介质恢复性能

When performing block media recovery, RMAN automatically searches the flashback logs, if they are available, for the required blocks before searching backups. Using blocks from the flashback logs can significantly improve block media recovery performance.
执行块介质恢复时,RMAN会在搜索备份之前自动在所需的块中搜索闪回日志(如果可用)。使用闪回日志中的块可以显着提高块介质恢复性能。

Improved block corruption detection  改进的块损坏检测

Several database components and utilities, including RMAN, can now detect a corrupt block and record it in V$DATABASE_BLOCK_CORRUPTION. When instance recovery detects a corrupt block, it records it in this view automatically. Oracle Database automatically updates this view when block corruptions are detected or repaired. The VALIDATE command is enhanced with many new options such as VALIDATE ... BLOCK and VALIDATE DATABASE.Improved block corruption detection
现在,几个数据库组件和实用程序(包括RMAN)可以检测到损坏的块并将其记录在 V$DATABASE_BLOCK_CORRUPTION 中。当实例恢复检测到损坏的块时,它将自动将其记录在此视图中。当检测到或修复了块损坏时,Oracle数据库会自动更新此视图。VALIDATE命令通过许多新选项进行了增强,例如VALIDATE ... BLOCK 和 VALIDATE DATABASE。改进的块损坏检测
You can use the VALIDATE command to manually check for physical and logical corruptions in database files. This command performs the same types of checks as BACKUP VALIDATE, but VALIDATE can check a larger selection of objects. For example, you can validate individual blocks with the VALIDATE DATAFILE ... BLOCK command.
您可以使用 VALIDATE 命令来手动检查数据库文件中的物理和逻辑损坏。该命令执行与 BACKUP VALIDATE 相同的检查类型,但是 VALIDATE 可以检查更多的对象选择。例如,您可以使用 VALIDATE DATAFILE ... BLOCK 命令来验证各个块

Examples
========
RMAN > validate database;
RMAN > validate backupset 10;
RMAN > validate datafile 1 block 10;

Faster backup compression  更快的备份压缩

In addition to the existing BZIP2 algorithm for binary compression of backups, RMAN also supports the ZLIB algorithm. ZLIB runs faster than BZIP2, but produces larger files. ZLIB requires the Oracle Advanced Compression option. You can use the CONFIGURE COMPRESSION ALGORITHM command to choose between BZIP2 (default) and ZLIB for RMAN backups.
除了现有的用于备份二进制压缩的 BZIP2 算法外,RMAN还支持 ZLIB 算法。ZLIB 的运行速度比 BZIP2 快,但生成的文件更大。ZLIB需要 Oracle Advanced Compression 选项。您可以使用 CONFIGURE COMPRESSION ALGORITHM 命令在RMAN备份的BZIP2(默认)和ZLIB之间进行选择

Block change tracking support for standby databases  对备用数据库的块更改跟踪支持

You can enable block change tracking on a physical standby database. When you back up the standby database, RMAN can use the block change tracking file to quickly identify the blocks that changed since the last incremental backup.
您可以在物理备用数据库上启用块更改跟踪。备份备用数据库时,RMAN可以使用块更改跟踪文件快速识别自上次增量备份以来已更改的块。

Backup of read-only transportable tablespaces 

In previous releases, RMAN could not back up transportable tablespaces until they were made read/write at the destination database. Now RMAN can back up transportable tablespaces when they are not read/write and restore these backups.
在以前的版本中,RMAN无法备份可移动表空间,直到在目标数据库上对它们进行读写操作为止。现在,RMAN可以在不读取/写入可移动表空间时备份它们并还原这些备份。

RMAN Tablespace Point-in-Time Recovery (TSPITR) Enhancements  RMAN表空间时间点恢复(TSPITR)增强功能

From oracle 11g release 2 TSPITR can be used to recover a dropped tablespace and to recover to a point-in-time before the tablespace is brought online. The latter TSPITR operation can be repeated as many times as necessary.
从 oracle 11g release 2 开始,TSPITR可用于恢复已删除的表空间并将表空间恢复在线之前的时间点。后面的TSPITR操作可以根据需要重复多次
The steps to perform this operation remain the same as they were in previous release but the time/scn/sequence which you provide in the until clause should be prior to the tablespace drop.
执行此操作的步骤与先前版本中的步骤相同,但您在 until 子句中提供的 time/scn/sequence 应该在删除表空间之前。

SET NEWNAME Options  

The SET NEWNAME command is more powerful and easier to use. You can use this command on a specific tablespace or on all datafiles and tempfiles. You can also change the names for multiple files in the database.
SET NEWNAME 命令更强大,更易于使用。您可以在特定的表空间或所有数据文件和临时文件上使用此命令。您还可以更改数据库中多个文件的名称
The oracle 11g release 2 provides the the following options for set newname.
oracle 11g release 2 为set newname提供了以下选项

1. SET NEWNAME FOR DATAFILE and SET NEWNAME FOR TEMPFILE
2. SET NEWNAME FOR TABLESPACE
3. SET NEWNAME FOR DATABASE

The following Substitution Variables are introduced for SET NEWNAME in oracle 11g release 2.
在 oracle 11g release 2 中为 SET NEWNAME 引入了以下替换变量

%b  Specifies the file name stripped of directory paths. For example, if a datafile is named /oradata/prod/financial.dbf, then %b results in financial.dbf.
       --指定去除目录路径的文件名。 例如,如果数据文件名为 /oradata/prod/financial.dbf,则 %b 将生成 financial.dbf。
%f  Specifies the absolute file number of the datafile for which the new name is generated. For example, if datafile 2 is duplicated, then %f generates the value 2.
      --指定为其生成新名称的数据文件的绝对文件号。 例如,如果复制了数据文件2,则%f生成值2。
%I  Specifies the DBID.
%N  Specifies the tablespace name.
%U  Specifies the following format: data-D-%d_id-%I_TS-%N_FNO-%f.

Here are a few examples which depict the usage of these variables.  以下是一些描述这些变量用法的示例

1) If you want to restore the datafiles of a tablespace to a different location and retain the name file names, The following command can be used.
--如果要将表空间的数据文件还原到其他位置并保留名称文件名,则可以使用以下命令

RMAN > run
{
set newname for tablespace users to '/home/oradata/%b'
restore tablespace;
}

2) If you want to restore the entire database to a different location and you need the file names to be uniquely identified by their absolute filenumber,dbid and tablespace name then you can use the following syntax.
--如果要将整个数据库还原到其他位置,并且需要通过文件的绝对文件号,dbid 和表空间名称来唯一标识文件名,则可以使用以下语法
RMAN > run
{
set newname for database to '/home/oradata/%U';
restore database;
}

The resulting filename will be something like: /home/oradata/data-D-PROD_id-87650928_TS-SYSTEM_FNO-1
--生成的文件名将类似于:  /home/oradata/data-D-PROD_id-87650928_TS-SYSTEM_FNO-1

CONVERT DATABASE Option  

A new option, SKIP UNNECESSARY DATAFILES, is now supported for the CONVERT DATABASE command. When the option is invoked, the only datafiles that are converted are those that require RMAN processing during transfer between the specified platforms. The rest of the datafiles can be used by the destination database via shared storage or pathname. By skipping the conversion of datafiles that do not contain undo segments, overall database transport time can be reduced. You can use this option when converting at the source or converting ON DESTINATION PLATFORM.
现在,CONVERT DATABASE 命令支持一个新选项 SKIP UNNECESSARY DATAFILES。调用该选项时,唯一转换的数据文件是在指定平台之间传输期间需要RMAN处理的数据文件。其余数据文件可以由目标数据库通过共享存储或路径名使用。通过跳过不包含撤消段的数据文件的转换,可以减少总体数据库传输时间。在源上进行转换或在“目的地平台”上转换时,可以使用此选项

Expanded Backup Compression Levels  扩展的备份压缩级别

RMAN now offers a wider range of compression levels with the Advanced Compression Option (ACO). Although the existing BASIC compression option may be suitable for most environments, you may want to explore the ACO backup compression levels (LOW, MEDIUM, and HIGH) to achieve better performance or higher compression ratios.
RMAN现在通过高级压缩选件(ACO)提供了更大范围的压缩级别。尽管现有的BASIC压缩选项可能适用于大多数环境,但您可能希望探索ACO备份压缩级别(“低”,“中”和“高”)以获得更好的性能或更高的压缩率。
If you have enabled the Oracle Database 11g Release 2 Advanced Compression Option, you can choose from the following compression levels:
如果启用了 Oracle Database 11g Release 2 高级压缩选项,则可以从以下压缩级别中进行选择
HIGH          Best suited for backups over slower networks where the limiting factor is network speed 最适合通过速度较慢的网络进行备份,其中限制因素是网络速度
MEDIUM   Recommended for most environments. Good combination of compression ratios and speed  对于大多数环境建议使用。压缩率和速度
LOW          Least impact on backup throughput and suited for environments where CPU resources are the limiting factor.  对备份吞吐量的影响最小,并且适用于以CPU资源为限制因素的环境。

Example
======
RMAN> CONFIGURE COMPRESSION ALGORITHM 'HIGH';

INCARNATION Specifier Enhancement

Incarnations may now be used to further qualify archived redo log ranges for the BACKUP, RESTORE, and LIST commands. You can now specify ALL or CURRENT or designate a particular incarnation number when listing ranges of archived logs.
现在可以使用 Inarnation 进一步限定 BACKUP,RESTORE 和 LIST 命令的归档重做日志范围。现在,当列出归档日志的范围时,您可以指定 ALL 或 CURRENT 或指定特定的 incarnation 编号。
From oracle 11g release 2 the archivelogs can be listed,backed up and restored based on the incarnation to which they belong. This can be achieved by using the key word "incarnation all/current/integer". The incarnation integer is nothing but the Inc Key obtained from "list incarnation" output.
从 oracle 11g release 2 开始,可以基于归档日志的 incarnation 列出,备份和还原归档日志。这可以通过使用关键词 "incarnation all/current/integer" 来实现。 incarnation 整数不过是从 "list incarnation" 输出获得的密钥。

Examples
=======
RMAN> list archivelog sequence between 10 and 20 incarnation 2;
RMAN> backup archivelog sequence between 10 and 20 incarnation 1;
RMAN> restore archivelog sequence between 10 and 20 incarnation 1;

To Destination Syntax

TO DESTINATION syntax has been added to the BACKUP command. This addition allows you to designate a specific directory location for backups to disk and is primarily for use with the BACKUP RECOVERY AREA command. If backup optimization is enabled, then RMAN only skips backups of identical files that reside in the directory location specified by the TO DESTINATION option.
TO DESTINATION 语法已添加到BACKUP命令中。此附加项使您可以为磁盘备份指定特定的目录位置,并且主要用于BACKUP RECOVERY AREA命令。如果启用了备份优化,则RMAN仅跳过位于TO DESTINATION选项指定的目录位置中的相同文件的备份。

Examples
========
RMAN> backup tablespace users to destination 'd:\database';
RMAN> backup recovery area to destination 'd:\database';

REFERENCES

NOTE:1375864.1 - Perform Backup Based RMAN DUPLICATE Without Connecting To Target Database For Both Disk & Tape Backups
NOTE:406295.1 - MultiSection Backups
NOTE:419173.1 - RMAN 11G : Import Catalog
NOTE:452868.1 - RMAN 'Duplicate From Active Database' Feature in Oracle11g
NOTE:464860.1 - 11g New Features: Archived Redo Log Failover
NOTE:874352.1 - RMAN 11GR2 : DUPLICATE Without Target And Recovery Catalog Connection

猜你喜欢

转载自www.cnblogs.com/zylong-sys/p/12001605.html