oracle 恢复单独表空间,单个表空间异机恢复问题

两台数据库服务器环境和版本一样,均为solaris10,oracle10.0.2.5,

A机sid:prirac,B机sid:secrac

测试表空间lizi

现在从B机上用rman备份测试表空间的数据文件,之后将备份scp到A机的/export/home/oracle/rmanback/目录下面;

接下来修改A机数据库的dbid,详细方法我就不说了,修改为跟B机DBID相同,之后登录rman,进行catalog注册:

[oracle@db2 rmantest]$ rman target /

Recovery Manager: Release 10.2.0.5.0 - Production on Wed Mar 9 14:57:04 2011

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

connected to target database: test1 (DBID=2043040012)

RMAN> catalog start with '/home/oracle/rmantest';

using target database control file instead of recovery catalog

searching for all files that match the pattern /home/oracle/rmantest

List of Files Unknown to the Database

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

File Name: /home/oracle/rmantest/edoas2_TEST_1_20110309

Do you really want to catalog the above files (enter YES or NO)? yes

cataloging files...

cataloging done

List of Cataloged Files

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

File Name: /home/oracle/rmantest/edoas2_TEST_1_20110309

RMAN> list backup;

List of Backup Sets

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

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

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

1       Full    50.93M     DISK        00:00:00     2011-03-09 13:49:56

BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20110309T134956

Piece Name: /home/oracle/rmantest/edoas2_TEST_1_20110309

List of Datafiles in backup set 1

File LV Type Ckp SCN    Ckp Time            Name

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

6       Full 734152     2011-03-09 13:49:56

RMAN> exit

Recovery Manager complete.

至此在A机上能够找到B机表空间的备份集。

接下来该如何恢复?

我直接restore tablespace不行啊:

[oracle@db2 rmantest]$ rman target /

Recovery Manager: Release 10.2.0.5.0 - Production on Wed Mar 9 15:49:40 2011

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

connected to target database: test1 (DBID=2043040012)

RMAN> shutdown immediate

using target database control file instead of recovery catalog

database closed

database dismounted

Oracle instance shut down

RMAN> startup mount;

connected to target database (not started)

Oracle instance started

database mounted

Total System Global Area    1610612736 bytes

Fixed Size                     2096632 bytes

Variable Size                385876488 bytes

Database Buffers            1207959552 bytes

Redo Buffers                  14680064 bytes

RMAN> RUN {

2> ALLOCATE CHANNEL CH1 TYPE disk format '/home/oracle/rmantest/%d_%p_%T';

3> restore tablespace edoas2;

4> RELEASE CHANNEL CH1;

5> }

allocated channel: CH1

channel CH1: sid=153 devtype=DISK

Starting restore at 2011-03-09 15:50:52

creating datafile fno=5 name=/home/oracle/test1/test1/edoas2.dbf

restore not done; all files readonly, offline, or already restored

Finished restore at 2011-03-09 15:50:56

released channel: CH1

RMAN> exit

Recovery Manager complete.

恢复之后根本就不是恢复的B机上的备份集。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值