设为首页收藏本站

Bo's Oracle Station

【博客文章2013】敏捷的Oracle 10g MAA配置方法

2015-2-10 22:01| 发布者: admin| 查看: 22341| 评论: 0

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


Botang
唐波


摘要
 

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



目录
 

1. 环境准备

1.1 装好主库

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

1.3 修正主库broker位置

2. Grid Control敏捷添加standby

3. 修正Grid Control刚添加的standbyBroker位置

4. 敏捷地图形化切换

5. Grid Control上删掉新备库(原主库)

6. 对新主库作rconfig,只能挑选一个节点

7. 对新主库作rconfig后续网络配置

8. 对新主库作添加实例前准备

9. 对新主库使用dbca敏捷添加instance

10. 对新集群主库作dbca后续网络配置

11. Grid界面重发现,敏捷生成Physical StandbyBroker的构造

12. 手工切换准备(两边都是RAC环境使用GC切换一定会报错)

13. 手工切换

14. Grid界面重发现 , 到此MAA Physical Standby配置完成

15. MAA Physical Standby 转换到 MAA Logical Standby

15.1 准备主库

15.2 停止主备库两边的Physical StandbyBroker

15.3 准备备库

15.4 主库上EXECUTE DBMS_LOGSTDBY.BUILD

15.5 转换

15.6 Grid界面重发现,敏捷生成Logical StandbyBroker的构造

总结



正文
 

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 station1

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'


2. Grid Control敏捷添加standby

gc添加单实例的physical standbygc无法添加RAC physical standby),之后verifystandby log(共12个),最后在gc上删掉新加的standby。具体操作:进入gc Target->database->maintenance-> datagurd setup and manage->add standby database->create a new physical standby dagabase->选择 perform a live backup of the primary->next 一步一步来。 建好后verify 可以看见12个日志。

这时在gc上删除新加的standby数据库。


3. 修正Grid Control刚添加的standbyBroker位置

stdandbydg1_broker_config_file1='+DATA/site1/dr1site1.dat'dg_broker_config_file2='+FRA/site1/dr2site1.dat' ,之后在主库方重新加回standby(Manage existing standby database链接,目的是为了产生新的dg_broker_config_file1dg_broker_config_file2)

5

鲜花

握手

雷人

路过

鸡蛋

刚表态过的朋友 (5 人)

QQ|手机版|Bo's Oracle Station   

GMT+8, 2018-12-26 06:45 , Processed in 0.085666 second(s), 19 queries .

返回顶部