欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

敏捷的Oracle 10g MAA配置方法

程序员文章站 2022-05-31 22:52:40
...

本文介绍一种原创的并经过充分测试的组合使用标准技术的Oracle 10g MAA搭建方法。该方法能有效地利用手边能够利用到的工具,半图

敏捷的Oracle 10g MAA配置方法

中国科学院ARP项目实施顾问唐波

摘要

本文介绍一种原创的并经过充分测试的组合使用标准技术的Oracle 10g MAA搭建方法。该方法能有效地利用手边能够利用到的工具,半图形化地、敏捷有效地在10个小时以内搭建出一套Oracle 10g MAA环境。主备库双方节点越多,本方法的敏捷优势越明显。全文内容包括RAC主库和RAC物理standby备库的配置以及最终转换到RAC逻辑standby备库的一步一步操作指南。整个配置包含Broker构造。该方法搭建的MAA,2004年至今应用在中国科学院ARP项目www,arp,cn的生产环境中。


目录
1. 环境准备
1.1 装好主库
1.2 装好备用库两台主机上的集群件、ASM和数据库软件
1.3 修正主库broker位置
2. Grid Control敏捷添加standby
3. 修正Grid Control刚添加的standby的Broker位置
4. 敏捷地图形化切换
5. 在Grid Control上删掉新备库(原主库)
6. 对新主库作rconfig,只能挑选一个节点
7. 对新主库作rconfig后续网络配置
8. 对新主库作添加实例前准备
9. 对新主库使用dbca敏捷添加instance
10. 对新集群主库作dbca后续网络配置
11. Grid界面重发现,,敏捷生成Physical Standby的Broker的构造
12. 手工切换准备(两边都是RAC环境使用GC切换一定会报错)
13. 手工切换
14. Grid界面重发现 , 到此MAA Physical Standby配置完成
15. 由MAA Physical Standby 转换到 MAA Logical Standby
15.1 准备主库
15.2 停止主备库两边的Physical Standby的Broker
15.3 准备备库
15.4 主库上EXECUTE DBMS_LOGSTDBY.BUILD
15.5 转换
15.6 Grid界面重发现,敏捷生成Logical Standby的Broker的构造
总结

正文

1. 环境准备
1.1 装好主库

主库那边所有东西都装好:
[root@station1 ~]# crs_stat -t
Name Type Target State Host
ora....A1.inst application ONLINE ONLINE station1
ora....A2.inst application ONLINE ONLINE station2
ora.RDBA.db application ONLINE ONLINE node1
ora....SM1.asm application ONLINE ONLINE station1
ora....N1.lsnr application ONLINE ONLINE station1
ora....on1.gsd application ONLINE ONLINE station1
ora....on1.ons application ONLINE ONLINE station1
ora....on1.vip application ONLINE ONLINE station1
ora....SM2.asm application ONLINE ONLINE station2
ora....N2.lsnr application ONLINE ONLINE station2
ora....on2.gsd application ONLINE ONLINE station2
ora....on2.ons application ONLINE ONLINE station2
ora....on2.vip application ONLINE ONLINE station2

1.2 装好备用库两台主机上的集群件、ASM和数据库软件

备库那边只有集群件和数据库软件,备库所在机器要建好+FRA盘组。主库和备库都要建好目录:'+FRA/库名/stdbyarch'用以存放standby archivelog)。


[root@station3 ~]# crs_stat -t
Name Type Target State Host
ora....SM1.asm application ONLINE ONLINE station3
ora....N1.lsnr application ONLINE ONLINE station3
ora....on1.gsd application ONLINE ONLINE station3
ora....on1.ons application ONLINE ONLINE station3
ora....on1.vip application ONLINE ONLINE station3
ora....SM2.asm application ONLINE ONLINE station4
ora....N2.lsnr application ONLINE ONLINE station4
ora....on2.gsd application ONLINE ONLINE station4
ora....on2.ons application ONLINE ONLINE station4
ora....on2.vip application ONLINE ONLINE station4


主库已经有标准的TNS和监听(备库虽然没有库,可以仿照主库对称地把对应的TNS和监听配好,主库的配置文件也要加入备库信息,由于tnsnames.ora会在以下阶段不断被覆盖,所以请备份主库和备库两边的tnsnames.ora,如果被覆盖则把tnsnames.ora的备份覆盖回来)。
具体操作为打开主库创建过程中生成的tnsnames.ora
本来有4段编辑为8段做对称的修改,4个节点每个节点覆盖一份同时备份一个模板准备以后用:


RDBA =


(DESCRIPTION =


(ADDRESS = (PROTOCOL = TCP)(HOST = station1-vip)(PORT = 1521))


(ADDRESS = (PROTOCOL = TCP)(HOST = station2-vip)(PORT = 1521))


(LOAD_BALANCE = yes)


(CONNECT_DATA =


(SERVER = DEDICATED)


(SERVICE_NAME = RDBA)


)


)


RDBA2 =


(DESCRIPTION =


(ADDRESS = (PROTOCOL = TCP)(HOST = station2-vip)(PORT = 1521))


(CONNECT_DATA =


(SERVER = DEDICATED)


(SERVICE_NAME = RDBA)


(INSTANCE_NAME = RDBA2)


)


)


RDBA1 =


(DESCRIPTION =


(ADDRESS = (PROTOCOL = TCP)(HOST = station1-vip)(PORT = 1521))


(CONNECT_DATA =


(SERVER = DEDICATED)


(SERVICE_NAME = RDBA)


(INSTANCE_NAME = RDBA1)


)


)


LISTENERS_RDBA =


(ADDRESS_LIST =


(ADDRESS = (PROTOCOL = TCP)(HOST = station1-vip)(PORT = 1521))


(ADDRESS = (PROTOCOL = TCP)(HOST = station2-vip)(PORT = 1521))


)


SITE1 =


(DESCRIPTION =


(ADDRESS = (PROTOCOL = TCP)(HOST = station3-vip.example.com)(PORT = 1521))


(ADDRESS = (PROTOCOL = TCP)(HOST = station4-vip.example.com)(PORT = 1521))


(CONNECT_DATA =


(SERVER = DEDICATED)


(SERVICE_NAME = site1)


)


)


DG22 =


(DESCRIPTION =


(ADDRESS = (PROTOCOL = TCP)(HOST = station4-vip.example.com)(PORT = 1521))


(CONNECT_DATA =


(SERVER = DEDICATED)


(SERVICE_NAME = site1)


(INSTANCE_NAME = dg22)


)


)


DG21 =


(DESCRIPTION =


(ADDRESS = (PROTOCOL = TCP)(HOST = station3-vip.example.com)(PORT = 1521))


(CONNECT_DATA =


(SERVER = DEDICATED)


(SERVICE_NAME = site1)


(INSTANCE_NAME = dg21)


)


)


LISTENERS_SITE1 =


(ADDRESS_LIST =


(ADDRESS = (PROTOCOL = TCP)(HOST = station3-vip)(PORT = 1521))


(ADDRESS = (PROTOCOL = TCP)(HOST = station4-vip)(PORT = 1521))


)


1.3 修正主库broker位置


主库改dg_broker_config_file1='+DATA/rdba/dr1rdba.dat', dg_broker_config_file2='+FRA/rdba/dr2rdba.dat'。

更多详情见请继续阅读下一页的精彩内容:

相关阅读:

使用RAC和Data Guard构建MAA架构

Oracle 10g rac Standby 归档日志自动删除脚本

Oracle 10g客户端连接远程数据库配置图解

敏捷的Oracle 10g MAA配置方法