goldengate常用命令使用說明

luckyfriends發表於2017-09-08

1.檢視幫助
help, help add exttrail

2.顯示當前的GoldenGate環境資訊
show

3.檢視執行狀態
info all, info mgr, info extract emytest

GGSCI (center) 6> info rchuc, showch

REPLICAT   RCHUC     Last Started 2013-12-06 15:13   Status ABENDED
Checkpoint Lag       00:00:00 (updated 442:29:13 ago)
Log Read Checkpoint  File /u01/app/ggate/dirdat/zsap_chuc/re000011
                     First Record  RBA 2605820


Current Checkpoint Detail:

Read Checkpoint #1

  GGS Log Trail

這樣,會顯示很多資訊出來,就不再貼出來
 
 
4.啟動和停止服務
start mgr,stop mgr
start extract emytest,stop extract emytest
start replicat rmytest,stop replicat rmytest
如果不能停止的話,
kill extract emytest

5.歷史命令
history

6.使用OBEY(自動執行一個檔案)

ggs]$ cat /home/testdb/ggs/yzhq.txt
status manager
status mgr
[testdb@mytest ggs]$


GGSCI (mytest.mugua) 1> obey yzhq.txt

GGSCI (mytest.mugua) 2> status manager


Manager is running (IP port mytest.mugua.7809).


GGSCI (mytest.mugua) 3> status mgr


Manager is running (IP port mytest.mugua.7809).


GGSCI (mytest.mugua) 4>

7.使用shell指令碼

ggsci < <input_file>


[testdb@mytest ggs]$ ggsci < yzhq.txt

GoldenGate Command Interpreter for Oracle
Version 10.4.0.12 Build 001
Linux, x86, 32bit (optimized), Oracle 10 on Aug 21 2009 14:34:04

Copyright (C) GoldenGate Software, Inc. 1995-2009.
The GoldenGate software may include other code written by third parties;
details regarding such third party code, including applicable copyright,
legal and licensing notices are available at .

 

GGSCI (mytest.mugua) 1>
Manager is running (IP port mytest.mugua.7809).


GGSCI (mytest.mugua) 2>
Manager is running (IP port mytest.mugua.7809).


GGSCI (mytest.mugua) 3>

[testdb@mytest ggs]$

8.修改引數檔案
edit params <group name>

9.引數檔案存放的目錄
Storing parameter files<完整路徑>

10.引數檔案內的語法
<PARAMETER> <argument> [, <option>] [&]
 
11.檢視命令
view params mgr           --檢視引數
view report emytest       --檢視程式報告

12.檢視操作的統計資訊
STATS {EXTRACT | REPLICAT} <group>
stats er*
 
13.檢視GoldenGate的錯誤日誌內容
  VIEW GGSEVT Contents

14. Deleting a process group
delete emytest

15.send命令

send extract emugua1, showtrans
send extract emugua1, status
SEND EXTRACT 程式名, SKIPTRANS <5.17.27634>
跳過事務
SEND EXTRACT 程式名, FORCETRANS <5.17.27634>
認為該事務已經提交
send 程式名 forcestop
強制殺掉


16. alert 相關命令

--設定翻滾
alter extract EMUGUA1 etrollover

--設定抓取程式開始位置
alter EMUGUA1 extseqno 11,extrba 0

--設定投遞程式開始位置
alter PMUGUA1 extseqno 11,extrba 0

--設定開始時間點
ALTER EXTRACT EMUGUA1, TRANLOG, BEGIN 2012-09-14 13:30

--設定複製程式開始位置
alter REPLICAT RMUGUA1 extseqno 10, extrba 0

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14710393/viewspace-2144720/,如需轉載,請註明出處,否則將追究法律責任。

相關文章