ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Create recovery catalog Configure Recovery Manager

Create recovery catalog Configure Recovery Manager

原创 Linux操作系统 作者:byfree 时间:2012-05-10 16:49:31 0 删除 编辑

OEL5.5
version:10.2.0.1

 

Creating the Recovery Catalog: Three Steps
1.Configure the database in which you will store the recovery catalog.
2.Create the recovery catalog owner.
3.Create the recovery catalog.
 
1.Configure the database in which you will store the recovery catalog.
创建catdb表空间
create tablespace cat_ts datafile '/u01/app/oracle/oradata/cat_ts.dbf' size 20M autoextend on;
 
2.Create the recovery catalog owner.
创建cat用户
create user cat identified by cat default tablespace cat_ts quota unlimited on cat_ts;
给cat用户授权
grant recovery_catalog_owner to cat;
role recovery_catalog_owner包含了:alter session, create cluster, create database link, create procedure, create sequence, create session, create synonym, create table, create trigger, create type, and create view
 
3.Create the recovery catalog.
RMAN> connect catalog cat/cat
RMAN> create catalog;
recovery catalog created
 
下面是注册database进入catalog
Registering a Database in the Recovery Catalog
[oracle@localhost ~]$ rman target / catalog cat/cat
Recovery Manager: Release 10.2.0.1.0 - Production on Thu May 10 15:23:44 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
connected to target database: OCM (DBID=2165285755)
connected to recovery catalog database
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
 
SQL> conn cat/cat
SQL> select * from rc_database;
    DB_KEY  DBINC_KEY       DBID NAME     RESETLOGS_CHANGE# RESETLOGS
---------- ---------- ---------- -------- ----------------- ---------
         1          2 2165285755 OCM                      1 07-MAY-12
 
Unregistering a Target Database from the Recovery Catalog
[oracle@localhost ~]$ rman target / catalog cat/cat
Recovery Manager: Release 10.2.0.1.0 - Production on Thu May 10 15:37:13 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
connected to target database: OCM (DBID=2165285755)
connected to recovery catalog database
RMAN> unregister database;
database name is "OCM" and DBID is 2165285755
Do you really want to unregister the database (enter YES or NO)? y
database unregistered from the recovery catalog
 
Cataloging Additional Backup Files
RMAN> CATALOG CONTROLFILECOPY '/disk1/controlfile_bkup/2006_01_01/control01.ctl';
RMAN> CATALOG DATAFILECOPY '/disk1/datafile_bkup/2006_01_01/users01.dbf';
RMAN> CATALOG ARCHIVELOG '/disk1/arch_logs/archive1_731.log','/disk1/arch_logs/archive1_732.log';
RMAN> CATALOG BACKUPPIECE '/disk1/backups/backup_820.bkp';
You can catalog all files in the currently enabled Flash Recovery Area as follows:
RMAN> CATALOG RECOVERY AREA NOPROMPT;
Use the following command to catalog all valid backups in the specified location:
RMAN> CATALOG START WITH '/tmp/arch_logs';

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/17997/viewspace-723249/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-04-16

  • 博文量
    65
  • 访问量
    211065