1 Using the Logdump Utility
Important:
To avoid any adverse effects on the data or checkpoints in your trails, use Logdump only with guidance from an Oracle support analyst or an experienced Oracle GoldenGate user.
This chapter includes the following sections:
Getting Started with Logdump
This section introduces you to basic Logdump commands that enable you to open files, control the display, navigate through a file, and filter for specific information, among other basic tasks. It also illustrates and explains the components of a record.
Parent topic: Using the Logdump Utility
Executing Basic Logdump Tasks
The following are some basic tasks that can be performed with Logdump. For detailed information about the commands shown and other available options, see the alphabetical reference in Logdump Commands.
- Finding the Next Good Record Header
- Finding the Beginning, Middle, and End of a Transaction
- Scanning for the End of a Transaction
- Going to a Specific RBA in the File
- Filtering Based on a Table or Data File Name
- Removing the Current Filter Criteria
- Filtering on Multiple Conditions
- Count the Records in a Trail File
- Saving Records to a New Trail File
- Closing the Current File and Opening the Next One in the Trail
- Keeping a Log of Your Session
- Seeing the Current Logdump Environment
- Getting Online Command Help
- To Exit Logdump
Parent topic: Using the Logdump Utility
Finding the Next Good Record Header
To find the next good record header, enter the following command:
Logdump 8> SCANFORHEADER
Alternatively, you can simply enter SFH
.
Parent topic: Executing Basic Logdump Tasks
Finding the Beginning, Middle, and End of a Transaction
To find the beginning, middle, and end of a transaction, complete the following steps:
Parent topic: Executing Basic Logdump Tasks
Scanning for the End of a Transaction
To scan for the end of a transaction, enter the following command:
Logdump 20> SCANFORENDTRANS
Alternatively, you can simply enter SFET
.
The record shown will be the first one in the next transaction. To confirm, the TransInd
field should be x00
.
Parent topic: Executing Basic Logdump Tasks
Going to a Specific RBA in the File
To go to a specific RBA in the file, you can do either of the following:
-
To go to an RBA anywhere in the file:
Logdump 35> POS
rba
Logdump 36> NThis displays the record located at that RBA.
-
To go to the first record in the file:
Logdump 37> POS FIRST
Alternatively, you can enter the following command:
Logdump 37> POS 0
Parent topic: Executing Basic Logdump Tasks
Filtering Based on a Table or Data File Name
To filter out everything except records containing a specific NonStop data file name, enter the following command:
Logdump 60> FILTER INCLUDE FILENAME $volume
.subvolume
.file
To filter out everything except records containing a specific table name:
-
On a NonStop system:
Logdump 60> FILTER INCLUDE ANSINAME
catalog
.schema
.table
-
On a Windows or UNIX system:
Logdump 60> FILTER INCLUDE FILENAME [
container
|catalog
]schema
.table
Now, when you use the N
command, you will only see records that satisfy this filter. Conversely, to filter out records containing a specific table or file name, but show everything else, use the EXCLUDE
option instead of INCLUDE
.
Parent topic: Executing Basic Logdump Tasks
Removing the Current Filter Criteria
To remove the current filter criteria, enter the following command:
Logdump 62> FILTER CLEAR
Parent topic: Executing Basic Logdump Tasks
Filtering on Multiple Conditions
To filter on multiple conditions, enter one of the following commands:
-
Logdump 60> FILTER INCLUDE FILENAME $
volume
.
subvolume
...
file
..; FILTER RECTYPE
record_type
; FILTER MATCH ALL
-
Logdump 60> FILTER INCLUDE ANSINAME
catalog.schema.table
; FILTER RECTYPE
record_type
; FILTER MATCH ALL
-
Logdump 65> FILTER INCLUDE FILENAME
schema.table
; FILTER RECTYPE
record_type
; FILTER MATCH ALL
Use MATCH ANY
or MATCH ALL
depending on whether you want the search to match any or all of the filter conditions, respectively, when multiple conditions are specified. The preceding example filters on a name and record type, typically an operation type such as INSERT
.
Parent topic: Executing Basic Logdump Tasks
Count the Records in a Trail File
The following command shows a count summary followed by counts for each table or data file:
Logdump 67> COUNT
Parent topic: Executing Basic Logdump Tasks
Saving Records to a New Trail File
To save a subset of records, enter the following command:
Logdump 68> SAVEfile
n
RECORDS
Parent topic: Executing Basic Logdump Tasks
Closing the Current File and Opening the Next One in the Trail
To close the current file and open the next one in the trail, enter the following command:
Logdump 69> NEXTTRAIL
Parent topic: Executing Basic Logdump Tasks
Keeping a Log of Your Session
To start logging, enter the following command:
Logdump 70> LOG TO filename
.txt
To write text to the log:
Logdump 71> WRITELOG "text
"
To stop logging:
Logdump 72> LOG STOP
Parent topic: Executing Basic Logdump Tasks
Seeing the Current Logdump Environment
To see the current Logdump environment, enter the following command:
Logdump 73> ENV
This shows which features are enabled, such as filtering and header views, and it shows environment information such as the current trail and position.
Parent topic: Executing Basic Logdump Tasks
Getting Online Command Help
To get online command help, enter the following command:
Logdump 74> HELP
Parent topic: Executing Basic Logdump Tasks
To Exit Logdump
To exit Logdump, enter either of the following commands:
-
Logdump 100> EXIT
-
Logdump 100> QUIT
Parent topic: Executing Basic Logdump Tasks
Evaluating Transaction Size
Use Logdump's TRANSHIST
command in conjunction with other Logdump commands to determine whether or not your applications generate large transactions and to identify their relative size. TRANSHIST
causes Logdump to track the size of transactions contained in a trail file or extract file in an internal history table. The transactions are ranked in descending order of size, in bytes. When the history table is full, the smallest transaction is removed to allow a larger transaction to be added to the list.
To use statistics generated by TRANSHIST
, issue the following series of commands in Logdump:
Parent topic: Using the Logdump Utility
Maintaining Command History
On Windows and UNIX systems, command history is stored in a file named logdump.hst
. On NonStop systems, command history is stored in a file named logduhst
. The file is created in the home location of the user who first started Logdump.
When Logdump starts up, it looks for the history file in one of the following locations, depending on the platform:
-
The
USERPROFILE
environment variable. -
The
$HOME
environment variable. -
The default
$
vol
.subvol
.
If the file exists, Logdump loads the command history into a buffer. The command history buffer holds 400 commands. Upon termination of the Logdump session, the session's history is appended to the file.
Parent topic: Using the Logdump Utility
Viewing Logdump Command Information and Syntax
To learn more about Logdump commands, see the alphabetical reference documentation in Logdump Commands.
Parent topic: Using the Logdump Utility