rman 建立catalog庫

super_sky發表於2014-01-08
現在很多庫的備份資訊都是儲存在控制檔案中,還有一些情況備份資訊是儲存在catalog庫中的,那麼如何來配置catalog庫呢?下面是一個測試過程。

首先在catalog庫,建立一個使用者和一個表空間,並賦予connect,resource,recovery_catalog_owner角色給新建使用者。
 SQL> create tablespace rmants datafile '/ora10g/oradata/rmants01.dbf' size 200M;

 Tablespace created.

 SQL> create user rman identified by rman default tablespace rmants;

 User created.

 SQL> grant connect,resource to rman;

 Grant succeeded.

 SQL> grant recovery_catalog_owner to rman;

 Grant succeeded.

 SQL> alter user rman quota unlimited on rmants;

 User altered.

 SQL> select * from dba_sys_privs a where a.grantee='RMAN';

 GRANTEE                        PRIVILEGE                                ADM

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

RMAN                           UNLIMITED TABLESPACE                     NO

其次,在需要配置備份的機器上配置客戶端連線,連線catalog庫,連線資訊如下
CATALOG =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.24.22.150)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = S3P)

      (INSTANCE_NAME = ora10g)

    )

  )

對該連線進行測試
[oracle@oracle admin]$ tnsping catalog

 TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 10-MAY-2013 15:03:20

 Copyright (c) 1997, 2011, Oracle.  All rights reserved.

 Used parameter files:

 Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.24.22.150)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = S3P) (INSTANCE_NAME = ora10g)))

OK (0 msec)

[oracle@oracle admin]$ 


最後,在需要備份的資料庫使用rman進行註冊
[oracle@oracle admin]$ rman target / catalog rman/rman@catalog #該命令連線到了catalog庫

 Recovery Manager: Release 11.2.0.3.0 - Production on Fri May 10 15:04:32 2013

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

 connected to target database: RESTART (DBID=648727412)

connected to recovery catalog database

 RMAN> create catalog tablespace rmants;

 recovery catalog created

 RMAN> register database;        #註冊該資料庫

 database registered in recovery catalog

starting full resync of recovery catalog

full resync complete

 RMAN>

後續就可以進行正常的資料庫備份了,其備份資訊將儲存在catalog庫了。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/11590946/viewspace-1068516/,如需轉載,請註明出處,否則將追究法律責任。

相關文章