RMAN创建catalog

RMAN创建catalog:

实验环境,同一虚拟机,目标数据库实例orcl,  catalog实例dict

 

1.DICT上创建rman相关表空间,用户等。

SQL> create tablespace rman datafile '/oracle/app/oradata/dict/rman.dbf' size 10m autoextend on next 5m maxsize 100m;

 

表空间已创建。

 

SQL> create user rman identified by rman default tablespace rman quota unlimited on rman;

 

用户已创建。

 

SQL> grant connect, resource, recovery_catalog_owner to rman;

 

授权成功。

 

2.创建catalog和注册catalog

[oracle@ora10g admin]$ rman target sys/syspwd catalog rman/rman@dict

 

Recovery Manager: Release 10.2.0.4.0 - Production on Tue Aug 16 19:38:28 2011

 

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

 

connected to target database: ORCL (DBID=1225112371)

connected to recovery catalog database

 

RMAN> create catalog;

 

recovery catalog created

 

RMAN> register database;

 

database registered in recovery catalog

starting full resync of recovery catalog

full resync complete

 

3.catalog 库中查询相关信息

SQL> select dbid, name from rc_database;

 

      DBID NAME

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

1225112371 ORCL

 

SQL> select db_name, ts#, name, creation_change# from rc_tablespace;

 

DB_NAME  TS# NAME                                     CREATION_CHANGE#

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

ORCL              0 SYSTEM                                                  9

ORCL              1 UNDOTBS1                                          1193738

ORCL              2 SYSAUX                                               6609

ORCL              3 TEMP                                               963167

ORCL              4 USERS                                               10566

ORCL              6 EXAMPLE                                            467467

ORCL              9 TBS01                                             1289379

 

已选择7行。

 

SQL> select db_id, bs_key, recid, set_count from rc_backup_set;

 

     DB_ID     BS_KEY      RECID  SET_COUNT

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

1225112371        856        206        281

1225112371        857        207        282

1225112371        858        208        283

 

当然也可以查询其它相关信息。

 

4.注销catalog

RMAN> unregister database;       

 

database name is "ORCL" and DBID is 1225112371

 

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

database unregistered from the recovery catalog

 

Dict下面查询

SQL> select dbid, name from rc_database;

 

未选定行

 

SQL> select db_id, bs_key, recid, set_count from rc_backup_set;

 

未选定行

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

转载于:http://blog.itpub.net/25937377/viewspace-705383/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值