有用的Goldengate命令-SHELL, OBEY, HELP, HISTORY,VERSIONS
2012-03-06 20:35
225 查看
http://hi.baidu.com/myitil/blog/item/e5bff986a41db92467096ef8.html
2011-08-04 21:00
2011-08-04 21:00
There are a number of other useful GoldenGate commands which we can run from the GGSCI interface. The GoldenGate Reference Guide has information in more detail, but I have tried out a few and found some to be very useful which I am highlighting below. HISTORY: To view a list of the most recently issued GGSCI commands since the GGSCI session started GGSCI (linux01.oncalldba.com) 4> history GGSCI Command History 1: show all 2: info all 3: start extract ext3 4: history ! : Use the ! command to execute a previous GGSCI command without modifications. GGSCI (linux01.oncalldba.com) 3> info extract ext3 EXTRACT EXT3 Last Started 2010-07-21 14:29 Status RUNNING Checkpoint Lag 01:07:22 (updated 00:00:02 ago) Log Read Checkpoint Oracle Redo Logs 2010-07-21 13:22:28 Seqno 188, RBA 49576960 GGSCI (linux01.oncalldba.com) 4> ! info extract ext3 EXTRACT EXT3 Last Started 2010-07-21 14:29 Status RUNNING Checkpoint Lag 01:07:22 (updated 00:00:04 ago) Log Read Checkpoint Oracle Redo Logs 2010-07-21 13:22:28 Seqno 188, RBA 49576960 We can also use a combination of “!” and HISTORY to run a particular command listed in the history. For example, to run the command 3 listed in the history, we can just run “! 3″. VERSIONS: to display operating system and database version information. Use DBLOGIN to connect to the database first GGSCI (linux01.oncalldba.com) 11> dblogin userid ggs_owner, password ggs_owner Successfully logged into database. GGSCI (linux01.oncalldba.com) 12> versions Operating System: Linux Version #1 SMP Mon Mar 29 20:19:03 EDT 2010, Release 2.6.18-194.el5PAE Node: linux01.oncalldba.com Machine: i686 Database: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production PL/SQL Release 11.1.0.6.0 – Production CORE 11.1.0.6.0 Production TNS for Linux: Version 11.1.0.6.0 – Production NLSRTL Version 11.1.0.6.0 – Production SHELL: to execute shell commands from within the GGSCI interface. GGSCI (linux01.oncalldba.com) 13> shell ls -l /home/oracle/goldengate/dirdat/ total 50588 -rw-rw-rw- 1 oracle oinstall 985 Jul 16 14:57 lt000000 -rw-rw-rw- 1 oracle oinstall 9999629 Jul 19 13:09 lt000001 HELP: to obtain information about a GoldenGate command. The basic command returns a list of command categories and the associated commands GGSCI (linux01.oncalldba.com) 15> help GGSCI Command Summary SUBDIRS CREATE SUBDIRS ER INFO ER, KILL ER, LAG ER, SEND ER, STATUS ER, START ER, STATS ER, STOP ER EXTRACT ADD, ALTER, CLEANUP, DELETE, INFO, KILL, LAG, SEND, START, STATS, STATUS, STOP EXTTRAIL ADD, ALTER, DELETE, INFOGGSEVT VIEW MANAGER INFO, REFRESH, SEND, START, STOP, STATUSMARKER INFO PARAMS EDIT, VIEW REPLICAT ADD, ALTER, CLEANUP, DELETE, INFO, KILL, LAG, SEND, START, STATS, STATUS, STOPREPORT VIEW RMTTRAIL ADD, ALTER, DELETE, INFOTRACETABLE ADD, DELETE, INFO TRANDATA ADD, DELETE, INFODatabase DBLOGIN, LIST TABLES, ENCRYPT PASSWORDDDL DUMPDDL CHECKPOINTTABLE ADD CHECKPOINTTABLE, DELETE CHECKPOINTTABLE, CLEANUP CHECKPOINTTABLE, INFO CHECKPOINTTABLE Miscellaneous FC, HELP, HISTORY, INFO ALL, INFO MARKER, OBEY, SET, SHELL, SHOW, VERSIONS, ! For help on a specific command, type HELP [command] [object] Example: HELP ADD REPLICAT OBEY: to process a file that contains a list of GoldenGate commands. OBEY is useful for executing commands that are frequently used in sequence. Suppose we want to run some Goldengate commands and execute those from a Unix shell script which can be called via say cron. So we have a start_goldgate.sh shell script which will use the GGSCI command OBEY to call a text file which has the Goldengate commands which we would like to run in sequence. [oracle@linux01 goldengate]$ cat start_goldgate.sh cd /home/oracle/goldengate ./ggsci < EOF OBEY /home/oracle/goldengate/startup.txt EOF [oracle@linux01 goldengate]$ cat startup.txt START MANAGER START EXTRACT EXT3 START EXTRACT DPUMP INFO ALL [oracle@linux01 goldengate]$ ./start_goldgate.sh Oracle GoldenGate Command Interpreter for Oracle Version 10.4.0.19 Build 002 Linux, x86, 32bit (optimized), Oracle 11 on Sep 29 2009 08:50:50 Copyright (C) 1995, 2009, Oracle and/or its affiliates. All rights reserved. GGSCI (linux01.oncalldba.com) 1> GGSCI (linux01.oncalldba.com) 2> START MANAGERManager started. GGSCI (linux01.oncalldba.com) 3> START EXTRACT EXT3 EXTRACT EXT3 is already running. GGSCI (linux01.oncalldba.com) 4> START EXTRACT DPUMP EXTRACT DPUMP is already running.GGSCI (linux01.oncalldba.com) 5> INFO ALL Program Status Group Lag Time Since Chkpt MANAGER RUNNINGEXTRACT RUNNING DPUMP 00:00:00 00:00:01 EXTRACT ABENDED EXT2 00:00:00 172:36:58 EXTRACT RUNNING EXT3 00:00:00 00:00:04 |
相关文章推荐
- 有用的shell命令集锦
- 拿到一个linux下的shell之后,有用的命令整理
- 关于shell的几个不为人知却十分有用的命令分享
- 关于shell的几个不为人知却十分有用的命令分享
- 有用的shell命令
- 2则巧用history和shell搭配的命令
- SHELL有用的命令
- shell技巧——快速查找命令history的hh命令
- 【一天一个shell命令】好管家-历史信息-history
- 一个有用函数:python调用shell命令
- 【Shell】一些比较有用、常用的shell命令
- Linux History安全问题【保存记录防止删除】+完善Linux/UNIX审计 将每个shell命令记入日志
- Shell输入命令时一些有用的快捷键
- 【一天一个shell命令】好管家-历史信息-history
- Linux 常用命令1 pwd、ls、cd、tab、清屏、重定向、转义、管道、touch、mkdir、tree、cat、more、rmdir、rm、grep、help、man、history、find
- 【Shell常用命令一】echo bash alias history 输出重定向 快捷键
- 【Bash百宝箱】shell历史命令(history)
- centos shell基础 alias 变量单引号 双引号 history 错误重定向 2>&1 jobs 环境变量 .bash_history source配置文件 nohup & 后台运行 cut,sort,wc ,uniq ,tee ,tr ,split, paste cat> 2.txt <<EOF 通配符 glob模式 发邮件命令mail 2015-4-8 第十二节课
- 让history命令可以记录所有shell命令的执行时间
- 几个非常有用的shell命令