Oracle 10g配置RMAN RECOVERY CATALOG

來源:互聯網
上載者:User

Oracle的RMAN配置資訊預設存放在target資料庫的控制檔案中,當然也可以配置一個recovery catalog伺服器來儲存這些資訊,下面是控制檔案和恢複的特性比較,一般來說維護10台以下的oracleDatabase Backup,可以不需要配置恢複目錄.

Control file:
– Simpler administration
– Default

Recovery catalog:
– Replicates control file data
– Has room for more data
– Can service many targets
– Can store RMAN scripts

RMAN repository data is always stored in the control file of the target database. But it can also be stored in a separate database, called a recovery catalog.

A recovery catalog preserves backup information in a separate database, which is useful in the event of a lost control file. This allows you to store a longer history of backups than what is possible with a control file–based repository. A single recovery catalog is able to store information for multiple target databases. The recovery catalog can also hold RMAN stored scripts, which are sequences of RMAN commands for common backup tasks. Centralized storage of scripts in the recovery catalog can be more convenient than working with command files.

Usage of a separate recovery catalog database is not recommended for small installations where administration of a separate recovery catalog database would be burdensome

下面來示範下恢複目錄的配置,其中ora10g為catalog資料庫,target資料庫為orac

1:建立使用者和資料表空間並授權

SQL> CREATE TABLESPACE rman DATAFILE '/u01/app/oradata/rman01.dbf'
   2 SIZE 500M AUTOEXTEND ON  NEXT 20M MAXSIZE 2G EXTENT MANAGEMENT LOCAL;

Tablespace created.


SQL> CREATE USER RMAN IDENTIFIED BY rman
  2  TEMPORARY TABLESPACE temp
  3  DEFAULT TABLESPACE rman
  4  QUOTA UNLIMITED ON rman;

User created.


SQL> GRANT RECOVERY_CATALOG_OWNER TO rman;

Grant succeeded.


SQL> conn rman/rman
Connected.

SQL> select count (*) from user_objects;

  COUNT(*)
----------
         0

2:建立恢複目錄
[oracle@ora10g ~]$ rman catalog  rman/rman@ora10g

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Mar 16 09:58:16 2011

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

connected to recovery catalog database

RMAN> CREATE CATALOG;

recovery catalog created

 

SQL> select count (*) from user_objects;   //可以看出在rman資料表空間下的對象個數為195個

  COUNT(*)
----------
       195

3:串連,註冊目標資料庫,同步catalog和控制檔案

[oracle@orac ~]$ rman target  sys/123456@orac  catalog  rman/rman@ora10g

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Mar 16 10:14:10 2011

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

connected to target database: ORAC (DBID=1010679485)
connected to recovery catalog database

RMAN> REGISTER DATABASE;

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

RMAN> RESYNC 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       8       ORAC     1010679485       PARENT  1          22-OCT-05
1       2       ORAC     1010679485       CURRENT 525876     15-FEB-11

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.