GoldenGate學習筆記(4)_程式配置與管理
GoldenGate學習筆記程式配置
參考文件 <
一個典型的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 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 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}
INFO ALL Shows information about all GoldenGate processes on the system.
STATS {EXTRACT|REPLICAT}
STATUS {EXTRACT|REPLICAT}
LAG {EXTRACT|REPLICAT}
INFO RMTTRAIL
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
更多的命令參考<
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10248702/viewspace-624577/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux 學習筆記--程式管理Linux筆記
- Spring Boot 學習筆記(4):配置properties(1)Spring Boot筆記
- Spring Boot 學習筆記(4):配置properties(2)Spring Boot筆記
- Ansible學習筆記——基礎與配置筆記
- Redis安裝與配置(學習筆記一)Redis筆記
- 區塊鏈學習筆記與思考-4區塊鏈筆記
- Docker 與 K8S學習筆記(十九)—— Pod的配置管理DockerK8S筆記
- swift學習筆記《4》Swift筆記
- python學習筆記4Python筆記
- Java學習筆記4Java筆記
- vue學習筆記4Vue筆記
- Nginx 學習筆記--程式與模組Nginx筆記
- Neo4j/cypher學習筆記與學習建議筆記
- 磁碟管理--學習筆記筆記
- 微信小程式開發學習筆記[4]微信小程式筆記
- xv6學習筆記(4) : 程式排程筆記
- Swoft 學習筆記之配置筆記
- Elasticsearch的配置學習筆記Elasticsearch筆記
- Nginx 學習筆記--程式與模組(二)Nginx筆記
- VisionPro學習筆記(4)——PatInspect筆記
- Webpack4學習筆記Web筆記
- p4 學習筆記筆記
- docker學習筆記(4)- 應用資料管理(容器外)Docker筆記
- NginxPHP配置與優化(學習筆記二十二)NginxPHP優化筆記
- Web 開發學習筆記(4) — 重定向與HSTSWeb筆記
- Webpack4 學習筆記六 多頁面配置和devtoolWeb筆記dev
- Linux 學習筆記--程式Linux筆記
- webpack學習筆記七:配置babelWeb筆記Babel
- python爬蟲—學習筆記-4Python爬蟲筆記
- Python-BeautifulSoup4 學習筆記Python筆記
- G01學習筆記-4筆記
- QT學習筆記4(動畫)QT筆記動畫
- Vue學習筆記(十一):路由管理Vue筆記路由
- Golang學習筆記(1):包管理Golang筆記
- 男士形象管理-學習筆記筆記
- 強化學習-學習筆記4 | Actor-Critic強化學習筆記
- 逆向與安全學習筆記筆記
- 【學習筆記】mvc與mvvm筆記MVCMVVM
- Python學習筆記—程式碼Python筆記