You can use the GoldenGate Logdump utility to view records in the GoldenGate trail files. The Logdump utility is part of the regular GoldenGate software installation. Logdump lets you view the unstructured trail data in hex and ASCII forma
You can use the GoldenGate Logdump utility to view records in the GoldenGate trail files. The Logdump
utility is part of the regular GoldenGate software installation. Logdump lets you view the unstructured
trail data in hex and ASCII format and count the number of records in the trail for debugging purposes.
You can also filter the trail for desired records and save them to a new trail for reprocessing if needed.
how to use logdump:
[oracle@ogg1 ogg]$ ./logdump
Oracle GoldenGate Log File Dump Utility for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
Logdump 44 >help
FC [ | ] – Edit previous command
HISTORY – List previous commands
OPEN | FROM
RECORD | REC - Display audit record
NEXT [ ] - Display next data record
SKIP [ ] [FILTER] – Skip down
FILTER – Apply filter during skip
COUNT – Count the records in the file
[START[time] ,]
[END[time] ,]
[INT[erval] ,]
[LOG[trail] ,]
[FILE ,]
[DETAIL ]
[[yy]yy-mm-dd] [hh[:mm][:ss]]
POSITION [ | FIRST | LAST | EOF ] – Set position in file
REVerse | FORward - Set read direction
RECLEN [ ] - Sets max output length
EXIT | QUIT - Exit the program
FILES | FI | DIR – Display filenames
ENV - Show current settings
VOLUME | VOL | V – Change default volume
DEBUG - Enter the debugger
GHDR ON | OFF – Toggle GHDR display
DETAIL ON | OFF | DATA – Toggle detailed data display
RECLEN
SCANFORHEADER (SFH) [PREV] - Search for the start of a header
SCANFORTYPE (SFT) – Find the next record of
[,]
SCANFORRBA (SFR) – Find the next record with
,
SCANFORTIME (SFTS) – Find the next record with timestamp
[,]
[[yy]yy-mm-dd] [hh[:mm][:ss]]
SCANFORENDTRANS (SFET) – Find the end of the current transaction
SCANFORNEXTTRANS (SFNT) – Find start of the next transaction
SHOW
HEX
]
TRANSID
FILENAME
PROCESS
INT16
INT32
INT64
STARTTIME
ENDTIME
SYSKEY []
SYSKEYLEN [] []
TRANSIND []
UNDOFLAG []
RECLEN []
AUDITRBA []
ANSINAME
GGSTOKEN
USERTOKEN
CSN | LogCSN [] []
=, ==, !=, , , = EQ, GT, LE, GE, LE, NE
X
TRANSHIST nnnn - Set size of transaction history
TRANSRECLIMIT nnnn - Set low record count threshold
TRANSBYTELIMIT nnnn – Set low byte count threshold
LOG {STOP} | { [TO]
BEGIN
SAVEFILECOMMENT on | OFF - Toggle comment records in a savefile
SAVE
nnn RECORDS | nnn BYTES
[NOCOMMENT] - Suppress the Comment header/trailer recs, Default
[COMMENT] - Insert Comment header/trailer recs
[OLDFORMAT] - Force oldformat records
[NEWFORMAT] - Force newformat records
[TRUNCATE ] - purgedata an existing savefile
[EXT ( , [,])] – Savefile Extent sizes on NSK
[MEGabytes ] – For extent size calculation
[TRANSIND ] – Set the transind field
[COMMITTS ] – Set the committs field
USERTOKEN on | OFF | detail - Show user token info
HEADERTOKEN on | OFF | detail - Show header token info
GGSTOKEN on | OFF | detail - Show GGS token info
FILEHEADER on | OFF | detail - Display file header contents
ASCIIHEADER ON | off – Toggle header charset
EBCDICHEADER on | OFF – Toggle header charset
ASCIIDATA ON | on - Toggle user data charset
EBCDICDATA on | OFF – Toggle user data charset
ASCIIDUMP ON | off – Toggle charset for hex/ascii display
EBCDICDUMP on | OFF – Toggle charset for hex/ascii display
TRAILFORMAT old | new – Force trail type
PRINTMXCOLUMNINFO on | OFF – Toggle SQL/MX columninfo display
TMFBEFOREIMAGE on | OFF – Toggle display of TMF before images
FLOAT
[FORMAT ] – sprintf format default %f
Logdump 45 >
Logdump 45 >history
23> n
24> n
25> n
26> n
27> n
28> n
29> open
30> open /opt/ogg/dirdat/k1000000
31> ghdr on
32> detail on
33> dat
34> detail data
35> usertoken on
36> n
37> sfh
38> filter include filename zbdba.test;
39> n
40> n
41> filter clear
42> env
43> fileheader detail
44> help
45> history
Logdump 50 >open ./dirdat/k1000005
Current LogTrail is /opt/ogg/dirdat/k1000005
After you open the trail file, you need to turn on some useful features to make full use of the
Logdump utility. The first command is GHDR ON. It enables display of the record header for the
transactions in the trail file for Oracle GoldenGate:
Logdump 51 >ghdr on
Next, you need to toggle the option for viewing the hex and ASCII values for trailfile data. To do so,
execute the detail data command:
Logdump 52 >detail data
Now you can move to the next record in the trail file by using the next command in Logdump. When
you issue the next command, Logdump moves forward one record:
Logdump 53 >next
2014/09/09 21:05:02.655.182 FileHeader Len 1007 RBA 0
Name: *FileHeader*
3000 0196 3000 0008 4747 0d0a 544c 0a0d 3100 0002 | 0…0…GG..TL..1…
0003 3200 0004 2000 0000 3300 0008 02f2 28df 1908 | ..2… …3…..(…
bace 3400 0013 0011 7572 693a 6f67 6731 3a3a 6f70 | ..4…..uri:ogg1::op
743a 6f67 6736 0000 1a00 182f 6f70 742f 6f67 672f | t:ogg6…../opt/ogg/
6469 7264 6174 2f6b 3130 3030 3030 3537 0000 0101 | dirdat/k10000057….
3800 0004 0000 0005 39ff 0008 0000 0000 0000 0000 | 8…….9………..
3a00 0081 0731 3433 3339 3539 0000 0000 0000 0000 | :….1433959……..
Logdump 54 >n
___________________________________________________________________
Hdr-Ind : E (x45) Partition : . (x00)
UndoFlag : . (x00) BeforeAfter: A (x41)
RecLength : 0 (x0000) IO Time : 2014/09/09 21:05:02.628.813
IOType : 150 (x96) OrigNode : 0 (x00)
TransInd : . (x03) FormatType : R (x52)
SyskeyLen : 0 (x00) Incomplete : . (x00)
AuditRBA : 0 AuditPos : 0
Continued : N (x00) RecCount : 0 (x00)
2014/09/09 21:05:02.628.813 RestartAbend Len 0 RBA 1015
Name:
After Image: Partition 0 G s
Logdump 55 >n
___________________________________________________________________
Hdr-Ind : E (x45) Partition : . (x04)
UndoFlag : . (x00) BeforeAfter: B (x42)
RecLength : 46 (x002e) IO Time : 2014/09/09 23:14:09.000.000
IOType : 3 (x03) OrigNode : 255 (xff)
TransInd : . (x03) FormatType : R (x52)
SyskeyLen : 0 (x00) Incomplete : . (x00)
AuditRBA : 30 AuditPos : 24111432
Continued : N (x00) RecCount : 1 (x01)
2014/09/09 23:14:09.000.000 Delete Len 46 RBA 1074
Name: OGG.GGS_MARKER
Before Image: Partition 4 G s
0000 0008 0000 0004 3130 3031 0001 0005 0000 0001 | ……..1001……..
3200 0200 1500 0032 3031 342d 3039 2d30 3420 3032 | 2……2014-09-04 02
3a33 373a 3331 | :37:31
Column 0 (x0000), Len 8 (x0008)
0000 0004 3130 3031 | ….1001
Column 1 (x0001), Len 5 (x0005)
0000 0001 32 | ….2
Column 2 (x0002), Len 21 (x0015)
0000 3230 3134 2d30 392d 3034 2030 323a 3337 3a33 | ..2014-09-04 02:37:3
31 | 1
Logdump 56 >n
___________________________________________________________________
Hdr-Ind : E (x45) Partition : . (x04)
UndoFlag : . (x00) BeforeAfter: B (x42)
RecLength : 46 (x002e) IO Time : 2014/09/09 23:44:11.000.000
IOType : 3 (x03) OrigNode : 255 (xff)
TransInd : . (x03) FormatType : R (x52)
SyskeyLen : 0 (x00) Incomplete : . (x00)
AuditRBA : 30 AuditPos : 24441148
Continued : N (x00) RecCount : 1 (x01)
2014/09/09 23:44:11.000.000 Delete Len 46 RBA 1235
Name: OGG.GGS_MARKER
Before Image: Partition 4 G s
0000 0008 0000 0004 3135 3137 0001 0005 0000 0001 | ……..1517……..
3200 0200 1500 0032 3031 342d 3039 2d30 3420 3232 | 2……2014-09-04 22
3a33 363a 3036 | :36:06
Column 0 (x0000), Len 8 (x0008)
0000 0004 3135 3137 | ….1517
Column 1 (x0001), Len 5 (x0005)
0000 0001 32 | ….2
Column 2 (x0002), Len 21 (x0015)
0000 3230 3134 2d30 392d 3034 2032 323a 3336 3a30 | ..2014-09-04 22:36:0
36 | 6
Logdump 57 >

MySQL索引基数对查询性能有显着影响:1.高基数索引能更有效地缩小数据范围,提高查询效率;2.低基数索引可能导致全表扫描,降低查询性能;3.在联合索引中,应将高基数列放在前面以优化查询。

MySQL学习路径包括基础知识、核心概念、使用示例和优化技巧。1)了解表、行、列、SQL查询等基础概念。2)学习MySQL的定义、工作原理和优势。3)掌握基本CRUD操作和高级用法,如索引和存储过程。4)熟悉常见错误调试和性能优化建议,如合理使用索引和优化查询。通过这些步骤,你将全面掌握MySQL的使用和优化。

MySQL在现实世界的应用包括基础数据库设计和复杂查询优化。1)基本用法:用于存储和管理用户数据,如插入、查询、更新和删除用户信息。2)高级用法:处理复杂业务逻辑,如电子商务平台的订单和库存管理。3)性能优化:通过合理使用索引、分区表和查询缓存来提升性能。

MySQL中的SQL命令可以分为DDL、DML、DQL、DCL等类别,用于创建、修改、删除数据库和表,插入、更新、删除数据,以及执行复杂的查询操作。1.基本用法包括CREATETABLE创建表、INSERTINTO插入数据和SELECT查询数据。2.高级用法涉及JOIN进行表联接、子查询和GROUPBY进行数据聚合。3.常见错误如语法错误、数据类型不匹配和权限问题可以通过语法检查、数据类型转换和权限管理来调试。4.性能优化建议包括使用索引、避免全表扫描、优化JOIN操作和使用事务来保证数据一致性

InnoDB通过undolog实现原子性,通过锁机制和MVCC实现一致性和隔离性,通过redolog实现持久性。1)原子性:使用undolog记录原始数据,确保事务可回滚。2)一致性:通过行级锁和MVCC确保数据一致。3)隔离性:支持多种隔离级别,默认使用REPEATABLEREAD。4)持久性:使用redolog记录修改,确保数据持久保存。

MySQL在数据库和编程中的地位非常重要,它是一个开源的关系型数据库管理系统,广泛应用于各种应用场景。1)MySQL提供高效的数据存储、组织和检索功能,支持Web、移动和企业级系统。2)它使用客户端-服务器架构,支持多种存储引擎和索引优化。3)基本用法包括创建表和插入数据,高级用法涉及多表JOIN和复杂查询。4)常见问题如SQL语法错误和性能问题可以通过EXPLAIN命令和慢查询日志调试。5)性能优化方法包括合理使用索引、优化查询和使用缓存,最佳实践包括使用事务和PreparedStatemen

MySQL适合小型和大型企业。1)小型企业可使用MySQL进行基本数据管理,如存储客户信息。2)大型企业可利用MySQL处理海量数据和复杂业务逻辑,优化查询性能和事务处理。

InnoDB通过Next-KeyLocking机制有效防止幻读。1)Next-KeyLocking结合行锁和间隙锁,锁定记录及其间隙,防止新记录插入。2)在实际应用中,通过优化查询和调整隔离级别,可以减少锁竞争,提高并发性能。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

适用于 Eclipse 的 SAP NetWeaver 服务器适配器
将Eclipse与SAP NetWeaver应用服务器集成。

Atom编辑器mac版下载
最流行的的开源编辑器

ZendStudio 13.5.1 Mac
功能强大的PHP集成开发环境

VSCode Windows 64位 下载
微软推出的免费、功能强大的一款IDE编辑器

禅工作室 13.0.1
功能强大的PHP集成开发环境