2009년 8월 11일 화요일

Catalog Database

▣ RMAN Repository Data Storage : Comparison of Options

▶ control file (기본)

  • Simpler administration
  • 문제점 : control file 손실시 backup repository도 손실 됨

   

▶ recovery catalog

  • Replicates control file data
  • Has room(디스크 공간) for more data
  • Can service many targets
  • Can store RMAN scripts

   

▣ Catalog DB 셋팅

   

[oracle@orcl ~]$ sqlplus sys/oracle@192.168.0.119:1521/orcl.oracle.com as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 19 17:27:24 2009

   

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

   

   

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

   

S SYS> create user rman identified by cat

  2 temporary tablespace temp

  3  default tablespace users

  4  quota unlimited on users;

User created.

   

   

S SYS> grant recovery_catalog_owner to rman;

Grant succeeded.

   

[oracle@orcl ~]$ rman catalog rman/cat@192.168.0.119:1521/orcl.oracle.com

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jun 17 15:05:13 2009

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

connected to recovery catalog database

RMAN>

RMAN> create catalog tablespace users;

Recovery catalog created

   

   

[oracle@orcl ~]$ rman target / catalog rman/cat@192.168.0.119:1521/orcl.oracle.com

RMAN> register database;

   

catalog DB가 죽어서 RMAN target / 으로 접속해서 백업한 경우

  • 평상시대로 접속
  • resync catalog;

       

확인

[oracle@orcl ~]$ sqlplus rman/cat@192.168.0.119:1521/orcl.oracle.com

   

S RMAN> select * from ts;      =>      테이블 스페이스 명 확인

 DBINC_KEY        TS# TS_NAME                        CREATE_SCN CREATE_TI BIG TEM   DROP_SCN DROP_TIME INC ENC

---------- ---------- ------------------------------ ---------- --------- --- --- ---------- --------- --- ---

         2          0 SYSTEM                                  9 30-JUN-05 NO  NO                       YES

         2          1 UNDOTBS1                           444079 30-JUN-05 NO  NO                       YES

         2          2 SYSAUX                               6609 30-JUN-05 NO  NO                       YES

         2          3 TEMP                               446157 16-MAY-09 NO  YES                      NO

         2          4 USERS                               10566 30-JUN-05 NO  NO                       YES

         2          6 EXAMPLE                            467899 16-MAY-09 NO  NO                       YES

         2         11 UNDO_SPACE                        2576264 03-JUN-09 NO  NO                       YES

         2         16 INVENTORY                         2583451 03-JUN-09 NO  NO                       YES

         2         20 RCAT_TS                           6664213 17-JUN-09 NO  NO                       YES

S RMAN> select * from bs;    

=>     rman target / 에서는 1개만 보이지만 catalog 에서는 2개 보임(datafile과 control파일/spfile 포함했기 때문에 2개로 보임 rman target /은 datafile만)

    BS_KEY     DB_KEY   BS_RECID   BS_STAMP  SET_STAMP  SET_COUNT B INCR_LEVEL     PIECES START_TIM COMPLETIO

---------- ---------- ---------- ---------- ---------- ---------- - ---------- ---------- --------- ---------

S CONTROL INP KEEP_OPTIONS KEEP_UNTI BLOCK_SIZE

- ------- --- ------------ --------- ----------

       148          1          1  689782551  689782429          1 D                     1 17-JUN-09 17-JUN-09

A NONE    NO             0                 8192

       149          1          2  689782555  689782554          2 D                     1 17-JUN-09 17-JUN-09

A BACKUP  NO             0                16384

   

   

S RMAN> select * from rc_backup_set;     =>     백업셋 확인

    DB_KEY      DB_ID     BS_KEY      RECID      STAMP  SET_STAMP  SET_COUNT B INCREMENTAL_LEVEL     PIECES

---------- ---------- ---------- ---------- ---------- ---------- ---------- - ----------------- ----------

START_TIM COMPLETIO ELAPSED_SECONDS S CONTROL INP KEE KEEP_UNTI KEEP_OPTIO

--------- --------- --------------- - ------- --- --- --------- ----------

         1 1214748264        148          1  689782551  689782429          1 D                            1

17-JUN-09 17-JUN-09             122 A NONE    NO  NO

         1 1214748264        149          2  689782555  689782554          2 D                            1

17-JUN-09 17-JUN-09               1 A BACKUP  NO  NO

   

S RMAN> select RECID,handle from RC_BACKUP_PIECE_DETAILS;

     RECID

----------

HANDLE

--------------------------------------------------------------------------------------------------------------

         1

/u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_06_17/o1_mf_nnndf_TAG20090617T141348_53jywfhy_.bkp

         2

/u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_06_17/o1_mf_ncsnf_TAG20090617T141348_53jz0csx_.bkp

댓글 없음:

댓글 쓰기