态。不必连接到目标数据库。 ? 请输入命令两次,确认要删除方案。
九. IMPORT CATALOG
1.使用import catalog 命令用于合并recovery catalog方案到其他的并recovery catalog方案中,这个命令在以下情况使用: 当有不同版本的数据库有多个recovery catalog 方案时,合并所有的方案到一个方案里而不会丢失备份元数据。
移动recovery catalog 从一个数据库到另外一个数据库。
2.使用import catalog的前提: 源恢复目录方案版本必须等于当前执行命令的rman的版本。
3.导入恢复目录: 导入恢复目录到另一个恢复目录时,只需要源目录和目标目录保持连接性。 源恢复目录:导出恢复目录。 目标恢复目录: 接收源恢复目录的恢复目录。
例:To import a recovery catalog:
Start RMAN and connect as CATALOG to the destination recovery catalog schema. For example:
% rman
RMAN> CONNECT CATALOG 111cat@destdb;
Import the source recovery catalog schema, specifying the connection string for the source catalog.
For example, enter the following command to import the catalog owned by 102cat on database srcdb:
IMPORT CATALOG 102cat@srcdb;
A variation is to import metadata for a subset of the target databases registered in the source catalog. You can specify the databases by DBID or database name, as shown in the following examples:
IMPORT CATALOG 102cat@srcdb DBID=1423241, 1423242;
IMPORT CATALOG 102cat@srcdb DB_NAME=prod3, prod4;
Optionally, connect to a target database to check that the metadata was successfully imported. For example, the following commands connect to database prod1 as TARGET and list all backups for this database:
LIST BACKUP;
4.import catalog语法:
IMPORT CATALOG [DBID = [, ,…]] [DB_NAME=[, 是源恢复目录连接字符串。源恢复目录方案的版本必须等于RMAN 可执行文件的当前版本。如果需要,将源目录升级到当前RMAN 本版。 DBID:你可以指定数据库ID 的列表,数据库ID 的元数据应从源目录方案导入。未指定列表时,RMAN 将所有数据库ID 的元数据从源目录方案合并到目标目录方案中。如果已在恢复目录方案中注册了合并元数据的数据库,RMAN 就会发出错误消息。
DB_NAME:可以指定应导入其元数据的数据库的名称列表。如果数据库名称不明确,RMAN 就会发出错误消息。 NO UNREGISTER:默认情况下,导入的数据库ID 在成功导入后从源恢复目录方案中注销。使用NO UNREGISTER选项,可以强制RMAN 将导入的数据库ID 保留在源目录方案中。
5.有关使用的其它详细资料 ? 确保没有目标数据库既在源目录方案中注册,又在目标目录方案中注册。如果某个目标数据库在这两个方案中都注册了,请将此数据库从源目录中注销,然后重试导入。 ? 如果导入过程中操作失败,则将回退导入。从不存在部分导入的情况。 ? 源目录方案和目标目录方案中的存储脚本名称发生冲突时,RMAN 会重命名源目录方案的存储脚本。
十. virtual private catalog
1.使用此功能可以合并RMAN 资料档案库并保持职责分离,这是一项基本安全要求。 RMAN 目录已被增强,可用于创建数据库组和用户组的虚拟专用RMAN 目录。该目录的所有者将创建基本目录并为虚拟目录的所有者授予RECOVERY_CATALOG_OWNER权限。目录的所有者可为虚拟目录的所有者授予访问已注册数据库的权限或REGISTER权限。然后,虚拟目录所有者可连接到特定目标的目录,或者注册一个目标数据库。完成配置后,VPC 所有者可像使用标准基本目录一样使用虚拟专用目录。 作为目录所有者,你可以访问该目录中所有已注册的数据库信息。你可以列出使用SQL*Plus 命令注册的所有数据库: SELECT DISTINCT db_name FROM DBINC; 作为虚拟目录所有者,你只能查看授予了你访问权限的数据库。 注:如果目录所有者未被授予对目标数据库的SYSDBA或SYSOPER权限,则无法执行大多数RMAN 操作。
2.创建一个虚拟私有目录步骤:
The basic steps for creating a virtual private catalog are as follows:
Create the database user who will own the virtual private catalog (if this user does not exist) and grant this user access privileges.
This task is described in "Creating and Granting Privileges to a Virtual Private Catalog Owner".
Create the virtual private catalog.
This task is described in "Creating a Virtual Private Catalog".
来源: >
Creating and Granting Privileges to a Virtual Private Catalog Owner
This section assumes that you created the base recovery catalog.
Assume that the following databases are registered in the base recovery catalog: prod1, prod2, and prod3. The database user who owns the base recovery catalog is catowner. You want to create database user vpc1 and grant this user access privileges only to prod1 and prod2. By default, a virtual private catalog owner has no access to the base recovery catalog.
To create and grant privileges to a virtual private catalog owner:
Start SQL*Plus and connect to the recovery catalog database with a