`
longgangbai
  • 浏览: 7339563 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Oracle goldgate常用命令

 
阅读更多

    公司使用Oracle 的goldgate已经半年了,总结一下goldgate的常用命令的如下:

 

1.查看帮助

 help, help add exttrail

2.显示当前的GoldenGate环境信息

 show

3.查看运行状态

  info all, info mgr, info extract einikk

 

4.启动和停止服务

  start mgr,stop mgr

  start extract einikk,stop extract einikk

  start replicat rinikk,stop replicat rinikk

   如果不能停止的话,

   killi extract einikk

5.历史命令

  history

6.使用OBEY(自动运行一个文件)

  1. Create and save a text file that contains the commands, one command per line. This is
your OBEY file. Name it what you want.
2. In GGSCI, call the OBEY file by using the following syntax.
OBEY <file name>


gdora@testdb11 ggs]$ cat /home/gdora/ggs/yzhq.txt
status manager
status mgr
[gdora@testdb11 ggs]$


GGSCI (testdb11.zhyhl.com) 1> obey yzhq.txt

GGSCI (testdb11.zhyhl.com) 2> status manager


Manager is running (IP port testdb11.zhyhl.com.7809).


GGSCI (testdb11.zhyhl.com) 3> status mgr


Manager is running (IP port testdb11.zhyhl.com.7809).


GGSCI (testdb11.zhyhl.com) 4>

  7.使用shell脚本
   Using UNIX batch and shell scripts
On a UNIX system, you can issue GoldenGate commands from a script such as a startup
script, shutdown script, or failover script by running GGSCI and calling an input file. Use
the following syntax:

ggsci < <input_file>


[gdora@testdb11 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 (testdb11.zhyhl.com) 1>
Manager is running (IP port testdb11.zhyhl.com.7809).


GGSCI (testdb11.zhyhl.com) 2>
Manager is running (IP port testdb11.zhyhl.com.7809).


GGSCI (testdb11.zhyhl.com) 3> [gdora@testdb11 ggs]$
[gdora@testdb11 ggs]$

8.修改参数文件

  edit params <group name>

9.参数文件存放的目录

  Storing parameter files<完整路径>

10.参数的使用规则和注释

   ---注释

11.参数文件内的语法

   <PARAMETER> <argument> [, <option>] [&]
 

12.查看参数文件的内容

  view params mgr

13.查看报告

  view report einikk

14.查看操作的统计信息

  STATS {EXTRACT | REPLICAT} <group>

  stats er*

15.info er*

 

16.查看GoldenGate的错误日志内容

  VIEW GGSEVT Contents

17. Deleting a process group

  delete einikk

 

 

<TBSDB1>$./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.0.19 Build 002
HP/UX, IA64, 64bit (optimized), Oracle 11 on Jan 20 2011 14:57:29

Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved.



GGSCI (TBSDB1) 1> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                           
EXTRACT     STOPPED	DPTBS       00:00:00      913:41:40   
EXTRACT     STOPPED        EXTTBS      00:00:00      913:41:40   


GGSCI (TBSDB1) 2> MGR start
ERROR: Invalid command.

GGSCI (TBSDB1) 3> start mgr
MGR is already running.


GGSCI (TBSDB1) 4> start dptbs

Sending START request to MANAGER ...
EXTRACT DPTBS starting


GGSCI (TBSDB1) 5> start exttbs

Sending START request to MANAGER ...
EXTRACT EXTTBS starting


GGSCI (TBSDB1) 6> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                           
EXTRACT     RUNNING     DPTBS       00:00:00      913:42:13   
EXTRACT     RUNNING     EXTTBS      00:00:00      913:42:11   

GGSCI (TBSDB1) 8> 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, SEND, START, STATS, STATUS, STOP
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
CHECKPOINTTABLE  ADD, DELETE, CLEANUP, INFO

Commands without an object:
(Database)       DBLOGIN, LIST TABLES, ENCRYPT PASSWORD
(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 <command> <object>.

Example: HELP ADD REPLICAT

GGSCI (TBSDB1) 14> HISTORY

GGSCI Command History

    5: start exttbs
    6: info all
    7: HLEP
    8: HELP
    9: status
   10: REPORT VIEW
   11: VIEW REPORT
   12: VIEW REPORT
   13: VIEW REPORT DBTBS
   14: HISTORY


GGSCI (TBSDB1) 2> HELP VIEW REPORT


VIEW REPORT

Use VIEW REPORT to view the process report that is generated by Extract
or Replicat. The report lists process parameters, run statistics, error
messages, and other diagnostic information.

The command displays only the current report. Reports are aged whenever
a process starts. Old reports are appended with a sequence number, for
example finance0.rpt, finance1.rpt, and so forth. To view old reports,
use the [<n>] option. 

Syntax:

VIEW REPORT {<group name>[<n>] | <file name>}


<group name>

The name of the group. The command assumes the report file named
<group>.rpt in the Oracle GoldenGate dirrpt sub-directory.


<n>

The number of an old report. Report files are numbered from 0 (the most
recent) to 9 (the oldest).


<file name>

A fully qualified file name, such as c:\ggs\dirrpt\orders.rpt.


Example 1:

The following displays an old report file (number 3) for the orders
group.

VIEW REPORT orders3


Example 2:

The following displays a specific report identified by file name.

VIEW REPORT c:\ggs\dirrpt\orders.rpt


GGSCI (TBSDB1) 3> VIEW REPORT /gdata/dirrpt/DPTBS.rpt


***********************************************************************
                 Oracle GoldenGate Capture for Oracle
                     Version 11.1.1.0.19 Build 002
   HP/UX, IA64, 64bit (optimized), Oracle 11 on Jan 20 2011 15:18:44
 
Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved.


                    Starting at 2011-10-28 17:12:59
***********************************************************************

Operating System Version:
HP-UX
Version U, Release B.11.31
Node: TBSDB1
Machine: ia64
                         soft limit   hard limit
Address Space Size   :    unlimited    unlimited
Heap Size            :   4294967296   4294967296
File Size            :    unlimited    unlimited
CPU Time             :    unlimited    unlimited

Process id: 25674

Description: 

***********************************************************************
**            Running with the following parameters                  **
***********************************************************************
EXTRACT dptbs
RMTHOST 198.120.1.19, MGRPORT 7839, compress
PASSTHRU
numfiles 5000
RMTTRAIL ./dirdat/rt
DYNAMICRESOLUTION

TABLE TBS.BA10_DAY_BALANCE_INFO;
TABLE TBS.BP10_ETICKET_PLAN;
TABLE TBS.BP10_RECEIPT_PLAN;
TABLE TBS.BP10_WINDOW_ETICKET;


CACHEMGR virtual memory values (may have been adjusted)
CACHEBUFFERSIZE:                         64K
CACHESIZE:                                8G
CACHEBUFFERSIZE (soft max):               4M
CACHEPAGEOUTSIZE (normal):                4M
PROCESS VM AVAIL FROM OS (min):          16G
CACHESIZEMAX (strict force to disk):  13.99G

2011-10-28 17:13:05  INFO    OGG-01226  Socket buffer size set to 27985 (flush size 27985).

Source Context :
  SourceModule            : [er.recovery]
  SourceID                : [/mnt/ecloud/workspace/Build_OpenSys_r11.1.1.0.19_002_[44502]/perforce/src/app/er/recovery.c]
  SourceFunction          : [RECOVERY_initialize]
  SourceLine              : [1712]

GGSCI (TBSDB1) 5> VIEW GGSEVT

2011-06-08 21:23:05  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): edit mgr.
2011-06-08 21:23:12  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): edit param
 mgr.
2011-06-08 21:38:20  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): edit param
 mgr.
2011-06-08 22:30:50  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): start mgr.
2011-06-08 22:30:50  WARNING OGG-00959  Oracle GoldenGate Manager for Oracle, mgr.prm:  PURGEOLDEXTRACTS ./dirdat/*,usecheckp
oints, minkeepdays 1 (MINKEEPFILES option not used.).
2011-06-08 22:30:50  INFO    OGG-00983  Oracle GoldenGate Manager for Oracle, mgr.prm:  Manager started (port 7839).
2011-06-08 22:31:28  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): ADD EXTRAC
T exttbs  tranlog, begin now.
2011-06-08 22:31:37  INFO    OGG-00987  Oracle GoldenGate Command Interpreter for Oracle:  GGSCI command (oracle): ADD EXTTRA
IL ./dirdat/pt  EXTRACT exttbs,megabytes 500.

GGSCI (TBSDB1) 13> show

Parameter settings:

SET SUBDIRS    ON
SET DEBUG      OFF

Current directory: /gdata

Using subdirectories for all process files

Editor:  vi

Reports (.rpt)                 /gdata/dirrpt
Parameters (.prm)              /gdata/dirprm
Stdout (.out)                  /gdata/dirout
Replicat Checkpoints (.cpr)    /gdata/dirchk
Extract Checkpoints (.cpe)     /gdata/dirchk
Process Status (.pcs)          /gdata/dirpcs
SQL Scripts (.sql)             /gdata/dirsql
Database Definitions (.def)    /gdata/dirdef


GGSCI (TBSDB1) 14> versions
Operating System:
HP-UX
Version U, Release B.11.31
Node: TBSDB1
Machine: ia64

Database:
ERROR: Not logged into database, use DBLOGIN.

GGSCI (TBSDB1) 23> stop dptbs
EXTRACT DPTBS is already stopped.


GGSCI (TBSDB1) 24> stop mgr
Manager process is required by other GGS processes.
Are you sure you want to stop it (y/n)? y

Sending STOP request to MANAGER ...
Request processed.
Manager stopped.


GGSCI (TBSDB1) 25> quit

 

分享到:
评论

相关推荐

    ORACLE DBA 常用命令

    ORACLE DBA 常用命令

    Oracle DBA常用命令总结

    Oracle DBA常用命令总结 , 包含 复杂权限控制等等

    oracle dba常用命令

    dba常用命令…………………………………………………………

    natstat,oracle常用命令常用命令

    natstat,oracle常用命令常用命令natstat,oracle常用命令常用命令natstat,oracle常用命令常用命令natstat,oracle常用命令常用命令natstat,oracle常用命令常用命令

    oracle 常用命令大全

    oracle 常用命令大全 oracle dba 常用命令 1 运行 SQLPLUS 工具 sqlplus 2 以 OS 的默认身份连接 / as sysdba 3 显示当前用户名 show user 4 直接进入 SQLPLUS 命令提示符 sqlplus /nolog 5 在命令提示符以 OS 身份...

    Oracle日常运维常用命令速查手册

    Oracle 日常运维常用命令速查手册 Oracle 是一款功能强大且广泛应用的关系数据库管理系统,作为Oracle运维人员,熟悉常用的命令和语句是非常必要的。本文档汇总了 Oracle 日常运维中常用的命令和语句,包括登录 ...

    Oracle DBA常用运维命令大全

    ### Oracle DBA常用运维命令详解 #### 一、SQLPLUS工具使用 **1. 运行SQLPLUS工具** - **命令**: `sqlplus` - **描述**: SQL*Plus 是 Oracle 提供的一个强大的命令行工具,用于执行 SQL 命令、脚本文件等。 - **...

    个人总结oracle 9i常用命令(txt)

    - 执行`startup`命令来启动Oracle实例。 2. **关闭Oracle系统** - 同上,进入Oracle用户和SVRMGRL环境。 - 使用`shutdown`命令关闭Oracle实例。 3. **作为Root用户启动或关闭Oracle系统** - 通过`su - root`...

    oracle常用cmd命令

    Oracle 常用 CMD 命令 Oracle 是一种关系数据库管理系统,提供了强大的数据存储和管理功能。但是,对于新手来说,熟悉 Oracle 的 CMD 命令是非常必要的。下面我们将详细介绍 Oracle 常用的 CMD 命令,帮助新手快速...

    oracle维护常用命令

    oracle维护常用命令

    oracle oradebug常用命令

    oracle oradebug常用命令

    初学者必备oracle 1000个常用命令_oracle 命令大全_oracle命令集合

    oracle 常用命令_oracle 命令大全_oracle命令集合_oracle基本命令 非常方便,带查询功能,能很方便的查询你要找的oracle命令写法

    ORACLE数据库常用命令

    ORACLE数据库常用命令 ORACLE数据库是目前最流行的关系数据库管理系统之一,广泛应用于各种行业和领域。本文总结了ORACLE数据库的常用命令,包括内核参数的设置、用户管理、安装工具的准备、数据库的启动和关闭等...

    Oracle经典常用命令

    Oracle数据库是全球广泛使用的...这些命令行操作是Oracle数据库管理员日常工作中最常用的,熟练掌握它们能有效提高工作效率。在实际操作中,还需根据具体环境和需求进行调整。详细信息可参考Oracle官方文档或相关教程。

    oracle常用命令文档

    ### Oracle 常用命令与操作指南 #### 一、Oracle 安装与卸载注意事项 **1.1 Oracle 的安装** - **安装步骤:** 对于 Oracle 的安装,网络上有很多详细的指导教程。在安装过程中,需要注意的是,管理口令部分确保...

    linux和Oracle常用命令linux环境配置ORACLE常用命令

    linux,linux和Oracle常用命令linux环境配置ORACLE常用命令

    ORACLE常用命令举例

    ORACLE常用命令举例 ORACLE常用命令举例 ORACLE常用命令举例 ORACLE常用命令举例 ORACLE常用命令举例

    ORACLE 12c RAC的常用管理命令

    了解并掌握RAC的常用管理命令对于DBA来说至关重要,这有助于确保系统的稳定运行和高效管理。下面将详细介绍一些关键的Oracle 12c RAC管理命令。 1. **crsctl**: Oracle Clusterware 的控制工具,用于管理集群资源和...

Global site tag (gtag.js) - Google Analytics