RMAN Catalog 学习与测试
目录
1 Catalog Overview
2 Catalog 安装与御载Catalog 安装与御载
3 Resetting a Database Incarnation in the Recovery Catalog
4 Resynchronizing the Recovery Catalog
5 Catalog Restored Script
6 只能在配置了Catalog环境下使用的命令
1 Catalog Overview
The RMAN repository is a set of metadata that RMAN uses to sotre information about the target database and its backup and recovery operations. You can either create a recovery catalog in which to store the repository, or let RMAN store the repository exclusively in the target database control file. (确认当使用Catalog时,备份信息是否同时写到控制文件和Catalog database? 确定,但控制文件中保存的信息容量有限,会很快被Overrided.)
Content of Catalog:
The recovery catalog contains information about RMAN operations, including:
Datafile and archived redo log backup sets and backup pieces.
Datafile copies
Archived redo logs and their copies
Tablespace and datafiles on the target database
Stored scripts
Persistent RMAN configuration settings
2 Catalog 安装与御载
<< RMAN学习笔记_Catalog 安装与御载>>
3 Resetting a Database Incarnation in the Recovery Catalog
测试恢复到以前的Incarnation.(有哪些限制呢?)
区别RMAN: ALTER DATABASE OPEN RESETLOGS与SQL: ALTER DATABASE OPEN RESETLOGS.
RMAN中执行完RESETLOGS后会自动执行RESET DATABASE 语句,指定新的incarnation为当前的incarnation, 而SQL中,不会自动执行RESET DATABASE,而必须手动执行RESET DATABASE语句.
4 Resynchronizing the Recovery Catalog
1) When resynchronizing, RMAN does the following:
1. Creates a snapshot control file.
2. Compares the recovery catalog to the snapshot.
3. Updates the catalog with information that is missing or changed.
2) Catalog的同步分为两种: 完全同步,部分同步, 分别对应Control File中的两部分信息.
3) BACKUP, COPY, DELETE等操作会自动执行同步,而Log Switch and Log Archive 不会自动同步, RESYNC CATALOG command to force a full resynchronization.
4) Catalog同步过程中会把当前控制文件的信息同步到Catalog, 同时也会把备份的控制文件中的信息同步过去.
5) 同步信息的类型有: Log History, Archived redo logs, Backup history, Physical schema.
6) 设置CONTROL_FILE_RECORD_KEEP_TIME值长点,以保证控制文件信息被Override之前被同步到了Catalog.
7) Snapshot control file
RMAN generates a snapshot control file, which is a temporary backup control file, each time it performs a full resynchronization.This snapshot control file ensures that RMAN has a consistent viwe of the control file.( oracle同步catalog時,會先建立個snapshot controlfile并且比較這個文件和catalog,完成比較后,oracle根據這個snapshot controlfile來同步catalog,并使它們保持一致)
5 Catalog Restored Script
Storing the script. in the recovery catalog instead of in an operating system text file has the advantage that it is accessible to any DBA that uses RMAN, regardless of which machine RMAN is executed on.
1 创建/替换脚本
CREATE SCRIPT. b_whole
{
BACKUP DATABASE PLUS ARCHIVELOG;
DELETE OBSOLETE;
}
REPLACE SCRIPT. b_whole
{
BACKUP DATABASE PLUS ARCHIVELOG;
DELETE OBSOLETE;
}
2 执行脚本
run { execute script. b_whole;}
3 Deleting Stored Scripts
DELETE SCRIPT. 'b_whole';
6 只能在配置了Catalog环境下使用的命令
The following commands are only available when you use a recovery catalog:
CREATE CATALOG, UPGRADE CATALOG, DROP CATALOG
CREATE SCRIPT, DELETE SCRIPT, REPLACE SCRIPT, PRINT SCRIPT
LIST INCARNATION
REGISTER DATABASE
REPORT SCHEMA AT TIME
RESET DATABASE
RESYNC CATALOG
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10248702/viewspace-628772/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10248702/viewspace-628772/