您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 信息化管理 > SharePlex for Oracle培训
SharePlex.forOracleSharePlexForOracle培训Part123ClassOverview.SharePlexOverview.SharePlexBasics.Processes/Services.Architecture.WhatSharePlexReplicates.SettingupSharePlexReplication.SharePlexMaintenance.MonitorSharePlex4SharePlexOverviewSharePlexBasics5WhatisSharePlex.forOracle?ItisaRedoLog-BasedmethodtoreplicatedatachangesinanOracledatabasetooneormoreOracledestinations.6ReplicationTerminology.HighAvailability=adesignthatallowsforavailabilityduringscheduledmaintenance/*高可用性:*/.DisasterRecovery=adesignthatallowsforcontinuousoperationsintheeventofamajorunexpectedoutageorcompletesiteloss/*灾难恢复*/.Reporting=adesignthatmakessomeorallapplicationdataavailabletoendusersfordecisionsupportusewithoutperformanceimpactonproduction/*报告*/.PeertoPeer=areplicationenvironmentwheresourcesarealsotargetsandallareinfinitelyupdateable/*对等*/7SharePlex关键词.PrimarySystem=Sourcesystem/*主系统,即源系统*/.Secondarysystem=Targetsystem/*次系统,即目标系统*/.Transaction=Changetodata/*事务*/.Datasource=Oracleinstancebeingreplicated/*数据源*/.Configurationfile=ReplicationrulesforSharePlex/*配置文件:SharePlex的复制规则*/.Activation=theprocessbywhichaconfigurationfileisidentifiedtoSharePlexasthecurrentreplicationruleset/*激活:进程通过将配置文件关联到splex,以作为当前的复制规则*/8SharePlexOverviewProcesses/Services9SharePlexComponents.sp_cop–核心主进程SharePlexprocesses.sp_ctrl–SharePlex管理控制台.SharePlex基础服务进程.Capture:sp_ocap.Read:sp_ordr.Export:sp_xport.Import:sp_mport.Post:sp_opst10HowDoesSharePlexWork?SourceSystem:Oracledb,Oraclelogfiles,Capture/Read/ExportTargetSystem:Import/post,Oracledb11/*主进程*/sp_cop.ParentprocessforallSharePlexprocesses/*所有Splex的父进程*/.Configuredbyenvironmentvariablestobindtoaspecifiedport/*为了绑定到指定的端口,需要通过环境变量配置*/.Shouldbestartedbeforeusersaccessdataonsourcesystem/*必须在用户查看源系统的数据之前启动*/.Runsatleastonceoneachserverinthereplicationenvironment/*至少在每个服务器的复制环境中运行一次*/.MustbestartedbyaSharePlexadministrator/*必需由Splex管理员开启*/.Makessurethatallnecessaryprocessesarerunningifdataisavailabletoreplicate/*如果复制数据可用,可以确保所有必需的进程正常运行*/12SharePlexCaptureProcess.Capture(sp_ocap)followstheonlineorarchivedredologsandreadschangestobereplicatedintosharedmemory-basedcapturequeue./*监视联机或归档重做日志,读取改变的数据,并将其复制到capture的共享内存队列中*/Oracleonline/redologs----SharePlexCapture----Capturequeue13重做日志OracleRedoLog.Redolog:primarypurposeisOraclerecovery/*重做日志,主要为了恢复oracle*/.Redoisbufferedbeforewritingtodisk/*在将数据写入磁盘之前,重做被缓存*/.Redologsarewrittentoinacyclicfashion;firstlogisoverwrittenafterlastlogisfilled/*重做日志以一种循环的方式记录,后面的日志被填满时,先前的日志会被重写*/.Redomaybearchivedtodisk/*重做日志可以被归档到磁盘*/.OnlineredologiswhereOraclerecordsalldatablockchangesfortheentiredb/*联机重做日志是记录了整个数据库改变数据块*/.Oraclemanagesrollbackentriesandinternal(sys)objectchangesinredolog/*oracle在重做日志中管理回滚端和内部对象的改变*/.Txn’swrittentothelogbyseveralmethods;time,buffercapacity,commit,rollback,checkpoint...14SharePlexReadProcess.TheReadprocess(sp_ordr)readsdatafromCapturequeueand‘addresses’it,addingtargetinstancename,tablename,namedifferencefromsourcetotarget,convertsobjectidtoschemaandtablename;readschangesintoExportqueue/*sp_ordr将从捕获队列中读取的数据并封装它,标记上目的数据库的实例名、表名,命名源和目标的差异,*将方案和表名的转化成对象ID;最后将转变后的数据写入到导入队列中。*/SharePlex:ReadCapturequeues---Exportqueues15SharePlexExportProcess.Export(sp_xport)readstransactionsfromtheexportqueueandsendsthemoverthenetworktotheappropriateimportprocessviaTCP/IP--NOTSQL*Net/*sp_xport从导出队列中读取事务,并在网络上通过TCP/IP协议(而不是SQL*Net)发送到适当的导入进程中*/ExportqueuesSharePlexExportSharePlexImportSourceSystemTCP/IPTarget16SharePlexImportProcess.Import(sp_mport)receivestransactionsfromExportandpassesthemtotheappropriatepostqueues/*sp_mport从sp_xport中接收到一个事务后,将其传递给适当的post队列*/SharePlexExportSharePlexImportPostqueuesSourceTargetsystemTCPIP17PostProcess.Post(sp_opst)readsfrompostqueues,constructsaSQLstatementforthechangetobemadeandexecutestheSQLagainstthetargetinstance/*sp_opst进程读取post队列,然后构造一条因为源数据库实例改变产生的SQL语句,并执行这条能够同步目标数据库实例和源数据库实例的SQL语句*/PostqueuesSharePlexPostTargettables18SharePlexQueues.Queueshavesharedmemory,diskanddatabasecomponents/*队列能够共享内存,磁盘和数据库组件*/.Handshakingbetweenprocessestoacknowledgereceiptofdatainorder/*有序的在进程间交互已收到的数据*/.Dataisnotread-released(deleted)fromonequeueuntilitiswrittentothenext/*在下次写入数据之前,队列包含的数据不会被释放*/.Dataiswrittentodiskifthereceivingprocessdoesnotacknowledgereceiptwithinafewseconds/*如果一定秒数时间内,接收进程不能接收新数据,其中的数据将被写入到磁盘*/.Performance:fastertogothroughmemorypipelinethanqueuingindatabasetables/*性能:比在数据库表中队列技术更快的检索内存管线*/.FaultTolerant:dataoverflowstodiskduringareplicationstreamoutage/*容错:在复制流断掉期间(即:没有任何进程读取队列中的数据时),队列中的溢出数据被写入磁盘*/19SharePlexOverviewArchitecture20SharePlexforOracleArchitectureCaptureQCaptureProcessPostQPostProcessImportProcessExportQExportProcessNetworkQuestTransportLayerReaderProcessOracleLogFilesSQLTargetSystemSourceSystem21SharePlexOverviewWhatSharePlexReplicates…22SharePlexInstallation23InstallationOverview.FTP上传安装文件和补丁程序SharePlex_Oracle-5.3.0.63-AIX-5.1-Oracle8i.runSharePlex_Oracle-5.3.4.50-AIX-5.1-Oracle8i-patch.run.安装软件和打补丁详见记录日志log.运行ora_setup,创建数据库用户.在AIX平台,加入exportEXTSHM=ON;环境变量.打开DB:alterdatabaseaddsupplementlogdata;.启动Shareplex24Se
本文标题:SharePlex for Oracle培训
链接地址:https://www.777doc.com/doc-3531636 .html