The control file is successfully restored after the catalog is configured in Oracle.
Besides, the configuration of catalog is as follows:
1: catalog Database:
Export Oracle_SID = ezhoudg
1> Create a tablespace in the catalog Database for catalog
Create tablespace rman_ts datafile '/u02/ezhou/rman01.dbf' size 50 m extent management local uniform size 126 k;
2> create a user on the catalog Database and grant permissions to the user
Create user rman_user identified by rman_user default tablespace rman_ts quota unlimited on rman_ts;
Grant recovery_catalog_owner to rman_user;
Grant connect, resource to rman_user;
2: ezhou on the primary database:
Vi tnsname. ora (this file is in ezhou and ezhoudg)
[Oracle @ aoracle admin] $ vi tnsnames. ora
PRD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.190.140) (PORT = 1521 ))
)
(CONNECT_DATA =
(SID = EZHOU)
)
)
Catalog =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.190.140) (PORT = 1521 ))
)
(CONNECT_DATA =
(SID = EZHOUDG)
)
)
Start listening lsnrctl start
Tnsping catalog on the database
[Oracle @ aoracle ~] $ Tnsping catalog
TNS Ping Utility for Linux: Version 10.2.0.1.0-Production on 09-DEC-2011 19:41:31
Copyright (c) 1997,200 5, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.190.140) (PORT = 1521) (CONNECT_DATA = (SID = EZHOUDG )))
OK (10 msec)
3: on the primary database:
Export ORACLE_SID = ezhou
Register the primary database to catalog
[Oracle @ aoracle ~] $ Rman target/catalog rman_user/rman_user @ catalog
Recovery Manager: Release 10.2.0.1.0-Production on Fri Dec 9 19:45:32 2011
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected to target database (started)
Connected to recovery catalog database
RMAN> create catalog tablespace rman_ts;
Database registered in recovery catalog
Starting full resync of recovery catalog
Full resync complete
==================================
Perform the following tests:
[Oracle @ aoracle ~] $ Rman target/catalog rman_user/rman_user @ catalog
RMAN> run {
2> restore controlfile;
3>}
Starting restore at 09-DEC-11
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 155 devtype = DISK
Channel ORA_DISK_1: starting datafile backupset restore
Channel ORA_DISK_1: restoring control file
Channel ORA_DISK_1: reading from backup piece/u02/rman/ctl_c-4046377924-20111209-00
Channel ORA_DISK_1: restored backup piece 1
Piece handle =/u02/rman/ctl_c-4046377924-20111209-00 tag = TAG20111209T115410
Channel ORA_DISK_1: restore complete, elapsed time: 00:00:04
Output filename =/u02/ezhou/control01.ctl
Output filename =/u02/ezhou/control02.ctl
Output filename =/u02/ezhou/control03.ctl
Finished restore at 09-DEC-11