ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 利用Backup Exec 2010进行异机恢复测试

利用Backup Exec 2010进行异机恢复测试

原创 Linux操作系统 作者:lyf625 时间:2011-04-15 14:33:12 0 删除 编辑
正常使用的测试数据库(主机名为ORACLE IP 192.168.1.201):
QL> select * from leviton;                                                                                                                 
NAME
--------------------------------------------------
full bakcup of Sunday
 bakcup of monday
 backup of tuesday
 backup of Wedesday
 backup2 of Wedesday
 backup3 of Wedesday
 backup4 of Wedesday
 backup5 of Wedesday
 backup6 of Wedesday
9 rows selected.
[oracle@oracle ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Thu Apr 14 12:45:08 2011
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
connected to target database: TEST (DBID=1993283366)(此时的数据库DBID)
RMAN>
SQL> !hostname                                                                                                                              
oracle
root@oracle ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:A9:67:E3 
          inet addr:192.168.1.201  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fea9:67e3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4128069 errors:0 dropped:0 overruns:0 frame.:0
          TX packets:2203625 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3605043921 (3.3 GiB)  TX bytes:2541321314 (2.3 GiB)
          Interrupt:185 Base address:0x1400
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1921 errors:0 dropped:0 overruns:0 frame.:0
          TX packets:1921 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:120694 (117.8 KiB)  TX bytes:120694 (117.8 KiB)
在另外一台主机上安装ORACLE数据库软件(主机名也为ORACLE IP 192.168.1.202,在该主机上创建和IP 192.168.1.201相同的ORACLE目录结构)然后利用DBCA创建数据库。
[oracle@oracle ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Tue Apr 12 13:37:59 2011
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
connected to target database: TEST (DBID=2046419228) (利用DBCA安装数据库之后的DBID),此时要配置好ORACLE 数据库的Agent,在BE 2010的控制台中能够连接到该数据库,然后把192.168.1.201的密码文件和参数文件拷贝到192.168.1.202相同的位置,然后利用BE 2010进行还原恢复。


SQL> recover database until cancel using backup controlfile ;                                                                               
ORA-00279: change 757476 generated at 04/12/2011 13:13:17 needed for thread 1
ORA-00289: suggestion :
/u01/app/flash_recovery_area/TEST/archivelog/2011_04_12/o1_mf_1_2_%u_.arc
ORA-00280: change 757476 for thread 1 is in sequence #2

Specify log: {=suggested | filename | AUTO | CANCEL}
cancel                                                                                                                                      
Media recovery cancelled.
SQL> alter database open resetlogs;                                                                                                         
Database altered.
成功恢复到和192.168.1.201一样的状态:
SQL> select * from leviton;                                                                                                                 
NAME
--------------------------------------------------
full bakcup of Sunday
 bakcup of monday
 backup of tuesday
 backup of Wedesday
 backup2 of Wedesday
 backup3 of Wedesday
 backup4 of Wedesday
 backup5 of Wedesday
 backup6 of Wedesday
9 rows selected.
SQL> exit                                                                                                                                   
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@oracle ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Tue Apr 12 13:45:53 2011
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
connected to target database: TEST (DBID=1993283366) (此时的DBID已和192.168.1.201相同)
RMAN>
 

恢复过程.JPG

恢复过程2.JPG

恢复过程3.JPG

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

请登录后发表评论 登录
全部评论

注册时间:2010-03-06

  • 博文量
    41
  • 访问量
    56991