viernes, 2 de agosto de 2013

Oracle 11 - Creating RMAN Catalog


On this new post, information regarding how to create an RMAN catalog. It's a very easy process, with this step by step guide your RMAN catalog will be ready in 5 minutes.

Accomplishing this goal requires a dedicated database, in this example called RCAT, to store the rman catalog.

1.- Export ORACLE_SID to database instance name of RMAN catalog.

[oracle@racnode1 admin]$ export ORACLE_SID=RCAT1
[oracle@racnode1 admin]$ sqlplus / as sysdba

2.- Create tablespace where the catalog data will remain on RCAT instance.

SQL> create tablespace rman datafile '+DATA2' size 200m autoextend on;

Tablespace created.

3.- Create user to connect to catalog on RCAT instance.

SQL> create user rman identified by rman default tablespace rman quota unlimited on rman;

User created.

4.- Grant owner catalog privileges to rman user.

SQL> grant recovery_catalog_owner to rman;

Grant succeeded.

5.- Connect to catalog database with rman user and create the catalog.

[oracle@racnode1 admin]$ rman catalog rman/rman@RCAT

Recovery Manager: Release 11.2.0.1.0 - Production on Tue Jul 30 21:53:18 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to recovery catalog database

RMAN> create catalog;

recovery catalog created

6.- You can ensure login on RMAN user that metadata has been added.

[oracle@racnode1 ~]$ export ORACLE_SID=RCAT1
[oracle@racnode1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jul 30 22:09:29 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> select object_name,object_type,status from dba_objects where owner='RMAN';

OBJECT_NAME OBJECT_TYPE     STATUS
---------------------------------------- ------------------- -------
RC_PROXY_DATAFILE VIEW     VALID
RC_PROXY_CONTROLFILE VIEW     VALID
RC_RMAN_CONFIGURATION VIEW     VALID
BCR TABLE     VALID
BCR_P INDEX     VALID
RC_DATABASE_BLOCK_CORRUPTION VIEW     VALID
RC_PROXY_ARCHIVEDLOG VIEW     VALID
RC_RESTORE_POINT VIEW     VALID
RC_RMAN_STATUS VIEW     VALID
RC_SITE  VIEW     VALID
BP_I_2 INDEX     VALID
BS_I_1 INDEX     VALID
.
.
.

7.- Registering database on catalog.

[oracle@racnode1 ~]$ rman target / catalog rman@RCAT

Recovery Manager: Release 11.2.0.1.0 - Production on Tue Jul 30 22:14:05 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: RACDB (DBID=817802211)
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

8.- Cataloging an existing flash recovery area.

RMAN> catalog recovery area noprompt;

searching for all files in the recovery area

List of Files Unknown to the Database
=====================================
File Name: +fra/RACDB/CONTROLFILE/Current.256.820185477
File Name: +fra/RACDB/CONTROLFILE/Current.nuevo
cataloging files...
no files cataloged

List of Files Which Where Not Cataloged
=======================================
File Name: +fra/RACDB/CONTROLFILE/Current.256.820185477
  RMAN-07519: Reason: Error while cataloging. See alert.log.
File Name: +fra/RACDB/CONTROLFILE/Current.nuevo
  RMAN-07519: Reason: Error while cataloging. See alert.log.

List of files in Recovery Area not managed by the database
==========================================================
File Name: +FRA/racdb/onlinelog/group_5.261.820970867
  RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter
File Name: +FRA/racdb/onlinelog/group_6.262.820971003
  RMAN-07527: Reason: File was not created using DB_RECOVERY_FILE_DEST initialization parameter

number of files not managed by recovery area is 2, totaling 100.00MB


9.- If the catalog database stops temporally, or network problems blocks connectivity between target database and catalog database, could be necessary, re-syncing modifications made to controlfile against rman catalog once the problem is solved.

RMAN> resync catalog;

starting full resync of recovery catalog
full resync complete


No hay comentarios:

Publicar un comentario