11.2.0.4 DUPLICATE RAC TO SINGLE

记:对duplicate不熟悉遇到一些坑,给大家标注以下

环境如下:
  1. 类别 TNS IP db_name
  2. source RAC1:192.168.50.31 prod
  3. duplicate PROD:192.168.50.21 prod
 
duplicate 创建初始化参数文件,只需要2个即可
  1. vi '/home/oracle/initprod.ora';
  2. DB_NAME=PROD
  3. COMPATIBLE= 11.2.0.4.0
duplicate 创建响应的目录
  1. mkdir -p /u01/app/oracle
  2. mkdir -p /u01/app/oracle/admin/prod/adump
  3. mkdir -p /u01/app/oracle/oradata/prod
dumplicate 配置静态监听 vi listener.ora 
  1. SID_LIST_LISTENER =
  2. (SID_LIST =
  3. (SID_DESC =
  4. (GLOBAL_DBNAME = prod)
  5. (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
  6. (SID_NAME = prod)
  7. )
  8. )
  9. LISTENER =
  10. (DESCRIPTION =
  11. (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.50.21)(PORT = 1521))
  12. )
dumplicate 启动监听
  1. 启动监听
  2. lsnrctl start
duplicate和target配置tnsnames.ora
  1. ##For the Auxiliary database prod
  2. prod =
  3. (DESCRIPTION =
  4. (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.50.21)(PORT = 1521))
  5. (CONNECT_DATA =
  6. (SERVER = DEDICATED)
  7. (SERVICE_NAME = prod)
  8. )
  9. )
  10. ## For the target database rac1
  11. rac1 =
  12. (DESCRIPTION =
  13. (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.50.31)(PORT = 1521))
  14. (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.50.33)(PORT = 1521))
  15. (CONNECT_DATA =
  16. (SERVER = DEDICATED)
  17. (SERVICE_NAME = prod)
  18. )
  19. )
测试监听是否正常
  1. tnsping prod
  2. tnsping rac1
duplicate 执行rman恢复
  1. rman TARGET sys/oracle@rac1 AUXILIARY sys/oracle@prod
  2. DUPLICATE TARGET DATABASE
  3. TO prod
  4. FROM ACTIVE DATABASE nofilenamecheck
  5. DB_FILE_NAME_CONVERT '+RACDG/prod/datafile/', '/u01/app/oracle/oradata/prod/'
  6. spfile
  7. SET LOG_FILE_NAME_CONVERT '+RACDG/prod/onlinelog/','/u01/app/oracle/oradata/prod/'
  8. set control_files='/u01/app/oracle/oradata/prod/control01.ctl'
  9. set cluster_database='FALSE'
  10. set REMOTE_LISTENER='';
注意:指定spfile后,后面的set xxx是对启动后的spfile参数进行调整。调整目录和cluster_database,remote_lister参数是必须的

 

posted on 2017-09-22 11:33  侯志清  阅读(397)  评论(0编辑  收藏  举报

导航