日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

11gR2 RAC GoldenGate的HA配置

發(fā)布時(shí)間:2024/8/26 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 11gR2 RAC GoldenGate的HA配置 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
第一步 Add VIP resource for OGG


1. Create new VIP resource, use IP address 10.245.48.47 as example, login as root and run:
# /u01/app/11.2.0/grid/bin/appvipcfg create -network=1 -ip=10.245.48.47 -vipname=ggatevip -user=root
?
NOTE 1: '/u01/app/11.2.0/grid' is the default Oracle GRID infrastructure software directory.
NOTE 2: The example VIP resource name is 'ggatevip' and will be used in the rest of this document.
NOTE 3: -network refers to the network number, default value is '1'.
?
And you can find the network number using this command:
?
# /u01/app/11.2.0/grid/bin/crsctl stat res -p |grep -ie .network -ie
subnet |grep -ie name -ie subnet
NAME=ora.net1.network
USR_ORA_SUBNET=10.245.48.0
net1 indicates this is network 1, and the second line indicates the subnet on which the VIP will be created.
?
2. Allow oracle user to start the VIP, run this command as root:
# /u01/app/11.2.0/grid/bin/crsctl setperm resource ggatevip -u user:oracle:r-x
?
3. Log on as oracle user, start the VIP resource:
$ /u01/app/11.2.0/grid/bin/crsctl start resource ggatevip
?
4. Validate VIP is running:
$ /u01/app/11.2.0/grid/bin/crsctl status resource ggatevip
NAME=ggatevip
TYPE=app.appvip.type
TARGET=ONLINE
STATE=ONLINE on node452
?
?
NOTE: The TARGET and STATE should both be ONLINE.
?
5. Ping the VIP's IP address(10.245.48.47) and make sure it's reachable.
NOTE: If you also prefer to set up HA on target system, follow the same steps, and make necessary changes to directory, VIP resource name, IP address, etc.
第二步 Develop an agent script




1. Save the script in a file 11gr2_gg_action.scr and copy it to OGG directory.
NOTE: Make necessary changes to GGS_HOME(OGG directory) and ORACLE_HOME.
?
2. Make sure the script is executable:
$ chmod +x 11gr2_gg_action.scr
NOTE: If you also prefer to set up HA on target system, follow the same steps, and make necessary changes to GGS_HOME, ORACLE_HOME in this file.


第三步 Register OGG resource in Oracle Clusterware




1. Register OGG as a resource in Oracle Clusterware:
$ /u01/app/11.2.0/grid/bin/crsctl add resource ggateapp -type cluster_resource -attr "ACTION_SCRIPT=/cloudfs/goldengate/11gr2_gg_action.scr, \
CHECK_INTERVAL=30, START_DEPENDENCIES='hard(ggatevip,ora.ggdb.db) \
pullup(ggatevip)', STOP_DEPENDENCIES='hard(ggatevip)'"
?
NOTE 1: 'ggateapp' is the example OGG resource name and will be used in the rest of this document.
NOTE 2: 'ora.ggdb.db' is the resource name for database 'ggdb'.
?
2. Check the ggateapp resource is available as Oracle Clusterware resource:
$ /u01/app/11.2.0/grid/bin/crsctl status resource ggateapp
NAME=ggateapp
TYPE=cluster_resource
TARGET=OFFLINE
STATE=OFFLINE
NOTE: If you also prefer to set up HA on target system, follow the same steps, and make necessary changes to directory, VIP and database resource
name, etc.


第四步 Start the OGG resource


1. Start the resource, from now on you should always use Oracle Clusterware to start OGG:
?
$ /u01/app/11.2.0/grid/bin/crsctl start resource ggateapp
?
2. Check the status of OGG resource:
$ /u01/app/11.2.0/grid/bin/crsctl status resource ggateapp
NAME=ggateapp
TYPE=cluster_resource
TARGET=ONLINE
STATE=ONLINE on node452
NOTE: TARGET and STATE should both be ONLINE.
?
3. Check status of OGG processes:
GGSCI > info all
Program Status Group Lag
Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING MYEXT 00:00:07
00:00:04
EXTRACT RUNNING MYPUMP 00:00:00 0
0:00:05
NOTE: If you also prefer to set up HA on target system, follow the same steps.


第五步. Test OGG resource failover


1. Log on to node source node as oracle user:
$ /u01/app/11.2.0/grid/bin/crsctl relocate resource ggateapp -f
CRS-2673: Attempting to stop 'ggateapp' on 'node452'
CRS-2677: Stop of 'ggateapp' on 'node452' succeeded
CRS-2673: Attempting to stop 'ggatevip' on 'node452'
CRS-2677: Stop of 'ggatevip' on 'node452' succeeded
CRS-2672: Attempting to start 'ggatevip' on 'node453'
CRS-2676: Start of 'ggatevip' on 'node453' succeeded
CRS-2672: Attempting to start 'ggateapp' on 'node453'
CRS-2676: Start of 'ggateapp' on 'node453' succeeded
?
2. Check the status of OGG resource:
$ /u01/app/11.2.0/grid/bin/crsctl status resource ggateapp
NAME=ggateapp
TYPE=cluster_resource
TARGET=ONLINE
STATE=ONLINE on node453
?
NOTE: TARGET and STATE should both be ONLINE on node453.
?
3. Log on to another node 'node453' in this example as oracle user, go to OGG directory.
?
4. Set up LD_LIBRARY_PATH as described in Section 1, start GGSCI program:
$ ggsci
?
5. Check status of OGG processes:
GGSCI > info all
Program Status Group Lag
Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING MYEXT 00:00:09 0
0:00:04
EXTRACT RUNNING MYPUMP 00:00:00 0
0:00:05
NOTE: If you also prefer to set up HA on target system, follow the same steps, and make necessary changes to directory, etc.


如下是script的詳細(xì)代碼


#!/bin/sh
#set the Oracle Goldengate installation directory
export GGS_HOME=/cloudfs/goldengate
#set the oracle home to the database to ensure GoldenGate will get the
#right environment settings to be able to connect to the database
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
#specify delay after start before checking for successful start
start_delay_secs=5
#Include the GoldenGate home in the library path to start GGSCI
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:${GGS_HOME}:${LD_LIBRARY_PATH}
#check_process validates that a manager process is running at the PID
#that GoldenGate specifies.
?
check_process () {
if ( [ -f "${GGS_HOME}/dirpcs/MGR.pcm" ] )
then
? pid=`cut -f8 "${GGS_HOME}/dirpcs/MGR.pcm"`
? if [ ${pid} = `ps -e |grep ${pid} |grep mgr |cut -d " " -f2` ]
? then
? ? #manager process is running on the PID exit success
? ? exit 0
? else
? if [ ${pid} = `ps -e |grep ${pid} |grep mgr |cut -d " " -f1` ]
? then
? ? #manager process is running on the PID exit success
? ? exit 0
? else
? ? #manager process is not running on the PID
? ? exit 1
? fi
fi
else
? #manager is not running because there is no PID file
? exit 1
fi
}
?
#call_ggsci is a generic routine that executes a ggsci command
call_ggsci () {
? ggsci_command=$1
? ggsci_output=`${GGS_HOME}/ggsci < < EOF
? ${ggsci_command}
? exit
? EOF`
}
?
case $1 in
'start')
? #start manager
? call_ggsci 'start manager'
? #there is a small delay between issuing the start manager command
? #and the process being spawned on the OS. wait before checking
? sleep ${start_delay_secs}
? #check whether manager is running and exit accordingly
? check_process
? ;;
'stop')
? #attempt a clean stop for all non-manager processes
? #call_ggsci 'stop er *'
? #ensure everything is stopped
? call_ggsci 'stop er *!'
? #call_ggsci 'kill er *'
? #stop manager without (y/n) confirmation
? call_ggsci 'stop manager!'
? #exit success
? exit 0
? ;;
'check')
? check_process
? ;;
'clean')
? #attempt a clean stop for all non-manager processes
? #call_ggsci 'stop er *'
? #ensure everything is stopped
? #call_ggsci 'stop er *!'
? #in case there are lingering processes
? call_ggsci 'kill er *'
? #stop manager without (y/n) confirmation
? call_ggsci 'stop manager!'
? #exit success
? exit 0
? ;;
'abort')
? #ensure everything is stopped
? call_ggsci 'stop er *!'
? #in case there are lingering processes
? call_ggsci 'kill er *'
? #stop manager without (y/n) confirmation
? call_ggsci 'stop manager!'
? #exit success
? exit 0
? ;;
esac

總結(jié)

以上是生活随笔為你收集整理的11gR2 RAC GoldenGate的HA配置的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 欧美一级全黄 | 无码人妻久久一区二区三区蜜桃 | 国产亚洲精品精品精品 | 久久合合| 久久激情视频 | 国产精品theporn动漫 | 成人视品| julia在线播放88mav | 国产精品久久久久三级无码 | xxxx日本少妇| 久草综合在线 | 视频在线日韩 | 国内露脸中年夫妇交换 | h片网站在线观看 | 全国男人天堂网 | av中文一区 | 亚洲视频色 | 亚洲熟女乱色综合亚洲小说 | 91免费小视频 | 91色视频在线观看 | 黄色国产大片 | 91人妻一区二区三区蜜臀 | 欧美伊人久久 | 国产免费福利 | 亚洲一区二区网站 | 三级视频久久 | 国产欧美一区二区三区沐欲 | 91丨porny丨在线 | 国产成人免费av | 中文在线观看免费视频 | 激情伊人网| 成人av免费在线 | 黑人与日本少妇高潮 | 亚洲av无码精品一区二区 | 国产一区二区免费看 | 亚洲天堂视频网站 | 中文字幕在线视频一区 | 国产在线视频一区 | 好色999| 久久久青青草 | 日韩三级黄 | 天天综合网久久综合网 | 天天摸天天舔天天操 | 成年人视频免费看 | 欧美日韩一级片在线观看 | 99热这里只有精品99 | 97射射 | 日本裸体xx少妇18在线 | 91啪在线观看 | 免费国产一区二区 | 亚洲日本护士毛茸茸 | 福利午夜视频 | 韩日免费av| 久久成人国产精品 | 日本不卡免费在线 | 亚洲AV无码精品久久一区二区 | 国产视频一区二区三区在线观看 | 黄色片子视频 | 专干中国老太婆hd | 欧美激情自拍偷拍 | 色爱av综合网 | 美女被c出水 | 色欧美亚洲 | 亚洲成人日韩在线 | 久久影音| 毛片一级视频 | 澳门超碰| 久久久精品美女 | 亚洲视频 中文字幕 | 亚洲色图小说 | 日韩精品一区二区亚洲av | 日本视频在线看 | 黄色三级视频在线观看 | 香蕉视频99 | 亚洲精品国产成人av在线 | 青娱乐在线免费观看 | 91黄在线观看 | 毛片大全免费看 | 97人人爽人人爽人人爽 | 欧美另类极品videosbest最新版本 | 九一爱爱 | 亚洲自拍偷拍视频 | 亚洲影视一区二区 | 国产99久一区二区三区a片 | 国产精品网页 | 欧美激情在线狂野欧美精品 | 全黄性性激高免费视频 | 波多野结衣一区二区 | 成人免费在线播放 | 欧美女人一区二区 | 日本国产在线观看 | 伊人久久久久久久久 | 麻豆最新网址 | 国产人妻一区二区三区四区五区六 | 欧美日韩视频在线观看免费 | 久久网站免费看 | 欧美色99| 日本美女操 | 伊人影院综合在线 |