在上篇GG 單向復(fù)制的示例中,有配置Manager process,這篇具體來看一下Manager Process 的配置。
Oracle Golden Gate 系列六 --11gR2 Ora2Ora 單向復(fù)制GG 示例:http://www./database/201111/111285.html
一.Overview of the Manager process
To configure andrun Oracle GoldenGate, a Manager process must be running on the source andtarget systems. The Manager process performs the following functions:
要配置GG,必須先要在Source和 Target System上部署Manager Process。 該進(jìn)程執(zhí)行一下4個函數(shù):
(1) Start Oracle GoldenGateprocesses
--啟動GG 進(jìn)程
(2) Start dynamic processes
--啟動動態(tài)進(jìn)程
(3) Perform trail management
--執(zhí)行trail 管理
(4) Create event, error, andthreshold reports
--創(chuàng)建event,error和threshold報告
There is oneManager for each Oracle GoldenGate installation. One Manager can support multipleOracle GoldenGate extraction and replication processes.
--每個GG 都必須要有一個Manager Process,一個MP可以支持多個GGExtraction 和 Replication 進(jìn)程。
二.Configuring Manager
To configureManager, create a parameter file by following these steps. If you installed OracleGoldenGate on a UNIX cluster, configure the Oracle GoldenGate Manager process withinthe cluster application as directed by the vendor’s documentation, so thatOracle GoldenGate will fail over properly with the other applications.
--配置Manager,只需要按照以下步驟創(chuàng)建一個參數(shù)文件。
To configure Manager
1. From the Oracle GoldenGatedirectory, run the ggsci program to open the Oracle GoldenGate Software CommandInterface, commonly known as GGSCI.
--在GG的根目錄運行g(shù)gsci命令,因為這個命令會調(diào)用其他的命令,如果不是在根目錄下執(zhí)行,雖然在通過PATH變量也可以找到ggsci命令,但是會找不到其他的文件而報錯。
2. In GGSCI, issue the following command toedit the Manager parameter file.
EDIT PARAMS MGR
--在ggsci里執(zhí)行上述命令,編輯Manager 進(jìn)程參數(shù)
3. Add the following parameter to specifythe Manager port number.
PORT<port_number>
PORT defines theport number on which Manager runs on the local system.
--這個端口是本地OS 的端口
Observe these guidelines:
(1) The default port number is7809.
--默認(rèn)端口是7809
(2) You must specify either thedefault port number or a different one.
--必須指定這個端口為默認(rèn)端口或者其他端口
(3) Each Manager instance on asystem must use a different port number.
--每個Manager instance必須使用不同的端口
(4) The port must be unreserved andunrestricted. GGSCI uses this port to request Manager to start processes. TheExtract process uses this port to request Manager to start a remote Collectorprocess or an initial-load Replicat process.
--這個端口不能受限
(5) PORT is the only requiredManager parameter.
--端口是Manager 唯一必須指定的參數(shù)
NOTE:
The port numberalso must be specified with the MGRPORT argument of the Extract parameter RMTHOST.
--Extrace 的RMTHOST 也必須指定MGRPORT 端口
三.Recommended parameters
The followingparameters are optional, but recommended for the Manager process.
--第二節(jié)講了Manager 必須指定的參數(shù)Port,這里講了一些可選的參數(shù)。
(1) USERID: Required if usingOracle GoldenGate DDL support, specify the Manager user and password with the .
--如果使用DDL,需要創(chuàng)建一個用戶來保存相關(guān)的table,這里指定該用戶的用戶名和密碼
(2) DYNAMICPORTLIST: Use to specifyup to 256 unreserved, unrestricted ports for dynamic TCP/IP communicationsbetween the source and target systems. The Collector,Replicat, and GGSCIprocesses will use these ports. In the absence of DYNAMICPORTLIST, Managertries to start Collector on port 7840. If 7840 is not available, Manager incrementsby one until it finds an available port.
--動態(tài)的指定端口在source 和 targetsystems 進(jìn)行交流。 默認(rèn)情況下從7840 端口開始,如果該端口不可用,則端口數(shù)加1,知道找到一個可用的。
(3) DYNAMICPORTREASSIGNDELAY:Controls how long Manager waits to assign a port that was assigned before.
--控制Manager 等待分配端口的時間。
(4) AUTOSTART: Starts Extract andReplicat processes when Manager starts. This can be useful, for example, if youwant Oracle GoldenGate activities to begin immediately when you start thesystem, assuming Manager is part of the startup routine. You can use multiple AUTOSTARTstatements in the same parameter file.
--在Manager 啟動時,自動啟動Extract和replicat進(jìn)程。 這是一個有用的命令,可以將Manager 添加到stratup routine里,這樣Manager啟動之后,Extrace 和Replicat 也就可以自動啟動了。
(5) AUTORESTART: Starts Extract andReplicat processes again after abnormal termination.
--當(dāng)Extract 和Replicat 進(jìn)程異常中斷后自動啟動。
(6) PURGEOLDEXTRACTS: Purges trailfiles when Oracle GoldenGate has finished processing them. Without using PURGEOLDEXTRACTS,no purging is performed, and trail files can consume significant diskspace.Using PURGEOLDEXTRACTS as a Manager parameter is preferred over using theExtract or Replicat version of PURGEOLDEXTRACTS.
--當(dāng)trail file 處理完后purge它們,如果沒有指定該參數(shù),trail file 會占用大量的磁盤空間。 Manager 的PURGEOLDEXTRACTS參數(shù)優(yōu)先級比Extrace 和Replicat 的PURGEOLDEXTRACTS高。 即會先使用Manager的該參數(shù)。
NOTE:
When using PURGEOLDEXTRACTS,do not permit trail files to be deleted by any user or program other than OracleGoldenGate. It will cause PURGEOLDEXTRACTS to function improperly.
注意,如果使用PURGEOLDEXTRACTS,那么不允許出GG之外的用戶和程序刪除trail files 文件。 否則會導(dǎo)致PURGEOLDEXTRACTS異常。
四.Starting Manager
Manager must berunning before you start other Oracle GoldenGate processes. You can startManager from:
--Manager 必須先與GG 進(jìn)程啟動
(1) The command line of any supportedoperating system
(2) GGSCI
(3) The Services applet on aWindows system if Manager is installed as a service. See the Windowsdocumentation or your system administrator.
(4) The Cluster Administrator toolif the system is part of a Windows cluster. This is the recommended way tobring the Manager resource online. See the cluster documentation or your systemadministrator.
(5) The cluster software of a UNIXor Linux cluster. Refer to the documentation provided by the cluster vendor todetermine whether to start Manager from the cluster or by using GGSCI or thecommand line of the operating system.
4.1 To start Manager from the command line
To run Managerfrom the command shell of the operating system, use the following syntax.
mgr paramfile<param file> [reportfile <report file>]
The reportfile argumentis optional and can be used to store the Manager process report in a locationother than the default of the dirrpt directory in the Oracle GoldenGateinstallation location.
4.2 To start Manager from GGSCI
1. From the Oracle GoldenGate directory,run GGSCI.
2. In GGSCI, issue the following command.
START MANAGER
On Windows systems, you can use the BOOTDELAYMINUTES parameter to specify how long aftersystem boot time Manager delays until it starts its processing activities.
NOTE:
When startingManager from the command line or GGSCI on Windows Server 2008 with User Account Control enabled, you will receive a UAC prompt requesting you to allow or deny the program to run.
五.Stopping Manager
Manager runsindefinitely or until stopped by a user. In general, Manager should remain runningwhen there are synchronization activities being performed. Manager performs importantmonitoring and maintenance functions, and processes cannot be started unless Manageris running.
--在停Manager 之前,需要先停GG 進(jìn)程,因為Manager負(fù)責(zé)監(jiān)控和維護(hù)其他的進(jìn)程。
To stop Manager
(1) On UNIX, Linux, and z/OS usingUSS, Manager must be stopped by using the STOP MANAGER command in GGSCI.
STOP MANAGER [!]
Where: ! stops Manager without userconfirmation.
--這里可選的!表示不經(jīng)過用戶確認(rèn)直接stop
(2) On Windows, if Manager isinstalled as a service, you can stop it from the Services applet. See theWindows documentation or your system administrator.
(3) In a Windows cluster, Managermust only be stopped by taking the Manager resource offline by using theCluster Administrator. If you attempt to stop the Manager service from theGGSCI interface, the cluster monitor interprets it as a resource failure and willattempt to bring the resource online again. If a stop request is repeatedly submittedfrom the GGSCI interface, and the restart threshold of the Manager cluster resourceis exceeded, the cluster monitor marks the Manager resource as failed.
(4) In a UNIX or Linux cluster,refer to the documentation provided by the cluster vendor to determine whetherManager should be stopped from the cluster or by using GGSCI.