ITPub博客

首页 > IT基础架构 > 网络安全 > 9I Catalog Configure

9I Catalog Configure

原创 网络安全 作者:ysjxjf 时间:2008-02-14 15:14:31 0 删除 编辑

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:

  1. Connect to the database that will contain the catalog as the catalog owner. For example, enter the following from the operating system command line:

2. % rman CATALOG rman/rman@wilian

3.

You can also connect from the RMAN prompt:

% rman

RMAN> CONNECT CATALOG rman/rman@rcat

  1. Run the CREATE CATALOG command to create the catalog. If the catalog tablespace is this user's default tablespace, then you can run this command:

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.

  1. Optionally, start SQL*Plus and query the recovery catalog to see which tables were created:

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:

  1. Connect to the target database and recovery catalog. For example, issue the following to connect to the catalog database rcat as RMAN:

2. % rman TARGET / CATALOG rman/rman@rcat

3.

  1. If the target database is not mounted, then mount or open it. For example, issue:

3. STARTUP MOUNT;

4.

The recovery catalog database must be open.

  1. To use RMAN with a target database, you must first register the database. Run the following command:

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.

  1. Test that the registration was successful by running REPORT SCHEMA. This command shows the database structure as it is stored in the repository. For example:

RMAN> report schema;

  1. If there are any existing user-created copies of datafiles or archived logs on disk that were created under Oracle release 8.0 or higher, you can add them to the recovery catalog with the CATALOG command. For example:

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:

    • Datafile copies made when the database was shut down consistently. The database must not have been opened again before being migration.
    • Datafile copies made after a tablespace became offline normal or read-only. The tablespaces must not have been brought online or made read/write again before migration.

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/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: Linux Raw Devices
请登录后发表评论 登录
全部评论

注册时间:2008-04-24

  • 博文量
    376
  • 访问量
    3279016