操作步骤:

确保目标环境与源环境11.2.0.4一致

1.安装clusterware 和 asm 实例

2.备份源库包括pfile,并将备份集copy到rac 节点上(或是备分至共享存储上)

3.修改初始化参数文件,在rac上还原控制文件和数据文件

  注:在还原数据库时pfile *.db_recovery_file_dest='' 参数最好设置为空,否则resetlog open 时crosscheck 时间会很长

    其次是 rman 还原 时要加上 set newname for database  to '+data';

  

4.增加undo 表空间和redo log 线程组,创建密钥文件

alter database add logfile thread 2 group 5('+data') size 4G;

alter database add logfile thread 2 group 6('+data') size 4G;

alter database add logfile thread 2 group 7('+data') size 4G;

alter database add logfile thread 2 group 8('+data') size 4G;

alter database add logfile thread x group y('+data') size 4G;

alter database enable thread 2;

alter database enable thread 3;

alter database enable thread 4;


create undo tablespace UNDOTBS2 datafile '+data' size 4G autoextend no next 200M maxsize 32G;

create undo tablespace UNDOTBS3 datafile '+data' size 4G autoextend no next 200M maxsize 32G;

create undo tablespace UNDOTBS4 datafile '+data' size 4G autoextend no next 200M maxsize 32G;


5.配置rac监听

6.修改参数将其他数据库 等资源添加到crs

在已运行的节点上修改参数

alter system set cluster_interconnects="bidb1 private ip" scope=spfile sid='bidb1';

alter system set cluster_interconnects="bidb2 private ip" scope=spfile sid='bidb2';

alter system set cluster_interconnects="bidb3 private ip" scope=spfile sid='bidb3';

alter system set cluster_interconnects="bidb4 private ip" scope=spfile sid='bidb4';

所有节点需设置

alter system set thread=2 scope=spfile sid='bidb2';


alter system set  local_listener='' scope=spfile sid='';

alter system set undo_tablespace='UNDOTBS1' scope=spfile sid='bidb1'

改完后pfie 几个参数如下:

*.cluster_database_instances=4
*.cluster_database=true
*.remote_listener=’LISTENERS_BIDB’
*.cluster_database=true

bidb1.instance_number=1
bidb2.instance_number=2

bidb1.instance_number=3
bidb2.instance_number=4

bidb1.thread=1
bidb2.thread=2

bidb1.thread=3
bidb2.thread=4
bidb1.undo_tablespace=’UNDOTBS1'
bidb2.undo_tablespace=’UNDOTBS2'

bidb3.undo_tablespace=’UNDOTBS3'
bidb4.undo_tablespace=’UNDOTBS4'




注册新节点

srvctl add database -d bidb -o $oracle_home
srvctl add instance -d bidb -i bidb1 -n hostname1
srvctl add instance -d bidb -i bidb2 -n hostname2
srvctl add instance -d bidb -i bidb3 -n hostname3
srvctl add instance -d bidb -i bidb4 -n hostname4


重启数据库。


注:在数据库还原好后,添加节点可以用dbca来做,所有相应的操作自动完成