手把手教你生产安装goldengate的步骤.docx
- 文档编号:3838229
- 上传时间:2022-11-25
- 格式:DOCX
- 页数:53
- 大小:2.01MB
手把手教你生产安装goldengate的步骤.docx
《手把手教你生产安装goldengate的步骤.docx》由会员分享,可在线阅读,更多相关《手把手教你生产安装goldengate的步骤.docx(53页珍藏版)》请在冰豆网上搜索。
手把手教你生产安装goldengate的步骤
1.安装配置GoldenGate
1.1.设置环境变量
设置ORACLE_HOME和ORACLE_SID
1.1.1.官方资料
TospecifyOraclevariablesonUNIX-basedsystems
●IfthereisoneinstanceofOracleonthesystem,youonlyneedtosetORACLE_HOMEand
ORACLE_SIDatthesystemlevel.Ifyoucannotsetthemthatway,usethefollowingSETENV
statementsintheparameterfileofeveryExtractandReplicatgroupthatwillbe
connectingtotheinstance.
SETENV(ORACLE_HOME=“
SETENV(ORACLE_SID=“
TheseparametersoverridethesystemsettingsandallowtheOracleGoldenGate
processtosetthevariablesatthesessionlevelwhenitconnectstothedatabase.
●IftherearemultipleOracleinstancesonthesystemwithExtractandReplicat
processesconnectingtothem,youwillneedtouseaSETENVstatementintheparameter
fileofeachprocessgroupandpointittothecorrectinstance.Forexample,the
followingshowsparameterfilesfortwoExtractgroups,eachcapturingfromadifferent
Oracleinstance.
Group1:
EXTRACTora9a
SETENV(ORACLE_HOME=“/home/oracle/ora9/product”)
SETENV(ORACLE_SID=“ora9a”)
USERIDggsa,PASSWORDggsa
RMTHOSTsysb
RMTTRAIL/home/ggs/dirdat/rt
TABLEhr.emp;
TABLEhr.salary;
Group2:
EXTRACTora9b
SETENV(ORACLE_HOME=“/home/oracle/ora9/product”)
SETENV(ORACLE_SID=“ora9b”)
USERIDggsb,PASSWORDggsb
RMTHOSTsysb
RMTTRAIL/home/ggs/dirdat/st
TABLEfin.sales;
TABLEfin.cust;
TospecifyOraclevariablesonWindowssystems
●IfthereisoneinstanceofOracleonthesystem,theRegistrysettingsforORACLE_HOME
andORACLE_SIDshouldbesufficientforOracleGoldenGate.Ifthosesettingsare
incorrectintheRegistryandcannotbechanged,youcansetanoverrideasfollows.
❍OnthedesktoporStartmenu(dependingontheWindowsversion),right-clickMy
Computer,andthenselectProperties.
❍InProperties,clicktheAdvancedtab.
❍ClickEnvironmentVariables.
❍UnderSystemVariables,clickNew.
❍ForVariableName,typeORACLE_HOME.
❍ForVariableValue,typethepathtotheOraclebinaries.
❍ClickOK.
❍ClickNewagain.
❍ForVariableName,typeORACLE_SID.
❍ForVariableValue,typetheinstancename.
❍ClickOK.
●IftherearemultipleOracleinstancesonthesystemwithExtractandReplicat
processesconnectingtothem,dothefollowing.
❍Usetheprecedingprocedure(singleOracleinstanceonsystem)tosetthe
ORACLE_HOMEandORACLE_SIDsystemvariablestothefirstOracleinstance.
❍StartalloftheOracleGoldenGateprocessesthatwillconnecttothatinstance.
❍RepeattheprocedureforthenextOracleinstance,butthistimeEdittheexisting
ORACLE_HOMEandORACLE_SIDvariablestospecifythenewinformation.
❍StarttheOracleGoldenGateprocessesthatwillconnecttothatinstance.
❍RepeattheEditandstartupprocedurefortherestoftheOracleinstances.
SettinglibrarypathsfordynamicbuildsonUNIXsystems
OracleGoldenGateusessharedlibraries.WhenyouinstallOracleGoldenGateonaUNIX
system,thefollowingmustbetruebeforeyourunGGSCIoranyotherOracleGoldenGate
process.
1.WhenOracleGoldenGateconnectstothedatabaselocally,allofthefollowingmust
havethesamebittype,eitherall32-bit,all64-bit,orallIA64:
2.WhenOracleGoldenGateconnectsthroughSQL*Net,theOracleclientlibraryandthe
OracleGoldenGatebuildmustmatch.ThismeansthattheOracleversion,thebittype
(32-bit,64-bit,IA64)andtheoperatingsystemversionallmustmatch.Ifyouareusing
theTRANLOGOPTIONSparameterwiththeLOGSOURCEoptionandOracleGoldenGate
connectstotransactionlogsfromadifferentoperatingsystem,theOracleversions
mustalsobethesame.
3.Makecertainthatthedatabaselibrariesareaddedtotheshared-libraryenvironment
variablesofthesystem.Thisprocedureisusuallyperformedatdatabaseinstallation
time.ConsultyourDatabaseAdministratorifyouhaveanyquestions.
4.IfyouwillberunninganOracleGoldenGateprogramfromoutsidetheOracle
GoldenGateinstallationdirectoryonaUNIXsystem:
❍(Optional)AddtheOracleGoldenGateinstallationdirectorytothePATH
environmentvariable.
❍(Required)AddtheOracleGoldenGateinstallationdirectorytotheshared-
librariesenvironmentvariable.
Forexample,givenanOracleGoldenGateinstallationdirectoryof/ggs/10.0,thesecond
commandinthefollowingtablerequiresthesevariablestobeset:
TosetthevariablesinKornshell
PATH=
$PATH
exportPATH
$
export
TosetthevariablesinBourneshell
exportPATH=
$PATH
export
$
TosetthevariablesinCshell
setenvPATH
$PATH
setenv
$
1.1.2.源端10.34.1.1机器
创建GG用户,密码gg
mkdir/home/gg
useradd-d/home/gg-goinstall-Gdbagg
passwdgg
修改配置文件
增加如下配置:
exportORACLE_SID=jiesuan1
exportORACLE_BASE=/opt/oracle/app/oracle
exportORACLE_HOME=/opt/oracle/app/oracle/11.2.0
exportORACLE_UNQNAME=jiesuan
exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:
${LD_LIBRARY_PATH}
exportPATH=${ORACLE_HOME}/bin:
${PATH}
exportLD_LIBRARY_PATH=/opt/oracle/app/oracle/11.2.0/lib:
/bak/gg:
${LD_LIBRARY_PATH}
umask022
1.1.3.源端10.34.1.1上增加tns解析
使用oracle用户,修改/opt/oracle/app/oracle/11.2.0/network/admin目录中的tnsnames.ora文件。
增加以下容:
asm=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=10.34.1.1)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=+asm)
(UR=A)
)
)
使用sqlplussys/asmjsdbasmassysdba命令,看是否能连接到数据库。
1.1.4.修改10.34.1.1上ASM数据库的参数
1)使用grid用户登录
是id命令可以看当前用户
2)修改参数remote_login_passwordfile
altersystemsetremote_login_passwordfile=sharedscope=spfile;
3)重启数据库
用root用户操作。
crsctlstopcrs-f
crsctlstartcrs
shutdown-r(不能用reboot)
Crsctlstop
1.1.5.目标端10.34.1.72机器
设置环境变量
ORACLE_HOME=e:
\app\Administrator\product\11.2.0\dbhome_1
ORACLE_SID=fenxiDB2
重启服务器
C:
\Users\Administrator>echo%ORACLE_HOME%
C:
\app\Administrator\product\11.2.0\dbhome_1
C:
\Users\Administrator>echo%ORACLE_SID%
JSDB142
1.2.安装GG(只在小机1和分析2上建)
1)解压GG软件到f:
\gg目录(分析服务器2),\bak\gg目录(小机1)
2)用cmd命令,进入f:
\gg目录中,敲“GGSCI”命令
3)敲“CREATESUBDIRS”命令
10.34.1.1机器截图
1034.1.72机器截图
1.3.官方系统要求
每个GoldenGate实例可以支持并发500个Extract和Replicat进程。
每个Extract和Replicat进程需要大约25--55MB存,这取决于transaction的大小和并发transaction数量。
工作目录
每个GoldenGate实例的工作目录,大约需要40M的空间。
辅助空间
这部分空间主要存放Tails,它包含了工作数据。
这部分空间的消耗取决于Trail,依赖于将要处理的数据量。
可以保持7-10天的GoldenGate队列文件即可。
对于RAC环境
GoldenGate的相关软件和工作目录都需要配置在共享盘中,从而保证对所有node都是可用的,从任何一个node都可以启动GoldenGate的进程,当其中一个node出现异常是,可以在剩余的node启动而无须修改任何配置参数。
否则,如果运行在单个node上的话,需要将剩余node中的归档日志通过一定的技术共享出来并加载到GoldenGate运行节点。
必须两台机子保持时钟同步。
GoldenGate一个Port用于ManagerProcess之间通信(Source和Target),本地进程间通信使用的端口围:
缺省围从7809开始,或者可以定义一个从7809+256的端口。
OracleGoldenGateparameterssettingsforRAC
●OnAIXandSolarismachines,usetheExtractparameterTHREADOPTIONSwiththe
BINDCPU
thatisupdatedbydifferentprocessors.
●OracleGoldenGatequeuesdatainmemorybeforesendingittothetargetsystem.The
INQUEUESIZEandOUTQUEUESIZEoptionsoftheTHREADOPTIONSparameterdeterminehow
muchdatatoqueue.Ifneeded,youcanincreasetheperformanceofExtractonOracle
RACbytuningtheseparameters.
●OracleGoldenGatedetectsorphanedtransactions,whichcanoccurwhenanodefails
duringatransactionandExtractcannotcapturetherollback.Althoughthedatabase
performstherollbackonthefailovernode,thetransactionwouldotherwiseremainin
theExtracttransactionlistindefinitelyandpreventfurthercheckpointingforthe
Extractthreadthatwasprocessingthetransaction.Bydefault,OracleGoldenGate
purgesthesetransactionsfromitslistaftertheyareconfirmedasorphaned.Tocontrol
thisbehavior,usetheTRANLOGOPTIONSparameterwiththePURGEORPHANEDTRANSACTIONS
|NOPURGEORPHANEDTRANSACTIONSandTRANSCLEANUPFREQUENCYoptions.Thisfunctionality
canbecontrolledondemandwiththeSENDEXTRACTcommandinGGSCI.
SpecialproceduresonRAC
●IftheprimarydatabaseinstanceagainstwhichOracleGoldenGateisrunningstopsor
failsforanyreason,Extractwillabend.Toresumeprocessing,youcanrestartthe
instance,oryoucanmounttheOracleGoldenGatebinariestoanothernodewherethe
databaseisrunningandthenrestarttheOracleGoldenGateprocesses.Stopthe
ManagerprocessontheoriginalnodebeforestartingOracleGoldenGateprocesses
fromanothernode.
●Anytimethenumberofredothreadschanges,theExtractgroupmustbedroppedand
re-created.Fortherecommendedprocedure,seetheOracleGoldenGateWindowsand
UNIXAdministrator’sGuide.
●TowriteSQLoperationstothetrail,Extractmustverifythattherearenoother
operationsfromotherRACnodesthatprecedethoseinthecurrentredologthatitis
reading.Forexample,ifalogcontainsoperationsthatwereperformedfrom1:
00a.m.
to2:
00a.m.,andthelogfromNode2containsoperationsthatwereperformedfrom
1:
30a.m.to2:
30a.m.,thenonlythoseoperationsupto,andincluding,the2:
00a.m.
onecanbemovedtotheserverwherethemainExtractiscoordinatingtheredodata.
Extractmustensurethattherearenomoreoperationsbetween2:
00a.m.and2:
30a.m.
thatneedtobecaptured.
●Inactive-passiveenvironments,theprecedingrequirementmeansthatyoumightneed
toperformsomeoperationsandarchivelogswitchingonthepassivenodetoensure
thatoperationsfromtheactivenodearepassedtothepassivenode.Thiseliminates
anyissues
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 手把手 生产 安装 goldengate 步骤