Saturday, May 5, 2012

Recovery calalog creation RMAN


In my env i have 2 databases labdb & tstddup , i have decided to keep the recovery catalog for labdb at tstdbdup database.

Following are the steps done.

In tstdbdup database
========================

SQL> create tablespace RCAT datafile '+DATA' size 300M autoextend on;

Tablespace created.

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

User created.

SQL> grant recovery_catalog_owner to RMAN;

Grant succeeded.

SQL> exit

[oracle@localhost admin]$ echo $ORACLE_SID
labdb
[oracle@localhost admin]$ rman

Recovery Manager: Release 11.2.0.1.0 - Production on Sat May 5 15:56:57 2012

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

RMAN> connect catalog rman@tstdbdup

recovery catalog database Password:
connected to recovery catalog database

RMAN> create catalog;

recovery catalog created

RMAN> connect target /

connected to target database: LABDB (DBID=1788478824)




RMAN> report schema
2> ;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of report command at 05/05/2012 16:00:38
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

RMAN> exit


[oracle@localhost admin]$ echo $ORACLE_SID
labdb
[oracle@localhost admin]$ rman target / catalog rman/rman@tstdbdup

Recovery Manager: Release 11.2.0.1.0 - Production on Sat May 5 16:03:51 2012

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

connected to target database: LABDB (DBID=1788478824)
connected to recovery catalog database


[oracle@localhost ~]$ rman target / catalog rman/rman@tstdbdup

Recovery Manager: Release 11.2.0.1.0 - Production on Sat May 5 17:48:29 2012

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

connected to target database: LABDB (DBID=1788478824)
connected to recovery catalog database

RMAN> list backup;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
343     Full    9.95M      DISK        00:00:05     16-APR-12
        BP Key: 345   Status: AVAILABLE  Compressed: NO  Tag: TAG20120416T215518
        Piece Name: +DATA/labdb/autobackup/2012_04_16/s_780789318.666.780789321
  SPFILE Included: Modification time: 16-APR-12
  SPFILE db_unique_name: LABDB
  Control File Included: Ckp SCN: 1798072      Ckp time: 16-APR-12

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
356     Full    1006.71M   DISK        00:03:50     05-MAY-12
        BP Key: 359   Status: AVAILABLE  Compressed: NO  Tag: TAG20120505T160423
        Piece Name: +DATA/labdb/backupset/2012_05_05/nnndf0_tag20120505t160423_0.733.782496265
  List of Datafiles in backup set 356
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 2564333    05-MAY-12 +DATA/labdb/datafile/system.256.776203549
  2       Full 2564333    05-MAY-12 +DATA/labdb/datafile/sysaux.257.776203551
  3       Full 2564333    05-MAY-12 +DATA/labdb/datafile/undotbs1.258.776203551
  4       Full 2564333    05-MAY-12 +DATA/labdb/datafile/users.259.776203551

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
369     Full    9.95M      DISK        00:00:04     05-MAY-12
        BP Key: 374   Status: AVAILABLE  Compressed: NO  Tag: TAG20120505T160824
        Piece Name: +DATA/labdb/autobackup/2012_05_05/s_782496504.732.782496507
  SPFILE Included: Modification time: 05-MAY-12
  SPFILE db_unique_name: LABDB
  Control File Included: Ckp SCN: 2564582      Ckp time: 05-MAY-12

RMAN>

No comments:

Post a Comment