GoldenGate学习笔记(4)_进程配置与管理

GoldenGate学习笔记进程配置

参考文档 <>P34

 

一个典型的GoldenGate配置需要:

Source端,配置一个管理进程, 添加一个Extract 进程,添加一个本地队列路径,定义一个远端的接收队列路径

 

Target端,配置一个管理进程和添加一个Replicat进程,指定一个应用队列,即抽取进程定义的远端队列

完整的例子参考<< GoldneGate学习笔记_配置例程之单向复制.doc>>

 

一 Configure the Manager Process

 

1 The Manager Process performs the following functions:

1) Start GoldenGate processes

2) Start dynamic processes

3) Perform. trail management

4) Issue event and threshold reports

5) Manitain error reporting

 

2 Configure Manager

Ensure that the Manager user has the proper system permissions to read, write, and purge GoldenGate files and directories to control processes.

 

1) From the GoldenGate directory, run the ggsci program. This is the GoldenGate Software Command Interface, commonly known as GGSCI.

oracle@Z813:/u01/ggs> ./ggsci

 

GoldenGate Command Interpreter for Oracle

Version 10.0.0.13 Build 001

Linux, x64, 64bit (optimized), Oracle 9 on Apr  8 2009 09:04:32

 

Copyright GoldenGate Software, Inc.  1995-2009.

This software includes code written by third parties, including

Blowfish encryption library (Copyright (C) 1997 by Paul Kocher)

and other code as specified at http://support.goldengate.com. Additional

details regarding such third party code, including applicable copyright,

legal and licensing notices, are available at the above referenced URL.

 

 

2) In GGSCI, issue the following command.

EDIT PARAMS MGR(管理进程的参数文件一定要这个名)

 

GGSCI (Z813) 9> edit params manager

port 7809

dirprm/manager.prm" [New] 1L, 10C written                                                                 

 

GGSCI (Z813) 10> start manager

ERROR: Parameter file /u01/ggs/dirprm/mgr.prm does not exis

 

3) The only required parameter for Manager is PORT, which defines the port number on which Manager runs on the local system. The default port is 7809. You must specify either the default port or another port. This must be to start processes. The Extract process uses the port to request Manager to start a remote Collector process or an initial-load Replicat process.

 

PORT

--指定端口

Note the port number also must be specified with the MGRPORT argument of the Extract parameter RMTHOST.(Extract (Data Pump)参数文件中必须指定远端的接收端口同样为)

 

3 Recommended parameters

 

1) Dynamic port parameters

DYNAMICPORTLIST { | -} [ , ...]

--指定端口范围

 

2) The amount of time that Manager waits to reuse a port after it has been used or after encountering an error is controlled by the Manager parameter

DYNAMICPORTREASSIGNDELAY.

DYNAMICPORTREASSIGNDELAY

--重用延迟

 

3) Autostart parameters

 

Use the AUTOSTART parameter to start specified extraction and replication processes as soon as Manager starts.

AUTORESTART {ER | EXTRACT | REPLICAT} {group name | wildcard}

[, RETRIES ]

[, WAITMINUTES ]

[, RESETMINUTES ]

 

 

4 Starting/Stopping Manager

 

1) To run Manager from the command line(OS command line start manager processes)

To run Manager from the command shell of the operating system, use the

following syntax.

mgr paramfile [reportfile ]

 

2) To run Manager from GGSCI

1. From the GoldenGate directory, run GGSCI.

2. In GGSCI, issue the following command.

START MANAGER

 

3) Stop Manager

STOP manager

 

 

Configure Extract and Replica Processes

 

Extract进程和Replicat进程必须手动添加,而不像Manager进程,定义一个参数文件就可启动.

 

ADD EXTRACT ext_test, TRANLOG, BEGIN NOW

ADD EXTTRAIL /u01/ggs/dirdat/t_, EXTRACT ext_test, MEGABYTES 20

 

ADD REPLICAT rep_test, EXTTRAIL /u01/ggs/dirdat/r_, nodbcheckpoint

 

 

Getting Started with GoldenGate

1 ./ggsci /tmp/ggsci.sql 脚本化执行 Command

 

oracle@Z813:/u01/ggs> vi tmp.sql

 

info all

 

 

 

GoldenGate Command Interpreter for Oracle

Version 10.0.0.13 Build 001

Linux, x64, 64bit (optimized), Oracle 9 on Apr  8 2009 09:04:32

 

Copyright GoldenGate Software, Inc.  1995-2009.

This software includes code written by third parties, including

Blowfish encryption library (Copyright (C) 1997 by Paul Kocher)

and other code as specified at http://support.goldengate.com. Additional

details regarding such third party code, including applicable copyright,

legal and licensing notices, are available at the above referenced URL.

 

 

GGSCI (Z813) 1> info all

 

 

Program     Status      Group       Lag           Time Since Chkpt

 

MANAGER     RUNNING                                          

EXTRACT     RUNNING     DPEMYDB     00:00:00      00:00:00   

EXTRACT     RUNNING     EXTMYDB     00:00:00      00:00:01   

 

 

GGSCI (Z813) 2> oracle@Z813:/u01/ggs>

 

Note: To stop the Manager process from a batch file, make certain to add the ! argument to the end of the STOP MANAGER command. Otherwise, GGSCI issues a prompt that requires a response and cause the processing into a loop.

(Stop manager 后面可以加 )

STOP MANAGER ! Stops Manager without user confirmation

 

2 Using GoldenGate parameter files

 

2,1 GLOBALs file: The GLOBAL file stores parameters that relate to the GoldenGate instance as a whole.

EDIT params ./GLOBALS

(Global文件不是必须的)

 

2.2 runtime parameters:

edit params mgr

edit params extcdz

edit params repcdz

 

2.3 Verifying a parameter file(在正式启动进程之前先对参数文件做个语法检查。)

To verify parameter syntax

1) Include the CHECKPARAMS parameter in the parameter file.

2) Start the associated process by issuing the START EXTRACT or START REPLICAT command in GGSCI.

START {EXTRACT | REPLICAT}

 

GoldenGate audits the syntax and writes the results to the report file or the screen. Then the process stops.

在参数文件中加CHECKPARAMS参数,则不管参数文件是否存在语法的错误,进程都会退出.应通过查看report文件来查看到底有没有语法上的错误.如没有,则去掉参数CHECKPARAMS,启动进程.

 

2.4 Viewing a parameter file(查看参数文件)

view params

view params mgr

view paramx extcdz

 

2.5 changing a parameter file

Stop mgr

edit mgr

start mgr

 

2.6 Using OBEY

create a library of text files that contain frequently used parameter settings, and then you can call any of those files from the active parameter file by means of the OBEY panamer.

       OBEY

类似C语言中的Include,对频繁执行的命令放到一个单独的文件中,在运行时,包括进来.

 

Monitor Processing

 

1 Using the error log

open the ggserr.log file in the GoldenGate directory or issue the VIEW GGSEVT command from GGSCI

       view ggsevt

       more ggserr.log | grep ERROR

 

2 GGSCI information commands

 

INFO {EXTRACT | REPLICAT}                   Shows general information.

INFO ALL                                Shows information about all GoldenGate processes on the system.

                           

STATS {EXTRACT|REPLICAT}               Shows processing statistics

 

STATUS {EXTRACT|REPLICAT}                   Shows the status of a process

 

LAG {EXTRACT|REPLICAT}                          Shows synchronization latency

 

INFO RMTTRAIL                                              Shows trail information. For use the full path name of the trail

 

STATUS MANAGER                                                            Shows the status of the Manager process.

 

SEND MANAGER                                                               Shows runtime statistics for the Manager process.

 

SEND {EXTRACT | REPLICAT} ,       

Communicates with a running process and provides options to view runtime information or send requests.

 

3 Get Help

HELP

Eg: HELP  ADD EXTRACT

更多的命令参考<手册之GoldenGate常用命令>>

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10248702/viewspace-624577/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10248702/viewspace-624577/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值