一、create catalog directory
2.1 alter tnsnames.ora,add CATADB alisa
[oracle@db1 admin]$ pwd
/u01/app/oracle/product/11.2.0/db_1/network/admin
[oracle@db1 admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora# Generated by Oracle configuration tools.
ORADB3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = db1.lhx.oracle.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oradb3)
)
)
CATADB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = db1.lhx.oracle.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = CATADB)
)
)
2.2 create catalog tablespace
SYS@CATADB> create tablespace cat_tbs datafile '/u01/app/oracle/oradata/CATADB/cat_tbs01.dbf' size 100m;
Tablespace created.
2.3 create Catalog administration account and grants
SYS@CATADB> create user catrman identified by oracle
2 temporary tablespace temp
3 default tablespace cat_tbs
4 quota unlimited on cat_tbs;
User created.
SYS@CATADB> grant recovery_catalog_owner,connect,resource to catrman;
Grant succeeded.
2.4 into RMAN and create catalog and upgrade
[oracle@db1 admin]$ rman
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Dec 20 14:21:41 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
RMAN> connect catalog catrman/oracle
connected to recovery catalog database
RMAN> create catalog;
recovery catalog created
RMAN> upgrade catalog;
recovery catalog owner is CATRMAN
enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> upgrade catalog;
recovery catalog upgraded to version 11.02.00.04
DBMS_RCVMAN package upgraded to version 11.02.00.04
DBMS_RCVCAT package upgraded to version 11.02.00.04
RMAN>
二、Rman Catalog Using
3.1 register database for destination database
[oracle@db1 ~]$ rman target / catalog catrman/oracle@CATADB
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Dec 20 14:22:16 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORADB3 (DBID=2731358481)
connected to recovery catalog database
RMAN> REGISTER DATABASE;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
2.43 RMAN optimizer
RMAN> CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
3.5 START PARALLE 2,
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
3.7 TEST
[oracle@db1 ~]$ rman target / catalog catrman/oracle@CATADB
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Dec 20 14:23:57 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORADB3 (DBID=2731358481)
connected to recovery catalog database
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;
Starting backup at 21-Dec-18
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=11 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=12 RECID=1 STAMP=955200594
channel ORA_DISK_1: starting piece 1 at 21-Dec-18
channel ORA_DISK_1: finished piece 1 at 21-Dec-18
piece handle=/u01/app/oracle/fast_recovery_area/ORADB3/backupset/2018_12_21/o1_mf_annnn_TAG20170920T132956_dw3z6o5j_.bkp tag=TAG20170920T132956 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 21-Dec-18
Starting backup at 21-Dec-18
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/oradb3/system01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/oradb3/test01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/oradb3/example01.dbf
......