rman 建立catalog库

现在很多库的备份信息都是保存在控制文件中,还有一些情况备份信息是保存在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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11590946/viewspace-1068516/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值