Trace Files
The MicroKernel’s Trace Operations configuration option allows you to trace each Btrieve API call and save the results to a file. This is helpful in debugging applications. The following shows a sample trace file.
MicroKernel Trace File of a BUTIL STAT Call
MicroKernel Database Engine [Server Edition] for Windows NT trace file
Created : Wed Dec 17 18:19:09
<In> 0198 Opcode : 0026 Crs ID : 0xffffffff Db Length : 00005 Keynum : ff Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: 00 00 00 00 00 - .....
KBuf: ?? - .
<Out>0198 Status : 0000 Crs ID : 0xffffffff Db Length : 00005 Keynum : ff Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: 07 00 00 00 54 - ....T
KBuf: ?? - .
--------------------------------------------------------------------
<In> 0199 Opcode : 0000 Crs ID : 0xffffffff Db Length : 00001 Keynum : fe Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: 4e 4f 54 53 48 4f 57 4e - 00 NOTSHOWN.
KBuf: 5c 5c 4e 54 34 53 52 56 - 2d 4a 55 44 49 54 5c 43 \\NT4SRV-JUDIT\C
24 5c 64 65 6d 6f 64 61 - 74 61 5c 74 75 69 74 69 $\demodata\tuiti
 
<Out>0199 Status : 0000 Crs ID : 0x00000002 Db Length : 00001 Keynum : fe Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: 4e 4f 54 53 48 4f 57 4e - 00 NOTSHOWN.
KBuf: 5c 5c 4e 54 34 53 52 56 - 2d 4a 55 44 49 54 5c 43 \\NT4SRV-JUDIT\C
24 5c 64 65 6d 6f 64 61 - 74 61 5c 74 75 69 74 69 $\demodata\tuiti
--------------------------------------------------------------------
<In> 0200 Opcode : 0015 Crs ID : 0x00000002 Db Length : 00028 Keynum : fe Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: 00 00 00 00 00 01 07 00 - 00 00 00 00 00 00 00 03 ................
c3 3f 00 10 00 00 00 00 - b4 fe 36 03 .?........6.
KBuf: 00 00 00 00 1c 00 00 00 - da fe 36 03 00 00 00 00 .........6.....
00 01 07 00 00 00 00 00 - 00 00 00 03 c3 3f 00 10.............?..
 
<Out>0200 Status : 0000 Crs ID : 0x00000002 Db Length : 00007 Keynum : fe Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: 03 00 0e 00 04 05 01 - .......
KBuf: 00 00 00 00 07 00 00 00 - da fe 36 03 03 00 0e 00 ..........6.....
04 05 01 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
--------------------------------------------------------------------
<In> 0201 Opcode : 0015 Crs ID : 0x00000002 Db Length : 33455 Keynum : ff Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: 2b 00 cb ff ff ff ff ff - ff ff ff ff ff ff ff 00 +...............
00 0e 00 04 05 01 00 00 - 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 - 00 00 00 14 4e 54 34 53 ............NT4S
52 56 2d 4a 55 44 49 54 - 5c 75 6e 6b 6e 6f 77 6e RV-JUDIT\unknown
KBuf: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
<Out>0201 Status : 0000 Crs ID : 0x00000002 Db Length : 00064 Keynum : ff Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: 0e 00 00 10 03 70 08 00 - 00 00 01 12 00 00 00 00 .....p..........
01 00 04 00 00 01 08 00 - 00 00 0f 00 00 00 00 00 ................
05 00 05 00 03 05 04 00 - 00 00 0a 00 00 00 01 00 ................
0a 00 01 00 03 01 02 00 - 00 00 00 00 00 00 02 00 ................
KBuf: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
--------------------------------------------------------------------
<In> 0202 Opcode : 0065 Crs ID : 0x00000002 Db Length : 00268 Keynum : 00 Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: 45 78 53 74 01 00 00 00 - 00 00 00 00 01 00 00 00 ExSt............
00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
KBuf: ?? - .
<Out>0202 Status : 0000 Crs ID : 0x00000002 Db Length : 00035 Keynum : 00 Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: 01 00 00 00 01 00 00 00 - 17 00 00 00 43 3a 5c 44 ............C:\D
45 4d 4f 44 41 54 41 5c - 54 55 49 54 49 4f 4e 2e EMODATA\TUITION.
4d 4b 44 - MKD
KBuf: ?? - .
--------------------------------------------------------------------
<In> 0203 Opcode : 0065 Crs ID : 0x00000002 Db Length : 00008 Keynum : 00 Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: 45 78 53 74 02 00 00 00 - ExSt....
KBuf: ?? - .
 
<Out>0203 Status : 0000 Crs ID : 0x00000002 Db Length : 00008 Keynum : 00 Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: 00 00 01 00 00 00 07 00 - ........
KBuf: ?? - .
--------------------------------------------------------------------
<In> 0204 Opcode : 0001 Crs ID : 0x00000002 Db Length : 00000 Keynum : 00 Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: ?? - .
KBuf: ?? - .
 
<Out>0204 Status : 0000 Crs ID : 0x00000000 Db Length : 00000 Keynum : 00 Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: ?? - .
KBuf: ?? - .
 
---------------------------------------------------------------------
<In> 0205 Opcode : 0028 Crs ID : 0xffbc000c Db Length : 00000 Keynum : 00 Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: -
KBuf: -
 
<Out>0205 Status : 0000 Crs ID : 0xffbc000c Db Length : 00000 Keynum : 00 Clnt ID : 00 00 00 00 00 00 00 00 00 00 85 00 50 55 00 00
DBuf: -
KBuf: -
--------------------------------------------------------------------
Each operation shows values passed in to and returned by the MicroKernel. Input values are marked by <In> and output values are marked by <Out>; each is followed by a number that indicates the sequence in which the operations were processed, so that <Out> 0016 is the result of <In> 0016. The Opcode field shows the operation code performed; the Status field shows the returned status code.
Crs ID is the cursor ID, or handle, that the MicroKernel assigned to the request. This information can be helpful in debugging applications that support multiple clients or that support single clients with multiple cursors.
Db Length reflects the Data Buffer Length. Keynum reflects the Key Number. Clnt ID reflects the Client ID parameter used by the BTRVID and BTRCALLID functions. DBuf reflects the Data Buffer contents. KBuf reflects the Key Buffer contents. The trace file truncates the Data Buffer and Key Buffer contents, depending on the MicroKernel configuration.
*Note: To avoid a degradation in performance, only turn the Trace File setting on for short periods of time so that you can determine what operations are being handled by the MicroKernel.