【RMAN】catalog数据库

使用catalog数据库,首先要确定一个数据库作为目录数据库。然后通过以下步骤完成。

(1)在选定作为catalog数据库的数据库中创建tablespace

SYS@MTH> create tablespace tbs_rman datafile '/oradat/MTH/tbs_rman.dbf' size 50M;

Tablespace created.


(2)创建管理用户,并赋予相应的权限

SYS@MTH> create user rman identified by rman default tablespace tbs_rman temporary tablespace temp quota unlimited on tbs_rman;

User created.


SYS@MTH> grant connect,resource,recovery_catalog_owner to rman;

Grant succeeded.


(3)进入RMAN,创建catalog

oracle@C01TEST03:/home/oracle>rman catalog rman/rman

Recovery Manager: Release 11.2.0.4.0 - Production on Wed May 24 14:17:13 2017

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

connected to recovery catalog database

RMAN> create catalog;

recovery catalog created


(4)验证

通过查询rman用户下是否存在对象,来确定catalog是否创建成功。

oracle@C01TEST03:/home/oracle>sqlplus rman/rman

SQL*Plus: Release 11.2.0.4.0 Production on Wed May 24 14:18:10 2017

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

RMAN@MTH> select table_name from user_tables;

TABLE_NAME
------------------------------
DB
NODE
CONF
DBINC
CKP
TS
TSATT
DF
......


至此,catalog数据库创建成功。


在使用catalog数据库进行数据库备份之前,应该先在catalog中注册target数据库。注册数据库需要同时连接到target数据库和catalog数据库。

oracle@C01TEST03:/home/oracle>rman target / catalog rman/rman@CATALOG

Recovery Manager: Release 11.2.0.4.0 - Production on Wed May 24 14:32:55 2017

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

connected to target database: MTH (DBID=3150883311)
connected to recovery catalog database


RMAN> register database;

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


在catalog中注销数据库:

RMAN> unregister database;

database name is "MTH" and DBID is 3150883311

Do you really want to unregister the database (enter YES or NO)? yes
database unregistered from the recovery catalog


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30776559/viewspace-2139791/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/30776559/viewspace-2139791/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值