环境

生产RAC(target):

ORACLE_SID=prodb

测试RAC(auxiliary)

ORACLE_SID=testdb

oracle版本:11.2.0.1.0


1、在生产环境RAC node1节点做数据库prodb全备

RMAN> backup database include current controlfile plus archivelog delete all input;

2、将备份集和密码文件拷贝到测试环境RAC node1节点的/tmp/oracle。

3、在测试环境做还原前的准备

sql>alter system set cluster_database=false scope=spfile;

sql>shutdown immediate;

sql>startup nomount;

4、数据还原

$rman auxiliary /

rman>duplicate database to testdb backup location '/tmp/oracle';

5、替换测试环境密码文件为生产环境密码文件

6、在测试环境RAC node1 修改cluster_database为true

sql>alter system set cluster_database=true scope=spfile;

7、重启测试环境RAC node1、node2实例

sql>startup force;