2012. 7. 11. 17:36

No. 17151

RMAN: HOW TO USE ORACLE 9I CATALOG WITH ORACLE 8I DATABASE
==========================================================


PURPOSE
-------
Oracle8i database를 RMAN을 사용하여 backup하고 restore하고자 한다.
이때 Recovery catalog로서 oracle 9i를 사용하는 방법을 설명한다.



EXPLANATION
-----------

# ORACLE 9i DATABASE(catalog)에서 수행해야 하는 작업


1 -  Oracle9i db안에 rman user를 위한 tablespace를 생성한다.

     SQL> create tablespace example datafile '/oracle/oradata/example.dbf'
          size 200M;
                                
2 - Oracle9i database안에 rman user를 생성한다.

      SQL> create user rman identified by rman temporary tablespace temp
      2  default tablespace example quota unlimited  on example;
                                          
3 - rman user에게 connect, resource,recovery_catalog_owner role을 부여한다.

      SQL> grant recovery_catalog_owner to rman;
                    
4 - 9i RMAN executable를 사용하여 catalog를 생성한다.

                                              
    frtru1:ora901>rman catalog rman/rman@rman -> connection to Oracle9i database
    
    Recovery Manager: Release 9.0.1.2.0 - Production
    (c) Copyright 2001 Oracle Corporation.  All rights reserved.
    
    connected to recovery catalog database
    recovery catalog is not installed

    RMAN> create catalog;

    recovery catalog created



# ORACLE 8I DATABASE(target)에서 수행해야 하는 작업:

                                                                      
5 - 8i database로 가서 8i RMAN executable을 수행한다.


    frtru1:test817> rman

    Recovery Manager: Release 8.1.7.3.0 - Production
    RMAN>
  
    RMAN> connect rcvcat rman/rman@v901 <=== Catalog에 connect
    RMAN-06008: connected to recovery catalog database
  
    RMAN> connect target test817/Test817 <=== Target에 connect
    RMAN-06005: connected to target database: BASEP15 (DBID=511673964)

            
6 - 마지막으로 target database를 catalog에 register한다.
   RMAN> register database;

   RMAN-03022: compiling command: register
   RMAN-03023: executing command: register
   RMAN-08006: database registered in recovery catalog
   RMAN-03023: executing command: full resync
   RMAN-08002: starting full resync of recovery catalog
   RMAN-08004: full resync complete

   RMAN>
   RMAN> list incarnation of database; <= 현재의 database incarnation확인

   RMAN-03022: compiling command: list

   List of Database Incarnations
   DB Key  Inc Key DB Name  DB ID            CUR Reset SCN  Reset Time
   ------- ------- -------- ---------------- --- ---------- ----------
   1       2       BASEP15  511673964        YES 1          30-JAN-02


NOTE: TARGET  ===> BASEP15(Oracle8i)
      CATALOG ===> V901 (Oracle9i)
      RMAN EXECUTABLE FROM 8.1.7.3



RELATED DOCUMENTS
-----------------
NOTE:176513.1

Posted by 몰라욧