onbar -P syntax: Printing backed-up logical logs
You can use the onbar -P command to print logical logs that are backed up using the ON-Bar utility.
To run ON-Bar commands, you must be user root, user informix, a member of the bargroup group on UNIX™, or a member of the HCL OneDB™-Admin group on Windows™.
Option | Purpose |
---|---|
-b | Print logical-log records associated with blobspace
blobpages. The database server stores these records on the logical-log backup media as part of blobspace logging. |
-c | Use the compression dictionary to expand compressed data. |
-l | Print the long listing of the logical-log record. The long listing of a log record includes complex hexadecimal and ASCII dumps of the entire log record. |
-n starting_id-ending_id | Print the logical-log records contained in the
specified range of log files. The starting_id option
is the ID of the first log to print. The ending_id option
is ID of the last log to print. The value of the starting_id option
must be smaller than the value of the ending_id option. Separate the starting and ending ID values with a hyphen. Do not include blank spaces. |
-n unique_id | Print the logical-log records contained in the specified log file. The unique_id option is the unique ID number of the logical log. To determine the unique ID of a specific logical-log file, use the onstat -l command. |
-P | Print backed-up logical log information |
-q | Do not print the program header |
-t tblspace_num | Print the records associated with the tblspace
that you specify with the tblspace_num option. Specify
the tblspace_num value as either an unsigned integer
or hexadecimal value. If you do not use a prefix of |
-u username | Print the records for a specific user. The user name must be an existing login name and conform to operating-system-specific rules for login names. |
-x transaction_num | Print only the records associated with the transaction
that you specify. The transaction_num must be an
unsigned integer between zero and TRANSACTIONS -1, inclusive. Additional Information: Use the -x option only in the unlikely situation of an error being generated during a roll-forward. When this situation occurs, the database server sends a message to the message log that includes the transaction ID of the offending transaction. You can use this transaction ID with the -x option to investigate the cause of the error. |
Usage
To view the backed-up logical logs, the storage manager must be running.
The output of this command is printed to stdout.
Example: Print a specific transaction
onbar -P -n 2 -l -q -b -u "informix" -t 1048722 -x 1
log uniqid: 2.
1665d0 120 DPT 1 2 0 5
00000078 0002006c 00000010 0000fefe ...x...l ........
00000001 00000000 000077e3 00000000 ........ ..w.....
00000005 00000005 00002a24 00000001 ........ ..*$....
00100004 0a0c21b8 00002a48 00000001 ......!. ..*H....
00100006 0a0c2288 00002ea1 00000001 ......". ........
0010001b 0a0c3810 00002bee 00000001 ......8. ..+.....
00100015 0a0c3a18 00002a3d 00000001 ......:. ..*=....
00100005 0a0c57c0 ......W.
166648 60 CKPOINT 1 0 1665d0 1
0000003c 00000042 00000010 0000fefe ...<...B ........
00000001 001665d0 000077e3 00000000 ......e. ..w.....
00010005 00000002 00000002 001665a0 ........ ......e.
00000007 ffffffff 00084403 ........ ..D.
Example: Print multiple logical log files
The following command prints the logical log records for the logical logs files that have IDs of 2, 3, 4, 5, 10, 11, and 12:
onbar -P -n 2-5 -n 10-12