Create recovery catalog Configure Recovery Manager

byfree發表於2012-05-10

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章