1. 情境描述;
catalog database 192.168.1.206:1521 grid
target database 192.168.1.201:1521 ql
2. 在catalog database上建立rman資料表空間
SQL> create tablespace rman datafile '/u01/app/Oracle/oradata/gird/rman.dbf' size 500m autoextend on next 100m maxsize unlimited;
Tablespace created.
3. 在catalog database上建立rman使用者
SQL> create user rman identified by rman default tablespace rman quota 500m on rman;
User created.
4. 在catalog database上對rman使用者賦予許可權
SQL> grant connect,resource to rman;
Grant succeeded.
SQL> grant recovery_catalog_owner to rman;
Grant succeeded.
5. 在target database上修改tnsname.ora
[oracle@test admin]$ more tnsnames.ora
RMAN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.206)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = gird.57ql.com)
)
)
6. 註冊資料庫
[oracle@test /]$ rman target / catalogrman/rman@rman;
Recovery Manager: Release 11.2.0.3.0 - Production on Mon Sep 3 16:12:41 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: QL (DBID=2286587371)
connected to recovery catalog database
RMAN> create catalog tablespace "RMAN";
recovery catalog created
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
7. 備份資料庫
RMAN> backup database;
Finished Control File and SPFILE Autobackup at 03-SEP-12
RMAN> exit
8. 小結
使用catalog database儲存rman備份的中繼資料在生產環境中十分常見,且安全性高。可以將grid control的reponsitory database與catalog database整合在一起。