首页 > IT基础架构 > 网络安全 > 9I Catalog Configure
SQL> create tablespace rman datafile 'E:ORACLEORADATATEST003RMAN.DBF' size 1
0M;
表空间已创建。
Create a user and schema for the recovery catalog. For example, enter:
SQL>
SQL> create user rman identified by rman
2 temporary tablespace temp
3 default tablespace rman
4 quota unlimited on rman;
用户已创建
SQL>
Grant the RECOVERY_CATALOG_OWNER role to the schema owner. This role provides the user with privileges to maintain and query the recovery catalog.
SQL> grant recovery_catalog_owner to rman;
授权成功。
Grant other desired privileges to the RMAN user.
SQL> grant connect , resource to rman;
授权成功。
Creating the Recovery Catalog
After creating the catalog owner, create the catalog itself with the RMAN CREATE CATALOG command.
To create the recovery catalog:
2. % rman CATALOG rman/rman@wilian
3.
You can also connect from the RMAN prompt:
% rman
RMAN> CONNECT CATALOG rman/rman@rcat
3. CREATE CATALOG;
4.
If the catalog tablespace is not the user's default tablespace, then you must specify it explicitly, as in this example:
# cattbs is not the catalog owner's default tablespace
CREATE CATALOG TABLESPACE cattbs;
Note that the creation of the catalog can take several minutes.
4. SQL> SELECT TABLE_NAME FROM USER_TABLES;
Registering a Database in the Recovery Catalog
Before using RMAN with a target database, you must register the target database in the recovery catalog. RMAN obtains all information it needs to register the target database from the database itself.
As long as each target database has a distinct DBID, you can register more than one target database in the same recovery catalog. For example, you can register target databases prod1, prod2, and prod3 in catalog schema rcat1. Note that you cannot register a specific database multiple times in the same recovery catalog: registration occurs only once. However, you can register a target database is multiple catalogs. For example, you can register target database prod1 in catalog schema rcat1 and in catalog schema rcat2.
Each database registered in a given catalog must have a unique database identifier (DBID), but not necessarily a unique database name. Consequently, you cannot clone a database manually and then register it in the same catalog with its parent. Instead, use the DUPLICATE command to create a test database with a unique identifier.
To register the target database:
2. % rman TARGET / CATALOG rman/rman@rcat
3.
3. STARTUP MOUNT;
4.
The recovery catalog database must be open.
4. REGISTER DATABASE;
5.
After you run REGISTER DATABASE, RMAN creates rows in the repository that contain information about the target database. Then, RMAN performs a full resynchronization with the catalog in which it transfers all pertinent data about the target database from the control file and saves it in the catalog.
RMAN> report schema;
CATALOG DATAFILECOPY '/os_backup/df1.bak';
CATALOG ARCHIVELOG '/backup/log1.arc', '/backup/log2.arc', '/backup/log3.arc';
6.
In some cases, datafile copies made of an Oracle7 database with operating systems can be cataloged. To be usable, the copies must not require any Oracle7 redo to be recovered, that is, they must be either of the following:
Note: To determine whether log records have aged out of the control file, compare the number of logs on disk with the number of records in V$ARCHIVED_LOG. |
C:Documents and SettingsAdministrator>rman catalog rman/rman@wilian
恢复管理器: 版本9.2.0.1.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
连接到恢复目录数据库
未安装恢复目录
RMAN> create catalog;
恢复目录已创建
RMAN> connect target sys/oracle@orcl
连接到目标数据库: ORCL (DBID=1173949920)
RMAN> register database;
注册在恢复目录中的数据库
正在启动全部恢复目录的 resync
完成全部 resync
RMAN>
[@more@]来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/66634/viewspace-999506/ ,如需转载,请注明出处,否则将追究法律责任。