16 Set Up RMAN on EXAMPLE
Overview
Here I register the EXAMPLE
database in the RMAN catalogue on GRIDCTRL
.
Procedure
TNSNAMES.ORA SetUp
The following lines are added to /u01/app/asm/product/11.1.0/db_1/network/admin/tnsames.ora
on both PENRITH1
and BANKSTOWN
:
repos = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = gridctrl.yaocm.id.au)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = repos.yaocm.id.au) ) )
Update .bashrc
Because the oracle
user has a different Oracle Home to that of the TNS Listener, I need to use the TNS_ADMIN
variable. The following line is added to ~/.bashrc
on both PENRITH1
and BANKSTOWN
:
export TNS_ADMIN=/u01/app/asm/product/11.1.0/db_1/network/admin
Register the RMAN Database via CLI
Only on PENRITH1
, I registered the EXAMPLE
database in the RMAN catalogue:
[oracle@penrith1 ~]$ rman target / catalog rman@repos Recovery Manager: Release 11.1.0.6.0 - Production on Mon Jan 9 23:44:05 2012 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: EXAMPLE (DBID=768137787) recovery catalog database Password: connected to recovery catalog database RMAN> register database; database registered in recovery catalog starting full resync of recovery catalog full resync complete RMAN> list incarnation; List of Database Incarnations DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time ------- ------- -------- ---------------- --- ---------- ---------- 1 17 EXAMPLE 768137787 PARENT 1 03-AUG-07 1 2 EXAMPLE 768137787 CURRENT 522753 08-JAN-12 RMAN> exit Recovery Manager complete.
Set Up RMAN Catalog Under OEM
I cannot use the existing RMAN
user, so I have to create a new one called OEM_RMAN
as follows:
CREATE USER "OEM_RMAN" PROFILE "DEFAULT" IDENTIFIED BY "*******" DEFAULT TABLESPACE "RMAN_CATALOG" TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK; GRANT "CONNECT" TO "OEM_RMAN"; ALTER USER "OEM_RMAN" QUOTA UNLIMITED ON "RMAN_CATALOG"; GRANT CREATE TYPE TO "OEM_RMAN";
Database Registration Fails
Whenever I try to use OEM to register the EXAMPLE
database in the recovery catalogue, I get the following error messages:
Recovery Manager: Release 11.1.0.6.0 - Production on Tue Jan 10 00:20:01 2012 Copyright (c) 1982, 2007, Oracle. All rights reserved. RMAN> RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== ORA-12162: TNS:net service name is incorrectly specified RMAN> connected to recovery catalog database RMAN> echo set on RMAN> register database; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of register command at 01/10/2012 00:20:01 RMAN-06171: not connected to target database RMAN> exit; Recovery Manager complete.
Conclusion
For some reason, OEM is unable to connect to the target database, EXAMPLE
. I will have to leave this for now and only use the CLI for RMAN.