ITPub博客

首页 > 数据库 > Oracle > goldengate常用命令使用说明

goldengate常用命令使用说明

Oracle 作者:luckyfriends 时间:2017-09-08 22:00:38 0 删除 编辑

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(自动运行一个文件)

testdb@mytest 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 http://support.goldengate.com.

 

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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-06-06

  • 博文量
    463
  • 访问量
    3143614