GGSCI (P550) 4> help
GGSCI Command Summary:
Object: Command:
SUBDIRS CREATE
ER INFO, KILL, LAG, SEND, STATUS, START, STATS, STOP
EXTRACT ADD, ALTER, CLEANUP, DELETE, INFO, KILL,
LAG, REGISTER, SEND, START, STATS, STATUS, STOP
UNREGISTER
EXTTRAIL ADD, ALTER, DELETE, INFO
GGSEVT VIEW
MANAGER INFO, SEND, START, STOP, STATUS
MARKER INFO
PARAMS EDIT, VIEW
REPLICAT ADD, ALTER, CLEANUP, DELETE, INFO, KILL, LAG, SEND,
START, STATS, STATUS, STOP
REPORT VIEW
RMTTRAIL ADD, ALTER, DELETE, INFO
TRACETABLE ADD, DELETE, INFO
TRANDATA ADD, DELETE, INFO
SCHEMATRANDATA ADD, DELETE, INFO
CHECKPOINTTABLE ADD, DELETE, CLEANUP, INFO
Commands without an object:
(Database) DBLOGIN, LIST TABLES, ENCRYPT PASSWORD, FLUSH SEQUENCE
(DDL) DUMPDDL
(Miscellaneous) FC, HELP, HISTORY, INFO ALL, OBEY, SET EDITOR, SHELL,
SHOW, VERSIONS, ! (note: you must type the word
COMMAND after the ! to display the ! help topic.)
i.e.: GGSCI (sys1)> help ! command
For help on a specific command, type HELP
Example: HELP ADD REPLICAT
GGSCI (P550) 8> help view ggsevt
VIEW GGSEVT
Use VIEW GGSEVT to view the Oracle GoldenGate error log (ggserr.log
file). This file contains information about Oracle GoldenGate events,
such as process startup, shutdown, and exception conditions. This
information is recorded in the system error log, too, but viewing
the Oracle GoldenGate error log sometimes is more convenient and may
retain events further back in time.
The display can be lengthy. To exit the display before reaching the
end, use the operating system s standard methods for terminating screen
output.
Syntax:
VIEW GGSEVT
GGSCI> send extract xxx, showtrans [thread n] [count n]
其中,thread n是可选的,表示只查看其中一个节点上的未提交交易;count n也是可选的,表示只显示n条记录。
例如查看xxx进程中节点1上最长的10个交易,可以通过下列命令:
GGSCI> send extract extsz , showtrans thread 1 count 10
记录XID,通过DBA查找具体的长交易执行的内容:
GGSCI>SEND EXTRACT xxx, SKIPTRANS <82.4.242063> THREAD <2> //跳过交易
GGSCI>SEND EXTRACT xxx, FORCETRANS <82.4.242063> THREAD <1> //强制认为该交易已经提交
使用这些命令只会让GoldenGate进程跳过或者认为该交易已经提交,但并不改变数据库中的交易,它们依旧存在于数据库中。
因此,强烈建议使用数据库中提交或者回滚交易而不是使用GoldenGate处理。
info extract extXX,showch
排除不复制的表:
TABLEEXCLUDE schema.table_name
进程无法停止
通常情况是在处理大交易,尤其在有超过2小时以上的大交易,建议等待进程处理完毕。
处理方法:如果必须停止进程,可以强制杀死进程。
send xxx forcestop
CLOB处理
如果包含CLOB字段,在Extract参数文件中必须添加:
TRANLOGOPTIONS CONVERTUCS2CLOBS
lag exta
stats exta,total
stats exta,table xxx.xxxx
logdump常用的命令如下:
Usertoken 用来显示trail文件的一些标记信息。
Ggstoken 显示GoldenGate的一些标记信息。
Headertoken 显示头部的标记信息。
ghdr on 用来打开记录的头部信息。
pos first|last| for| rev 其中pos for|rev 比较重要,用于指定在trail文件中读的方向(向上|向下)。
count detail 会显示当前trail文件总的记录数量
Logdump 1 >open ./dirdat/p1000556
Current LogTrail is ./dirdat/p1000556
Logdump 2 >ghdr on
Logdump 3 >detail on
Logdump 4 >detail data
Logdump 5 >usertoken on
Logdump 6 >pos 59193235
上面INFO命令看到的RBA号码
Logdump 7 >n
PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints, minkeepdays 1
PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints,minkeephours 1