Quick Links: Site Home | Documentation | QeDebugger Home

Debugger Command Range 121,000 to 121,999


The commands in this range are designed to be processed by database agents and return information about how the database engines are configured, current operating state and historic performance information.


121,003 DbStorage_TableSummary

This command is processed by fpos.dll if present and active. It returns overview information on a single table, such as fields, checksums of all data, table row counts and minimum/maximum values.

This packet can be useful for quickly determining if tables on different machines are likely to contain the same data.

The command requires the field 603 to be set to the table to report on. See examples below.

If you wish to return information about the individual rows by scanning the table you also need to include field 603 = 1. If field 603 is not present the table will not be scanned. Table scanning can on some configurations cause a pause/hang to the operating user so caution is advised. This mainly applies for large tables, small reference tables can be easily fully scanned sub second.

121,003 Reply Packet

Field#NameDescription
120StatusOverall status of request. 0=error, 1=success
40,000RowCountNumber of rows in table. Returned only if bit 1 in f601 set. (eg f601=2 or f601=3)
Per Field Information. Returned only if bit 0 in f601 set. (eg f601=1 or f601=3)
DMEG DMEF 40,001RowCountNumber of rows in this field analysis
DMEG DMEF 40,002RowMinimumMinimum value observed in this row. Numeric datatypes only
DMEG DMEF 40,003RowMaximumMaximum value observed in this row. Numeric datatypes only
DMEG DMEF 40,004RowAverageAverage of values observed in this row. Numeric datatypes only
DMEG DMEF 40,005RowDistinctCountNumber of disinct values observed. Numeric datatypes only. NULL may be counted as zero.
DMEG DMEF 40,006RowStdDev11 standard deviation of values observed
DMEG DMEF 40,007RowChecksumAA rolling checksum of the field values. The order the records is retrieved does not affect the checksum. This checksum is designed for high speed comparison, not robust use.

Example of DbStorage_TableSummary reply (JSON)

This example shows a request for JSON response for the table r_paymenttypes. f601 is set to "2" which says count and return the rows in the table only.

http://127.0.0.1:8095/gnap/J/buck?3=fieldpineinternal.fdl911.fetch&100=121003&603=r_paymenttypes&601=2
{
  "RootType":"DATS",
  "f100":121003,
  "f110":1584,
  "DMEG":[ {
	  "f10":"r_paymenttypes",
	  "RowCount":15,
	  "DMEF":[ 
		 { "f11":"code","f163":"code","f12":4,"f13":4},
		 { "f11":"typestr","f163":"typestr","f12":12800,"f13":20},
		 { "f11":"custspell","f163":"custspell","f12":12800,"f13":30},
		 { "f11":"saleeffect","f163":"saleeffect","f12":4,"f13":4},
		 { "f11":"visibleflags","f163":"visibleflags","f12":4,"f13":4},
		 { "f11":"control","f163":"control","f12":4,"f13":4},
		 { "f11":"rid","f163":"rid","f12":4,"f13":4},
		 { "f11":"stdid","f163":"stdid","f12":4,"f13":4}
	  ]}
	]}

Example of DbStorage_TableSummary reply (XML)

This example shows an XML request for complete table field details. Some response output has been removed for clarity

http://127.0.0.1:8095/gnap/M/buck?3=fieldpineinternal.fdl911.fetch&100=121003&603=r_paymenttypes&601=3
<DATS>
  <f100>121003</f100>
  <f110>3492</f110>
  <DMEG>
    <f10>r_paymenttypes</f10>
    <RowCount>15</RowCount>
    <DMEF>
      <f11>code</f11>
      <f163>code</f163>
      <f12>4</f12>
      <f13>4</f13>
      <RowCount>15</RowCount>
      <RowMinimum>1.000000</RowMinimum>
      <RowMaximum>22.000000</RowMaximum>
      <RowAverage>9.400000</RowAverage>
      <RowDistinctCount>15</RowDistinctCount>
      <RowStdDev1>6.811755</RowStdDev1>
      <RowChecksumA>27</RowChecksumA>
    </DMEF>
    <DMEF>
      <f11>typestr</f11>
      <f163>typestr</f163>
      <f12>12800</f12>
      <f13>20</f13>
      <RowChecksumA>-1876372582</RowChecksumA>
    </DMEF>
    <RowCount>15</RowCount>
  </DMEG>
</DATS>

121,006 Dbcdao2000_Overview

This command is processed by dbcdao2000.dll if present and active. It returns summary information about the environment the DLL is operating within and high level information about the database(s) connected.

121,006 Reply Packet

Field#NameDescription
General Information
5901TraceFilePathIf a trace file is active this field contains the full path name of the trace file
5902TraceFileNameIf a trace file is active this field contains just the file name
5903TraceFileLengthCurrent length of trace file in bytes

The main reply packet may also include DATA subpackets which contain information about each connected database. The information in a DATA packet primary comes from the API used to connect to the database

DATA packets may include a PERF subpacket which contains timing information to open/write/close/open/read/close a file in the same path as the database. On a well performing system these numbers will be very similar.

Field#NameDescription
DATA 110DbNameName of the database file or ODBC connection string.
DATA 111UpdateIndicates if the database can be written or is read only
DATA 112TransactionsIndicates if the database is capable of SQL transactions
DATA 113VersionVersion of the database file etc, where known
DATA 114CollatingOrderDefault sorting order
DATA 115QueryTimeoutQuery timeout for requests. Not all database engines support Query Timeout
DATA PERF 120TickStartGetTickCount() at beginning of test
DATA PERF 121TickOpenWriteGetTickCount() after the file has been created/opened for write access
DATA PERF 122TickWriteGetTickCount() after a small string has been written to the file
DATA PERF 123TickCloseWriteGetTickCount() after the file is closed
DATA PERF 124TickOpenReadGetTickCount() after the same file is immediately reopened in readwrite mode
DATA PERF 125TickReadGetTickCount() after the contents of the file is read
DATA PERF 126TickCloseReadGetTickCount() after the file is closed a second time
DATA PERF 144TickErrorFileGetTickCount() at the time an error on the file was encountered
DATA PERF 143ErrorFileDescription of the error on the file encountered
DATA PERF 142TickErrorGetTickCount() at the time a general error was encountered
DATA PERF 141ErrorDescription of the general error

The main reply packet may also include CONN subpackets which contain information about connected databases. The information in a CONN packet primary comes from structures used by DbcDao2000 to manage the database itself. There will usaully be both a DATA and CONN packet present for each database.

Field#NameDescription
CONN 110DbTypeCodeId of database type
CONN 111DbTypeTextual version of CONN.110
CONN 112FlagOdbc
CONN 113FlagIsolate
CONN 114FlagSqlServer
CONN 115FlagDummyRead
CONN 116FlagTxnIgnore
CONN 117KeywordQuoting
CONN 118Oracle
CONN 119Flags
CONN 120CurOpenRONumber of read only cursors currently open
CONN 121CurOpenRWNumber of read write cursors currently open
CONN 122DiscMsgLogged
CONN 123TamperState
CONN 124CacheLimitNumber of rows to cache on load if the database supports this
CONN 125ConnectStatus
CONN 126UseDisconnectIs disconnecting from idle databases enabled
CONN 127DisconnectIntervalNumber of idle seconds before a database will disconnect
CONN 128LastUsedWhen this database was last used by the application
CONN 129FlagMetaDirect
CONN 130FlagAllowIdentity
CONN 131TotalOpenROTotal number of read only requests performed
CONN 132TotalOpenRWTotal number of read write requests performed
CONN 133TotalInsertsTotal number of insert operations
CONN 134TotalEditsTotal number of edit operations
CONN 135TotalDeletesTotal number of delete operations
CONN 136TotalUpdatesTotal number of requests to commit/update database
CONN 137TotalUpdateErrorsNumber of errors encountered during updates. Errors can occur in normal operation, so a non zero value does not necessarily mean there is a problem

The CONN packet may contain HIST packets which detail the recent history of Sql statements issued.

Field#NameDescription
CONN HIST 110SqlActual SQL statement for database. This field might be editted from actual in some cases, specifically if sensitive (customer type) information could be revealed
CONN HIST 111DtDate time the sql started processing
CONN HIST 112OpenTimeNumber of milliseconds the database engine took to respond to the "open" phase of the request. This is generally a good indicator to database performance, although variation will often be seen.

The CONN packet may contain ERRO packets which detail the recent errors trapped

Field#NameDescription
CONN ERRO 110TextError text reported by the database engine

Example of dbcdao2000_Overview reply (XML)

  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
- <DATS>
    <DATA>
      <DbName>C:\customers\dev1901\fpos.mdb</DbName> 
      <Update>1</Update> 
      <Transactions>1</Transactions> 
      <Version>4.0</Version> 
      <CollatingOrder>1033</CollatingOrder> 
      <QueryTimeout>9000</QueryTimeout> 
      <FILE>
        <Size>1118457856</Size> 
        <Attibutes>32</Attibutes> 
      </FILE>
      <PERF>
        <TickStart>14091640</TickStart> 
        <TickOpenWrite>14091640</TickOpenWrite> 
        <TickWrite>14091640</TickWrite> 
        <TickCloseWrite>14091640</TickCloseWrite> 
        <TickOpenRead>14091640</TickOpenRead> 
        <TickRead>14091640</TickRead> 
        <TickCloseRead>14091640</TickCloseRead> 
      </PERF>
    </DATA>
    <CONN>
      <DbTypeCode>1</DbTypeCode> 
      <DbType /> 
      <FlagOdbc>0</FlagOdbc> 
      <FlagIsolate>0</FlagIsolate> 
      <FlagSqlServer>0</FlagSqlServer> 
      <FlagDummyRead>1</FlagDummyRead> 
      <FlagTxnIgnore>0</FlagTxnIgnore> 
      <KeywordQuoting>1</KeywordQuoting> 
      <Oracle>0</Oracle> 
      <Flags>0</Flags> 
      <CurOpenRO>0</CurOpenRO> 
      <CurOpenRW>0</CurOpenRW> 
      <DiscMsgLogged>0</DiscMsgLogged> 
      <TamperState>1</TamperState> 
      <CacheLimit>700</CacheLimit> 
      <ConnectStatus>1</ConnectStatus> 
      <UseDisconnect>1</UseDisconnect> 
      <DisconnectInterval>1335.000000</DisconnectInterval> 
      <LastUsed>02-Jul-2016 09:35:15</LastUsed> 
      <FlagMetaDirect>0</FlagMetaDirect> 
      <FlagAllowIdentity>0</FlagAllowIdentity> 
      <TotalOpenRO>35</TotalOpenRO> 
      <TotalOpenRW>10</TotalOpenRW> 
      <TotalInserts>0</TotalInserts> 
      <TotalEdits>5</TotalEdits> 
      <TotalDeletes>0</TotalDeletes> 
      <TotalUpdates>5</TotalUpdates> 
      <TotalUpdateErrors>0</TotalUpdateErrors> 
      <HIST>
        <Sql>Select * from Sales where completedDT is NULL and sid >= 8388608 and sid <= 16777215</Sql> 
        <Dt>02-Jul-2016 09:35:15</Dt> 
        <OpenTime>203</OpenTime> 
      </HIST>
      <HIST>
        <Sql>select * from settings settings where KeyName='SysMaxDbCheckFirstWarn' and lane=1 and location=4</Sql> 
        <Dt>02-Jul-2016 09:35:14</Dt> 
        <OpenTime>0</OpenTime> 
      </HIST>
      <ERRO>
        <Text>The Microsoft Jet database engine cannot find the input table or query 'versiondist'. Make sure it exists and that its name is spelled correctly.</Text> 
      </ERRO>
      <ERRO>
        <Text>RSOpenRO: RS=01522210 SQL=select * from versiondist</Text> 
      </ERRO>
    </CONN>
    <f100>121006</f100> 
    <f110>2128</f110> 
  </DATS>

121,007 Dbcdao2000_Metadata

This command is processed by dbcdao2000.dll if present and active. It returns complete metadata of the database(s) such as tables, fields and indexes.

The response is intended only to show user level information, system level tables may be excluded

121,008 Reply Packet

This reply packet is not yet fully documented.

Field#NameDescription
+DMEGThese packets contain information about a group of tables, aka a table
+DMEFThese packets contain information about a single field in a DMEG (table)
+DMEKContains information about an index on a DMEG (table)

121,008 Dbcdao2000_Users

This command is processed by dbcdao2000.dll if present and active. It attempts to return information about connected users on the database. This is especially useful for Access (Jet) databases being shared over the network.

121,008 Reply Packet

This command returns USER subpackets in the reply.

Field#NameDescription
USER 100ComputerNameName of the computer for this user
USER 101UserNameName of the database user. This is not necessarily a PC login name. Actual contents varies by database type
USER 102IPAddrIP address of users computer, if possible.

Example of dbcdao2000_Overview reply (XML)

  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
  <DATS>
    <USER>
      <ComputerName>DEVDELL</ComputerName> 
      <UserName>admin</UserName> 
      <IPAddr>127.0.0.1</IPAddr> 
    </USER>
    <USER>
      <ComputerName>OPSUPPORT350B</ComputerName> 
      <UserName>admin</UserName> 
      <IPAddr>10.50.23.17</IPAddr> 
    </USER>
    <f100>121008</f100> 
    <f110>2128</f110> 
  </DATS>

121,009 Dbcdao2000_FullStats

This command is processed by dbcdao2000.dll if present and active. It opens the database file directly (read only, non locking) and attempts to decode the internal structure. From this it is able to report where the space is being used in the database. The output is not intended for direct human consumption and may need further processing to be intelligible.

121,009 Reply Packet

This reply packet is not yet fully documented.


121,010 Dbcdao2000_Fix

This command is processed by dbcdao2000.dll if present and active. It decodes and processes a range of commands and changes various attributes in the database.

121,010 Command Packet

Field#NameDescription
f602The command to be executed.

83 - change a field attributes to AllowZeroLength

f603The target table
f607The target field

121,010 Reply Packet

Example - Changing field locations.postcode to AllowZeroLength in a running Point of Sale

Command:
http://IP:port/gnap/M/buck?3=fieldpineinternal.fdl911.fetch&100=121010&602=83&603=locations&607=postcode
Response (Success)
<DATS>
	<f100>121010</f100> 
	<f110>268</f110> 
</DATS>