手把手教你生产安装goldengate的步骤最终版.docx

上传人:b****1 文档编号:3268478 上传时间:2023-05-05 格式:DOCX 页数:60 大小:2.04MB
下载 相关 举报
手把手教你生产安装goldengate的步骤最终版.docx_第1页
第1页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第2页
第2页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第3页
第3页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第4页
第4页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第5页
第5页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第6页
第6页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第7页
第7页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第8页
第8页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第9页
第9页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第10页
第10页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第11页
第11页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第12页
第12页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第13页
第13页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第14页
第14页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第15页
第15页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第16页
第16页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第17页
第17页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第18页
第18页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第19页
第19页 / 共60页
手把手教你生产安装goldengate的步骤最终版.docx_第20页
第20页 / 共60页
亲,该文档总共60页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

手把手教你生产安装goldengate的步骤最终版.docx

《手把手教你生产安装goldengate的步骤最终版.docx》由会员分享,可在线阅读,更多相关《手把手教你生产安装goldengate的步骤最终版.docx(60页珍藏版)》请在冰点文库上搜索。

手把手教你生产安装goldengate的步骤最终版.docx

手把手教你生产安装goldengate的步骤最终版

1.6.3.在源端和目标端创建GoldenGate管理用户,并授权20

 

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/asmjsdb@asmassysdba命令,看是否能连接到数据库。

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

BINDCPUoption.Thisparameterhandlesthread-safetyissuesrelatedtomemory

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

thatoperationsfromtheactivenodeare

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 人文社科 > 法律资料

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2