goldengate常用命令
原文:http://www.traveldba.com/archives/777
extract
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
1、修改rba,checkpoint
alter EXT_ALO,extseqno 17,extrba 9194144,thread 1
alter EXT_ALO,extseqno 10,extrba 5740032,thread 2
2、修改recovery checkpoint
alter EXT_ALO,ioextseqno 17,ioextrba 9193488,thread 1
alter EXT_ALO,ioextseqno 10,ioextrba 5739536,thread 2
3、info extract cust_ext, detail --抽取进程的详细信息
4、info extract ext*, showch --抽取进程的检查点信息,注意checkpoint和recovery checkpoint
5、INFO TRANDATA user_name.table_names --表的补充日志
6、常用添加extract命令
ggsci> add extract ext1, tranlog, begin now
ggsci> add extract ext1, tranlog, begin now, threads 4
ggsci> add extract ext1, tranlog, begin now, passive
ggsci> add extract ext1, extseqno 111, begin now
ggsci> add extract ext1, extrba 567890, begin 2012-02-02 12:00:00
ggsci> add extract ext1, sourceistable
ggsci> add extract ext1, exttrailsource /oracle/gg11/dirdat/hr --data pump
ggsci> add extract ext1, vam -- VAM - Vendor Access Module
ggsci> add extract ext1, vamtrailsource /ogg/dirdat/vt
ggsci> add extract ext1, rmthost host123, mgrport 7810, rmtname fin
6、status
ggsci> STATUS MANAGER -- To determine whether or not the Manager process is running
ggsci> STATUS EXTRACT group_name [, TASKS | ALLPROCESSES] -- To determine whether or not Extract is running
ggsci> status extract extr_hr
ggsci> status extract ext*, tasks
ggsci> status extract *ext*, allprocesses
ggsci> STATUS REPLICAT group_name [, TASKS | ALLPROCESSES] -- To determine whether or not Replicat is running
ggsci> status replicat emp_rep
ggsci> status replicat cust_rep, allprocesses
ggsci> STATUS ER group_wildcard_specification -- To check the status of multiple Extract and Replicat groups as a unit
ggsci> status er *EX*
7、stats
Reading Program Database management system Vacuum Pump The Word Find email address free
ggsci> STATS EXTRACT group_name [, statistic] [, TABLE table] [, TOTALSONLY table_specification] [, REPORTFETCH | NOREPORTFETCH] [, REPORTRATE HR|MIN|SEC] [, ... ] -- To display statistics for one or more Extract group
ggsci> stats ext_hr
ggsci> stats extract ext
ggsci> stats extract ext2 reportrate sec
ggsci> stats extract fin, total, daily
ggsci> stats extract fin, total, hourly, table acct, reportrate min, reset, reportfetch
8、send
ggsci> SEND MANAGER [CHILDSTATUS [DEBUG]] [GETPORTINFO [DETAIL]] [GETPURGEOLDEXTRACTS] -- To retrieve the status of the active Manager process or to retrieve dynamic port information as configured in the Manager parameter file
ggsci> send manager childstatus
ggsci> send manager childstatus debug
ggsci> send manager getportinfo
ggsci> send manager getportinfo detail
ggsci> send manager getpurgeoldextracts
ggsci> SEND EXTRACT group_name,
{ CACHEMGR {CACHESTATS | CACHEQUEUES | CACHEPOOL} | FORCESTOP | FORCETRANS id [THREAD n] [FORCE] | GETLAG | GETTCPSTATS | LOGEND | REPORT | ROLLOVER | SHOWTRANS [id] [THREAD n] [COUNT n] [DURATION duration_unit] [TABULAR] [FILE file_name [DETAIL]] | SKIPTRANS id [THREAD n] [FORCE] | STATUS | STOP | TLTRACE {DEBUG | OFF | level} [SIZELIMIT size] [DDLINCLUDE | DDL[ONLY]] [FILE] file_name | TRACE[2] {tracefile | OFF} | TRACEINIT | TRANLOGOPTIONS {PURGEORPHANEDTRANSACTIONS | NOPURGEORPHANEDTRANSACTIONS} | TRANLOGOPTIONS TRANSCLEANUPFREQUENCY minutes | VAMMESSAGE "Teradata_command" | VAMMESSAGE {ARSTATS | INCLUDELIST [filter] | EXCLUDELIST [filter]} | VAMMESSAGE OPENTRANS
} -- To communicate with a running Extract process
Teradata_command = {"control:terminate" | "control:suspend" | "control:resume" | "control:copy database.table"
ggsci> send extract exthr status
ggsci> send extract extr, getlag
ggsci> send extract group_name tltrace file file_name ddlinclude
ggsci> send extract fin, rollover
ggsci> send extract fin stop
ggsci> send extract fin, vammessage control:suspend
ggsci> send extract fin, tranlogoptions transcleanupfrequency 15
ggsci> send extract fin, showtrans count 10
ggsci> send extract fin, skiptrans 5.17.27634 thread 2
9、alter
ggsci> ALTER EXTRACT group_name [, ADD_EXTRACT_attribute] [, THREAD number] [, ETROLLOVER] -- To change the attributes of an Extract group, To increment a trail to the next file in the sequence
ggsci> alter extract fin, begin 2012-02-16
ggsci> alter extract fin, etrollover
ggsci> alter extract fin, extseqno 26, extrba 338
ggsci> alter extract accounts, thread 4, begin 2012-03-09
ggsci> alter extract sales, lsn 1234:123:1
10、lag
ggsci> LAG EXTRACT group_name -- To determine a true lag time between Extract and the datasource
ggsci> lag extract ext*
ggsci> lag extract *
|
replicat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
1、send rep2, NOHANDLECOLLISIONS --send 命令动态取消HANDLECOLLISIONS
2、info replicat fin, showch --复制进程的检查点信息
3、info replicat emp_rep, detail --复制进程的相应信息
4、info checkpointtable gg_owner.chkpt_table --检查点表信息
5、常用添加replicat进程命令
ggsci> add replicat repl, exttrail C:\OGG10G\dirdat\lt
ggsci> add replicat repl, exttrail /oracle/gg11/dirdat/lt, checkpointtable gg_owner.checkpoint
ggsci> add replicat initload, specialrun
ggsci> add replicat repl, exttrail /oracle/gg11/dirdat/lt, nodbcheckpoint
6、stats
ggsci> STATS REPLICAT group_name [, statistic] [, TABLE table] [, TOTALSONLY table_specification] [, REPORTDETAIL | NOREPORTDETAIL] [, REPORTRATE HR|MIN|SEC] [, ... ] -- To display statistics for one or more Replicat groups
ggsci> stats rep_hr
ggsci> stats replicat fin, total, table acct, reportrate hr, reset, noreportdetail
ggsci> STATS ER group_wildcard_specification -- To get statistics on multiple Extract and Replicat groups as a unit
ggsci> stats er ext*
7、send
ggsci> SEND REPLICAT group_name,
{ FORCESTOP | GETLAG | HANDLECOLLISIONS [table_specification] | NOHANDLECOLLISIONS [table_specification] | REPORT [HANDLECOLLISIONS [table_specification]] | STATUS | STOP | TRACE[2] [DDLINCLUDE | DDL[ONLY]] [FILE] file_name | TRACE[2] OFF | TRACEINIT
} -- To communicate with a starting or running Replicat process
ggsci> send replicat fin, handlecollisions
ggsci> send replicat fin, report handlecollisions fin_*
ggsci> send replicat fin, getlag
ggsci> SEND ER group_wildcard_specification -- To send instructions to multiple Extract and Replicat groups as a unit
ggsci> send er *ext
8、lag
ggsci> LAG REPLICAT group_name -- To determine a true lag time between Replicat and the trail
ggsci> lag replicat myrepl
ggsci> lag replicat *
|
trail