oracle redo日志查看ogg读取的redo是什么状态

trackbacks-0
Created By BaoXinjian
对GoldenGate实例进行监控,可以公国简单高效的方式GGSCI命令进行监控,并查看返回的信息,判断GoldenGate运行情况是否正常
1. 使用GGSCI命令监控
2. 通过ggserr.log日志监控
3. 通过进入report目录文件监控
4. 日常运维监控自动化脚本
&二、使用GGSCI命令监控
1. info all
(1). 作用:查看整体的运行情况
GGSCI () 5& info all
Lag at Chkpt
Time Since Chkpt
2. view params process
(1). 作用:查看进程的参数设置
GGSCI () 6& view params EXT1
extract ext1
userid ggate@gavinprod, password oracle
, mgrport 7809
rmttrail /opt/oracle/ggate/dirdat/lt
ddl include mapped objname sender.*;
table sender.*;
3. info process
(1). 作用:查看进程的信息性,包括进程的状态、Checkpoint信息、延时等
GGSCI () 7& info EXT1
Last Started 2015-01-28 05:31
Status RUNNING
Checkpoint Lag
529:05:45 (updated 00:00:02 ago)
Log Read Checkpoint
Oracle Redo Logs
2015-01-06 04:27:03
Seqno 24, RBA
SCN 0.1440415 (1440415)
4. info process detail
(1). 作用:查看更加详细的信息,包括所使用的trail文件、参数文件、报告文件、警告文件的位置
GGSCI () 8& info EXT1 detail
Last Started 2015-01-28 05:31
Status RUNNING
Checkpoint Lag
431:32:57 (updated 00:00:04 ago)
Log Read Checkpoint
Oracle Redo Logs
2015-01-10 06:00:18
Seqno 31, RBA
SCN 0.1553661 (1553661)
Target Extract Trails:
Remote Trail Name
/opt/oracle/ggate/dirdat/lt
Extract Source
/opt/oracle/flash_recovery_area/GAVINPROD/archivelog/2015_01_10/o1_mf_1_31_bc2d3p27_.arc
2014-12-24 04:12
2015-01-10 06:00
/opt/oracle/oradata/gavinprod/redo01.log
2014-12-24 00:23
2014-12-24 04:12
Not Available
* Initialized *
2014-12-24 00:23
Current directory
/opt/oracle/ggate
Report file
/opt/oracle/ggate/dirrpt/EXT1.rpt
Parameter file
/opt/oracle/ggate/dirprm/ext1.prm
Checkpoint file
/opt/oracle/ggate/dirchk/EXT1.cpe
Process file
/opt/oracle/ggate/dirpcs/EXT1.pce
Stdout file
/opt/oracle/ggate/dirout/EXT1.out
/opt/oracle/ggate/ggserr.log
5. info process showch
(1). 作用:查看详细的关于checkpoint的细心你想,用于查询GoldenGate进行处理过的事物记录
Extract进程的Recovery checkpoing,他标识源数据最早的未被处理事物,可以查到该事物的redo log位于哪个日志文件以及该日志文件的序列号,所有序列号比它大得日志文件都需保留
GGSCI () 9& info EXT1 showch
Last Started 2015-01-28 05:31
Status RUNNING
Checkpoint Lag
00:00:00 (updated 00:00:06 ago)
Log Read Checkpoint
Oracle Redo Logs
2015-01-28 05:33:32
Seqno 42, RBA 2548736
SCN 0.1750257 (1750257)
Current Checkpoint Detail:
Read Checkpoint #1
Oracle Redo Log
Startup Checkpoint (starting position in the data source):
Thread #: 1
Sequence #: 19
Timestamp: 2014-12-24 04:12:21.000000
SCN: 0.1341390 (1341390)
Redo File: /opt/oracle/oradata/gavinprod/redo01.log
Recovery Checkpoint (position of oldest unprocessed transaction in the data source):
Thread #: 1
Sequence #: 42
RBA: 2504208
Timestamp: 2015-01-28 05:33:32.000000
SCN: 0.1750256 (1750256)
Redo File: /opt/oracle/oradata/gavinprod/redo03.log
Current Checkpoint (position of last record read in the data source):
Thread #: 1
Sequence #: 42
RBA: 2548736
Timestamp: 2015-01-28 05:33:32.000000
SCN: 0.1750257 (1750257)
Redo File: /opt/oracle/oradata/gavinprod/redo03.log
Write Checkpoint #1
GGS Log Trail
Current Checkpoint (current write position):
Sequence #: 1
Timestamp: 2015-01-28 05:33:46.462178
Extract Trail: /opt/oracle/ggate/dirdat/lt
CSN state information:
CRC: A4-7E-18-EE
Latest CSN: 1749736
Latest TXN: 7.29.894
Latest CSN of finished TXNs: 1749736
Completed TXNs: 7.29.894
Version = 2
Record Source = A
# Input Checkpoints = 1
# Output Checkpoints = 1
File Information:
Block Size = 2048
Max Blocks = 100
Record Length = 2048
Current Offset = 0
Configuration:
Data Source = 3
Transaction Integrity = 1
Task Type = 0
Start Time = 2015-01-28 05:31:39
Last Update Time = 2015-01-28 05:33:46
Stop Status = A
Last Result = 400
6. lag process
(1). 作用:查看详细的延时信息
GGSCI () 10& lag EXT1
Sending GETLAG request to EXTRACT EXT1 ...
Last record lag: 23 seconds.
At EOF, no more records to process.
(1). 作用:查看进程处理的记录数
GGSCI () 13& stats EXT1, total
Sending STATS request to EXTRACT EXT1 ...
Start of Statistics at 2015-01-28 05:37:59.
DDL replication statistics (for all trails):
*** Total statistics since extract started
Operations
Mapped operations
Unmapped operations
Other operations
Excluded operations
Output to /opt/oracle/ggate/dirdat/lt:
Extracting from GGATE.GGS_MARKER to GGATE.GGS_MARKER:
*** Total statistics since 2015-01-28 05:31:45 ***
No database operations have been performed.
End of Statistics.
8. view report process
(1). 作用:查看对应的报告文件
GGSCI () 11& view report EXT1
***********************************************************************
Oracle GoldenGate Capture for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_0_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:42:16
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
Starting at 2015-01-28 05:31:33
***********************************************************************
Operating System Version:
Version #1 SMP Mon Nov 12 02:14:55 EST 2007, Release 2.6.18-53.el5
Machine: x86_64
soft limit
hard limit
Address Space Size
Process id: 5097
Description:
***********************************************************************
Running with the following parameters
***********************************************************************
2015-01-28 05:31:33
Operating system character set identified as UTF-8. Locale: en_US, LC_ALL:.
extract ext1
userid ggate@gavinprod, password ******
2015-01-28 05:31:35
WARNING: NLS_LANG environment variable does not match database character set, or not set. Using database character set value of AL32UTF8.
, mgrport 7809
rmttrail /opt/oracle/ggate/dirdat/lt
&三、通过ggserr.log日志监控
1. ggserr.log可以查看到的内容
(1). GGSCI命令的历史记录
(2). GoldenGate进程的启动和停止
(3). 已执行的处理
(4). 发生的错误
(5). 信息和警告消息
2. 如何查看 - 通过ggsevt命令
GGSCI () 14& view ggsevt
2014-09-10 01:26:35
Oracle GoldenGate Command Interpreter for Oracle:
GGSCI command (ggate): edit params mgr.
2014-09-10 01:27:16
Oracle GoldenGate Command Interpreter for Oracle:
GGSCI command (ggate): edit params mgr.
2014-09-10 01:27:27
Oracle GoldenGate Command Interpreter for Oracle:
GGSCI command (ggate): start manager.
2014-09-10 01:27:28
Oracle GoldenGate Manager for Oracle, mgr.prm:
Manager started (port 7809).
2014-09-10 01:27:40
Oracle GoldenGate Command Interpreter for Oracle:
GGSCI command (ggate): add extract ext1
tranlog, begin now.
2014-09-10 01:29:24
Oracle GoldenGate Command Interpreter for Oracle:
GGSCI command (ggate): add exttrail2014-09-10 02:24:03
2014-09-10 02:24:03
Oracle GoldenGate Manager for Oracle, mgr.prm:
Manager started (port 7809).
2014-09-10 02:24:07
Oracle GoldenGate Command Interpreter for Oracle:
GGSCI command (ggate): start EXT1.
2014-09-10 02:24:07
Oracle GoldenGate Manager for Oracle, mgr.prm:
Command received from GGSCI on
2014-09-10 02:24:07
Oracle GoldenGate Manager for Oracle, mgr.prm:
EXTRACT EXT1 starting.
2014-09-10 02:24:08
Oracle GoldenGate Capture for Oracle, ext1.prm:
EXTRACT EXT1 starting.
2014-09-10 02:24:08
Oracle GoldenGate Capture for Oracle, ext1.prm:
Operating system character set identified as UTF-8.
2014-09-10 02:24:19
Oracle GoldenGate Capture for Oracle, ext1.prm:
BOUNDED RECOVERY: reset to initial or altered checkpoint.
2014-09-10 02:24:19
Oracle GoldenGate Capture for Oracle, ext1.prm:
Virtual Memory Facilities for: BR
anon alloc: mmap(MAP_ANON)
anon free: munmap
file alloc: mmap(MAP_SHARED)
file free: munmap
target directories:
/opt/oracle/ggate/BR/EXT1.
2014-09-10 02:24:19
Oracle GoldenGate Capture for Oracle, ext1.prm:
Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON)
anon free: munmap
file alloc: mmap(MAP_SHARED)
file free: munmap
target directories:
/opt/oracle/ggate/dirtmp.
2014-09-10 02:24:20
WARNING OGG-01423
Oracle GoldenGate Capture for Oracle, ext1.prm:
No valid default archive log destination directory found
3. 如可查看 - 通过gserr.log文件
[ggate@gavinprod ggate]$ pwd
/opt/oracle/ggate
[ggate@gavinprod ggate]$ ls ggserr.log
ggserr.log
&四、通过进入report目录文件监控
1. 通过report文件
[ggate@gavinprod dirrpt]$ pwd
/opt/oracle/ggate/dirrpt
[ggate@gavinprod dirrpt]$ ls -ltr
-rw-rw-rw- 1 ggate
1182 Sep 10 01:27 MGR3.rpt
-rw-rw-rw- 1 ggate
1721 Sep 10 02:24 MGR2.rpt
-rw-rw-rw- 1 ggate
1721 Sep 16 19:06 MGR1.rpt
-rw-rw-rw- 1 ggate
4242 Sep 16 19:06 EXT19.rpt
-rw-rw-rw- 1 oracle oinstall 21926 Dec 23 23:52 EXT18.rpt
-rw-rw-rw- 1 oracle oinstall 20432 Dec 23 23:56 EXT17.rpt
2. 通过discard文件
[ggate@gavinprod dirrpt] $ pwd
/opt/oracle/ggate/dirrpt
[ggate@gavinprod dirrpt] $ ls *dsc
[ggate@gavinprod dirrpt] $ cat REP1.dsc
OCI Error ORA-00001: unique constraint (RECEIVER.GAVIN_TEST) violated (status = 1), SQL &INSERT INTO "RECEIVER"."GAVIN_TEST" ("ID","TEST_DATE","TEST_DESCRIPTION") VALUES (:a0,:a1,:a2)&
Operation failed at seqno 388 rba
Discarding record on action DISCARD on error 1
Problem replicating SENDER.GAVIN_TEST to RECEIVER.GAVIN_TEST
Mapping problem with insert record (target format)...
TEST_DATE = 2015-01-24 20:29:12
TEST_DESCRIPTION = GAVIN TEST OGG DISCARD
&五、日常运维监控自动化脚本
&GoldenGate可运行监控脚本,用以监控OGG日常状态,和当前以及需要的归档号码
Thanks and Regards
阅读(...) 评论()4538人阅读
Oracle(12)
goldengate 从oracle asm 中增量同步数据时,出现下述错误.
&ERROR&& OGG-00446& No valid log files for current redo sequence 367, thread 1, error retrieving redo file name
for sequence 367, archived = 0, use_alternate = 0Not able to establish initial position for begin time
&ERROR&& OGG-01668& PROCESS ABENDING.
在抽取进程的参数文件中加入TRANLOGOPTIONS DBLOGREADER即可。
参考:Extract fail due to an ASM connection configuration issue [ID ]
Applies to:
Oracle GoldenGate - Version 11.1.1.0.0 and later
Information in this document applies to any platform.
To show how to recover from an extract failure when your Archive or Redo files are stored under ASM
and you see one of the following messages
ERROR 118 No Valid Log File For Current Redo Sequence Xxxx, Thread Y
ERROR 500 No valid log files for current redo sequence X, thread Y, error retrieving redo file name for sequence X, archived = 0, use_alternate = 0 Not able to establish initial position for begin time YYYY-MM-DD HH:MI:SS
ERROR OGG-00446& error 2 (No such file or directory) opening redo log &log file name&.dbf for sequence ####
Not able to establish initial position for begin time YYYY-MM-DD HH:MI:SS
If you are running Oracle ASM, the problem may be that the ASM connection is either not defined or is incorrectly defined or TRANSLOGOPTINS DBLOGREADER needs to be added. & If your archive files are ONLY under ASM and extract receives an error 500, extract
may have run successfully until the process needed to read from the ARCHIVES instead of the REDO. Once it needs to read from archive, the extract will fail.
Please Add the following line, or correct it in your Extract parameter file, if you are On Oracle 11.2.0.2 or better,& or 10.2.0.5 or better and using OGG 11.x&
TRANLOGOPTIONS DBLOGREADER
If the above version& of Oracle or OGG doesn't apply to you specifying a user that can connect to the ASM instance and restart your Extract:
TRANLOGOPTIONS ASMUSER &user&@&ASM_instance_name&,
ASMPASSWORD &password&
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:1247395次
积分:16751
积分:16751
排名:第376名
原创:457篇
评论:84条
(1)(6)(4)(10)(4)(4)(6)(10)(11)(14)(14)(1)(5)(2)(2)(5)(7)(3)(2)(2)(4)(6)(3)(2)(1)(9)(2)(6)(1)(6)(6)(4)(4)(10)(4)(10)(10)(11)(13)(11)(5)(10)(27)(22)(17)(24)(8)(16)(31)(29)(25)(7)(1)(1)(2)(2)(4)(1)(1)OGG_Oracle GoldenGate3步骤Extract / Dump / Relicat(案例) - Go当前位置:& &&&OGG_Oracle GoldenGate3步骤Extract / Dump / RelicOGG_Oracle GoldenGate3步骤Extract / Dump / Relicat(案例)&&网友分享于:&&浏览:0次OGG_Oracle GoldenGate三步骤Extract / Dump / Relicat(案例) Created By 鲍新建
1.OGG是数据同步软件,或者说是逻辑复制软件,其竞争对手有IBM CDC,DELL shareplex,DSG,DDS等等。
2.OGG软件是需要安装在操作系统上的,Oracle DB软件没有自带OGG软件(至少目前是这样的)
3.OGG软件有三大进程(说四大进程也行):
三大进程:源头抽取进程、源头传输进程、目的端应用进程(即:复制进程)
四大进程:源头抽取进程、源头传输进程、目的端server进程(负责在目的端写入trail文件)、目的端应用进程(即:复制进程)
4.OGG软件有两种trail file
源头的trail file:由源头抽取进程写入。
目的端的trail file: 源头传输进程传输到目的端,由目的端的server 进程写入目的端操作系统的指定路径下。
5.OGG软件中三大进程都有自己的checkpoint(即:检查点,用来记录每种进程读取到什么位置了,写入到什么位置了)
源头抽取进程:有读取检查点 和写入检查点
源头传输进程:有读取检查点 和写入检查点
目的端应用进程:有读取检查点
6.OGG软件三大进程处理trail file的过程:
源头抽取进程:读取oracle redo log(假设源头数据库是oracle),结合抽取进程的参数文件,将redo log中的内容变为OGG自有格式的文件(即trail file),并写入到源头操作系统的指定路径下
源头传输进程:读取&源头抽取进程写入的trail file&,结合传输进程的参数文件,发送需要同步的数据到目的端,在目的端是由server 进程负责写入。
目的端应用进程:读取目的端操作系统的指定路径下的trail file,结合应用进程的参数文件,形成sql语句,在目的端db上执行这些sql语句。
二、Extract Process
创建Extract Process
Step1. 添加extract程序
GGSCI () 51& add extract ext2, tranlog, begin now
EXTRACT added.
Step2. 定义extract目录
GGSCI () 52& add exttrail /opt/oracle/ggate/dirdat/ld, extract ext2
EXTTRAIL added.
Step3. 定义extract参数
edit params ext1
GGSCI () 19& edit params EXT2
extract ext2
userid ggate@gavinprod, password oracle
exttrail /opt/oracle/ggate/dirdat/ld
ddl include mapped objname source_prod.*;
table source_prod.*;
三、Dump Process
创建Dump Process
Step1. 添加dump程序
GGSCI () 60& add extract dmp2,exttrailsource /opt/oracle/ggate/dirdat/ld
EXTRACT added.
Step2.&定义dump目录
GGSCI () 62& add rmttrail /opt/oracle/ggate/dirdat/ld, extract dmp2
RMTTRAIL added.
Step3. 定义dump参数
GGSCI () 71& view params DMP2
extract dmp2
userid ggate@gavinprod, password oracle
, mgrport 7809
rmttrail /opt/oracle/ggate/dirdat/lt
table source_prod.*;
四、Replicat Process
创建Replicat Process
Step1. 添加replicat程序
GGSCI () 8& add replicat rep2, exttrail /opt/oracle/ggate/dirdat/ld, checkpointtable ggate.checkpoint
REPLICAT added.
Step2.&定义replicat参数
GGSCI () 11& view params REP2
replicat rep2
ASSUMETARGETDEFS
userid ggate@odellprod,password oracle
discardfile /opt/oracle/ggate/dirdat/rep2_discard.txt, append, megabytes 10
map source_prod.*, target target_prod.*;
1. 在源数据端,创建测试数据
CREATE TABLE source_prod.bxj_test_ogg_dump
test_description
VARCHAR2 (100)
INSERT INTO source_prod.bxj_test_ogg_dump VALUES (sysdate,'test goldendate data transfer by extract/dump/replicat');
2. Source Database,进程和文件
GGSCI () 17& info all
Lag at Chkpt
Time Since Chkpt
2. Target Database,进程和文件&
GGSCI () 6& info all
Lag at Chkpt
Time Since Chkpt
3. Checkpoint表
参考:shined - /shined/archive//2587648.html
参考:msdnchina - http://blog.csdn.net/msdnchina/article/details/
12345678910
12345678910
12345678910 上一篇:下一篇:文章评论相关解决方案 12345678910 Copyright & &&版权所有Oracle GoldenGate(78)
Oracle DB(566)
在OGG中跳过Oracle DB 长事务的命令
GGSCI (hostdb2) 2& SEND EXTRACT extxxx , SKIPTRANS 10.40.1122351 THREAD 1
Sending SKIPTRANS request to EXTRACT EXTXXX ...
Are you sure you sure you want to skip transaction [XID 10.40.1122351, Redo Thread 1, Start Time :13:03:48, SCN 899 (59)]? (y/n)y
Sending SKIPTRANS request to EXTRACT EXTXXX ...
Transaction [XID 10.40.1122351, Redo Thread 1, Start Time :13:03:48, SCN 899 (59)] skipped.
GGSCI (hostdb2) 4&
10.40.1122351这个长事务的来源:
GGSCI (hostdb2) 1& send extxxx, showtrans
Sending SHOWTRANS request to EXTRACT EXTXXX ...
Oldest redo log files necessary to restart Extract are:
Redo Thread 1, Redo Log Sequence Number 14727, SCN 302 (50), RBA
Redo Thread 2, Redo Log Sequence Number 10195, SCN 618 (66), RBA
------------------------------------------------------------
7.8.447821 ------&这就是事务的id。
-------&注意这个数字,当send extxxx, showtrans再次执行一遍时,该值在不断减小,这说明extxxx进程在干活。
Redo Thread:
Start Time:
---&&&&&&额外注意:Select * from gv$transaction where xidusn=7 and XIDSLOT =8 and XIDSQN =447821;居然查不到记录。
---&&&&&&额外注意:死事务查询(如下)也查询不到死事务:
select ktuxeusn USN, ktuxeslt Slot, ktuxesqn Seq, ktuxesta State, ktuxesiz Undo
from x$ktuxe
where ktuxesta && 'INACTIVE' and ktuxecfl like '%DEAD%' o
------------------------------------------------------------
23.11.535573
Redo Thread:
Start Time:
&最后,有人会问,你这样跳过事务,那复制就不完整了啊。其实,针对这一点,我认为复制还是完整的(即:数据复制是完整的)
1. Select * from gv$transaction where xidusn=7 and XIDSLOT =8 and XIDSQN =447821;居然查不到记录。
&从这一点来说,2个db实例中均没有此事务的记录。
& ---引出了另外一点,db实例中都没有该事务,你用ogg命令的查询为啥能查到?---我猜测是ogg的命令可能借助了OGG的BR。
2.如下命令的结果
GGSCI (hostdb2) 1& send extxxx, status
Sending STATUS request to EXTRACT EXTXXX ...
EXTRACT EXTXXX (PID 23683)
Current status: Recovery complete: Processing data with empty data queue---&注意此处的空队列。
Current read positions:
Redo thread #: 1
Sequence #: 14736
Timestamp:
04:34:52.000000
Redo thread #: 2
Sequence #: 10214
Timestamp:
05:00:17.000000
Current write position:
Sequence #: 268963
RBA: 5568905
Timestamp:
09:20:12.756297
Extract Trail: /u02/ggs/dirdat/aa
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:687690次
积分:13501
积分:13501
排名:第609名
原创:407篇
转载:99篇
译文:274篇
评论:38条
阅读:7423
阅读:10896
文章:19篇
阅读:16690
文章:74篇
阅读:48793
(6)(15)(5)(3)(15)(31)(47)(28)(31)(19)(20)(23)(43)(17)(43)(41)(59)(34)(81)(22)(22)(21)(4)(5)(28)(87)(2)(2)(10)(11)(1)(1)(7)}

我要回帖

更多关于 oracle redo日志 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信