- 最后登录
- 2013-2-16
- 在线时间
- 19 小时
- 威望
- 29
- 金钱
- 268
- 注册时间
- 2012-3-13
- 阅读权限
- 10
- 帖子
- 32
- 精华
- 0
- 积分
- 29
- UID
- 292
|
1#
发表于 2012-7-18 10:40:50
|
查看: 8451 |
回复: 5
前面搭建好了RAC环境下(source)同单实例数据库的OGG单向同步!refer:http://ylw6006.blog.51cto.com/470441/932308
然后配置source端的HA功能,参考这个文章配置:http://www.rickyzhu.com/2311_config-ha-goldengate.html
配置步骤如下:
[root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl stat res -p |grep -ie .network |head -4
START_DEPENDENCIES=hard(ora.net1.network) pullup(ora.net1.network)
STOP_DEPENDENCIES=hard(ora.net1.network)
NAME=ora.net1.network
TYPE=ora.network.type
[root@rac1 ~]# /u01/app/11.2.0/grid/bin/appvipcfg create -network=1 -ip=192.168.1.150 -vipname=oggvip -user=root
[root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl setperm resource oggvip -u user:oracle:r-x
[oracle@rac1 ~]$ crsctl start resource oggvip
CRS-2672: Attempting to start 'oggvip' on 'rac1'
CRS-2676: Start of 'oggvip' on 'rac1' succeeded
[oracle@rac1 ~]$ crsctl status resource oggvip
NAME=oggvip
TYPE=app.appvip_net1.type
TARGET=ONLINE
STATE=ONLINE on rac1
[oracle@rac1 ~]$ /sbin/ip a |grep 192.168.1.150
inet 192.168.1.150/24 brd 192.168.1.255 scope global secondary eth0:2
[oracle@rac1 ~]$ chmod +x /vol2/ogg/11gr2_ogg_action.scr (帖子篇幅限制,脚本内容贴在2楼!)
[oracle@rac1 ~]$ crsctl add resource oggapp -type cluster_resource \
-attr "ACTION_SCRIPT=/vol2/ogg/11gr2_ogg_action.scr, \
CHECK_INTERVAL=30, START_DEPENDENCIES='hard(oggvip,ora.rac.db) \
pullup(oggvip)', STOP_DEPENDENCIES='hard(oggvip)'"
[oracle@rac1 ~]$ crsctl status resource oggapp
NAME=oggapp
TYPE=cluster_resource
TARGET=OFFLINE
STATE=OFFLINE
[oracle@rac1 ~]$ netstat -ntpl |grep 7809 (source端的mgr未启动)
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
[oracle@dg3 ogg]$ ./ggsci (target端的mgr和replicat进程已经启动)
GGSCI (dg3.yang.com) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING TESTRPT 00:00:00 00:00:00
[oracle@rac1 ~]$ crs_stat -t -v oggvip
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
oggvip app....t1.type 0/0 0/0 OFFLINE OFFLINE
[oracle@rac1 ~]$ crs_stat -t -v oggapp
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
oggapp clus...esource 0/1 0/0 OFFLINE OFFLINE
[oracle@rac1 ~]$ crsctl start resource oggapp (启动oggapp失败)
CRS-2672: Attempting to start 'oggvip' on 'rac2'
CRS-2676: Start of 'oggvip' on 'rac2' succeeded
CRS-2672: Attempting to start 'oggapp' on 'rac2'
CRS-2674: Start of 'oggapp' on 'rac2' failed
CRS-2679: Attempting to clean 'oggapp' on 'rac2'
CRS-2681: Clean of 'oggapp' on 'rac2' succeeded
CRS-2673: Attempting to stop 'oggvip' on 'rac2'
CRS-2677: Stop of 'oggvip' on 'rac2' succeeded
CRS-2563: Attempt to start resource 'oggapp' on 'rac2' has failed. Will re-retry on 'rac1' now.
CRS-2672: Attempting to start 'oggvip' on 'rac1'
CRS-2676: Start of 'oggvip' on 'rac1' succeeded
CRS-2672: Attempting to start 'oggapp' on 'rac1'
CRS-2674: Start of 'oggapp' on 'rac1' failed
CRS-2679: Attempting to clean 'oggapp' on 'rac1'
CRS-2681: Clean of 'oggapp' on 'rac1' succeeded
CRS-2632: There are no more servers to try to place resource 'oggapp' on that would satisfy its placement policy
CRS-4000: Command Start failed, or completed with errors.
[oracle@rac1 ~]$ crsctl stop resource oggapp
[oracle@rac1 ~]$ crsctl stop resource oggvip
CRS-2673: Attempting to stop 'oggvip' on 'rac1'
CRS-2677: Stop of 'oggvip' on 'rac1' succeeded
[oracle@rac1 ~]$ crsctl stop resource oggapp
CRS-2500: Cannot stop resource 'oggapp' as it is not running
CRS-4000: Command Stop failed, or completed with errors.
[oracle@rac1 ~]$ crsctl start resource oggapp
CRS-2672: Attempting to start 'oggvip' on 'rac1'
CRS-2676: Start of 'oggvip' on 'rac1' succeeded
CRS-2672: Attempting to start 'oggapp' on 'rac1'
CRS-2674: Start of 'oggapp' on 'rac1' failed
CRS-2679: Attempting to clean 'oggapp' on 'rac1'
CRS-2681: Clean of 'oggapp' on 'rac1' succeeded
CRS-2527: Unable to start 'oggapp' because it has a 'hard' dependency on 'oggvip'
CRS-2525: All instances of the resource 'oggvip' are already running; relocate is not allowed because the force option was not specified
CRS-4000: Command Start failed, or completed with errors.
[oracle@rac1 ~]$ crs_stat -t -v (在这里发现rac1的ons,gsd服务异常,使用crs_start命令online后继续测试,同样无法启动oggapp)
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
oggapp clus...esource 0/1 0/0 ONLINE OFFLINE
oggvip app....t1.type 0/0 0/0 ONLINE ONLINE rac1
ora.ACFS.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora.CRS.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora.FRA.dg ora....up.type 0/5 0/ ONLINE ONLINE rac1
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE rac2
ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2
ora....N2.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2
ora....N3.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE rac2
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE rac1
ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE rac2
ora.gsd ora.gsd.type 0/5 0/ OFFLINE OFFLINE
ora....network ora....rk.type 5/5 0/ ONLINE ONLINE rac2
ora.oc4j ora.oc4j.type 0/1 0/2 ONLINE ONLINE rac2
ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE rac2
ora.rac.db ora....se.type 0/1 0/1 ONLINE ONLINE rac1
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE rac1
ora....C1.lsnr application 0/5 0/0 ONLINE OFFLINE
ora.rac1.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.rac1.ons application 0/3 0/0 ONLINE OFFLINE
ora.rac1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac2
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE rac2
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 OFFLINE OFFLINE
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE rac2
ora....ry.acfs ora....fs.type 0/5 0/ ONLINE ONLINE rac1
ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2
ora.scan2.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2
ora.scan3.vip ora....ip.type 0/0 0/0 ONLINE ONLINE rac2
[oracle@rac1 ~]$ cd /vol2/ogg/ (直接在ggsci里面启动mgr和extract group正常,source和target间的数据同步也正常)
[oracle@rac1 ogg]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (rac1.yang.com) 1> start mgr
Manager started.
GGSCI (rac1.yang.com) 4> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING TESTEXT 00:00:00 00:00:02
EXTRACT RUNNING TESTPUMP 00:00:00 00:00:00
[oracle@rac1 ogg]$ crs_stat -t -v oggapp
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
oggapp clus...esource 0/1 0/0 ONLINE OFFLINE
在我的配置中oggapp resource不能正常启动,请指点下排错的思路,不太熟悉11g rac gi 的管理,谢谢!
[ 本帖最后由 ylw6006 于 2012-7-18 10:43 编辑 ] |
|