ITPub博客

异构平台dg (无法成功)

原创 作者:wanghao2979 时间:2017-04-06 14:14:24 0 删除 编辑
环境描述
源平台    windows
目标平台  linux


1.主库设置归档/强制归档模式


SQL> alter database archivelog;


Database altered.


SQL> alter database open;


Database altered.


SQL> alter database force logging;


Database altered.


3.配置两边监听文件


主库不用配置了,默认即可
备库静态监听
LISTENER1=
  (DESCRIPTION=
    (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=tcp)(HOST=10.135.175.133)(PORT=1522))
     )
   )
SID_LIST_LISTENER1=
  (SID_LIST=
    (SID_DESC=
      (SID_NAME=lltest)
      (ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
      (GLOBAL_DBNAME=lltestdg)
     )
  )
ps: dataguard 我习惯都用 1522 来配置


4.配置两边tnsnames.ora 文件




lltest =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST=10.135.20.223)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SID=lltest)
    )
)
lltestdg =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST=10.135.175.133)(PORT = 1522))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = lltestdg)
          (UR=A)
    )
)


5.主备库修改pfile
主库


*.log_archive_dest_1='LOCATION=E:\app\Administrator\oradata\lltest VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=lltest'
*.log_archive_dest_2='SERVICE=lltestdg LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=lltestdg'
*.log_archive_config='DG_CONFIG=(lltestdg,lltest)'
*.log_file_name_convert='/u01/','E:\app\Administrator\oradata\lltest'
*.db_file_name_convert='/u01/','E:\app\Administrator\oradata\lltest'


备库


*.log_archive_dest_1='LOCATION=/u01 VALID_FOR=(ALL_LOGFILES,ALL_ROLES)  DB_UNIQUE_NAME=lltestdg'
*.log_archive_dest_2='SERVICE=lltest LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=lltest'
*.log_archive_config='DG_CONFIG=(lltest,lltestdg)'
*.log_file_name_convert='E:\app\Administrator\oradata\lltest','/u01/'
*.db_file_name_convert='E:\app\Administrator\oradata\lltest','/u01/'
*.db_unique_name='lltestdg'




6.主库添加 standby redo


alter database add standby logfile group 11  'E:\app\Administrator\oradata\lltest\redo11.log' size 512M;
alter database add standby logfile group 12  'E:\app\Administrator\oradata\lltest\redo12.log' size 512M;
alter database add standby logfile group 13  'E:\app\Administrator\oradata\lltest\redo13.log' size 512M;
alter database add standby logfile group 14  'E:\app\Administrator\oradata\lltest\redo14.log' size 512M;


7.进行 duplicate 操作


rman target sys/oracle auxiliary sys/oracle@lltestdg  
这里要注意备库的密码文件
DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE NOFILENAMECHECK;








根据 文档 ID 413484.1   oracle是支持异构平台dg 的,但无论是 win => linux 还是  linux =>win 我均没有配置成功,报一些莫名其妙的错误,我已经放弃.








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

注册时间:2017-01-10

  • 博文量
    75
  • 访问量
    32450