Oracle 10g使用RMAN恢复目录笔记

Oracle 10g使用RMAN恢复目录笔记

 

因是测试环境,RMAN Catalog数据库与主数据库使用的是同一个数据库,正式生产环境建议分开。

创建恢复目录表空间

SQL> create tablespace catalog

  2  datafile '.../catalog_01.dbf'

  3      size 100M autoextend on next 10M maxsize 1000M

  4  extent management local segment space management auto;

创建恢复目录用户

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

为恢复目录用户授权

SQL> grant connect,resource,recovery_catalog_owner to rman;

创建恢复目录模式对象

[oracle@RHEL5 ~]$ rman catalog rman/rman

Recovery Manager: Release 10.2.0.4.0 - Production on Thu Aug 18 15:06:53 2011

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

connected to recovery catalog database

RMAN> create catalog;

recovery catalog created

在恢复目录中注册数据库

[oracle@RHEL5 ~]$ rman target / catalog rman/rman

Recovery Manager: Release 10.2.0.4.0 - Production on Thu Aug 18 15:09:08 2011

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

connected to target database: ORCL (DBID=1275712672)

connected to recovery catalog database

 

RMAN> register database;

database registered in recovery catalog

starting full resync of recovery catalog

full resync complete

 

RMAN> report schema;

Report of database schema

List of Permanent Datafiles

===========================

File Size(MB) Tablespace     RB segs Datafile Name

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

1    520      SYSTEM         YES     .../system01.dbf

2    470      UNDOTBS1       YES     .../undotbs01.dbf

3    460      SYSAUX         NO      .../sysaux01.dbf

4    2000     USERS          NO      .../users_01.dbf

5    100      FDA_DATA       NO      .../fda_data_01.dbf

6    200      ORATEXT        NO      .../oratext01.dbf

7    100      FDA_DATA       NO      .../fda_data_02.dbf

8    100      FDA_IDX        NO      .../fda_idx_01.dbf

9    100      FDA_IDX        NO      .../fda_idx_02.dbf

10   1373     USERS          NO      .../users_02.dbf

11   1393     USERS          NO      .../users_03.dbf

12   1394     USERS          NO      .../users_04.dbf

13   1052     USERS          NO      .../users_05.dbf

14   1033     USERS          NO      .../users_06.dbf

15   100      CATALOG        NO      .../catalog_01.dbf

 

List of Temporary Files

=======================

File Size(MB) Tablespace     Maxsize(MB) Tempfile Name

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

1    20       TEMP           32767       .../temp01.dbf

 

在恢复目录中取消数据库注册

Unregister database;  连接到目标数据库和恢复目录

Unregister database ;  目标数据库已经删除

如果在恢复目录中有多个以相同名称注册的目标数据库:

Run

{

    Set dbid <要取消数据库的DBID>

    Unregister database noprompt;

}

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

转载于:http://blog.itpub.net/81227/viewspace-705264/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值