暂无图片
暂无图片
2
暂无图片
暂无图片
暂无图片

Recovery Manager (RMAN) Enhancements in Oracle Database 12c Release 1 (12.1)

原创 yBmZlQzJ 2022-05-16
726

Multisection Image Copies and Incremental Backups

In previous releases it was only possible to perform multisection backups using conventional backup sets. In Oracle 12c, it is also possible to use multisection backups for image copy and incremental backups.

In all three cases, multisection backups are triggered by the addition of the SECTION SIZE clause of the BACKUP command, which indicates the size of the fragment to be processed by each slave. If the file size is smaller than the SECTION SIZE value, a multisection backup of that file is not performed.

# Backup set.
BACKUP SECTION SIZE 400M DATABASE;

# Image copy.
BACKUP AS COPY SECTION SIZE 400M DATABASE;

# Incremental and incrementally updated image copy.
BACKUP INCREMENTAL LEVEL 1 SECTION SIZE 400M DATABASE;
BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'mydb_incr_backup' SECTION SIZE 400M DATABASE;

Network-Enabled RESTORE

Restore and recovery operations can be performed directly over a network without the need to manually transfer files. This is done using the FROM SERVICE clause, which is used to specify an entry in the "tnsnames.ora" file pointing to the service the data should be sourced from. The documentation discusses two scenarios where this might be useful.

Using a file from a physical standby database to restore a missing/damaged file in the primary database.

RESTORE DATAFILE '/u01/oradata/primary/hr.dbf' FROM SERVICE standby_tns;

Refreshing a physical standby database from a primary database. This performs an incremental backup of the primary database and uses it to refresh the standby database.

RECOVER DATABASE FROM SERVICE primary_db;

There are some additional post-recovery steps to take when doing a network refresh of a standby database, described here.

RMAN Command-Line Interface Enhancements

The command line interface of RMAN has been simplified with respect to using SQL. Previously, SQL commands had to start with the SQL keyword and needed to be enclosed by quotes. In Oracle 12c this is no longer necessary for most commands. You also have the option of using the SQL keyword, without quoting the subsequent command.

# Pre-12c
SQL "ALTER SYSTEM SWITCH LOGFILE";

# 12c : Using SQL keyword.
SQL ALTER SYSTEM SWITCH LOGFILE;

# 12c : No SQL keyword.
ALTER SYSTEM SWITCH LOGFILE;

You can also do queries in a similar way to SQL*Plus.

RMAN> SELECT name FROM v$database;

NAME
---------
CDB1

RMAN>

The SQL commands available from RMAN directly are described here.

Storage Snapshot Optimization

Oracle 12c supports backups taken using 3rd party storage shapshots, without the need to put the database in backup mode. There are some requirements the storage must adhere to for this functionality to be supported, listed here.

Recovering using a snapshot performed in this manner requires the use of the SNAPSHOT TIME clause.

RECOVER DATABASE UNTIL TIME '04/25/2016 12:00:00' SNAPSHOT TIME '04/25/2016 13:00:00';


「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论