Product Documentation

SQL Operations Guide

Previous Topic

Next Topic


The sqlverify utility can be used to diagnose low lying FairCom DB SQL issues and relational integrity. This utility connects to FairCom DB SQL databases and runs multiple tests and internal consistency checks. If problems or unusual results are detected they are logged to verify.log. The syntax for using this utility is as follows:

sqlverify [-s address][-p port][-d database][-n name][-f][-v] -a password

Valid Options:

  • -s: Machine name(default: localhost)
  • -n: Server name (default: FAIRCOMS)
  • -p: SQL Port (default: 6597)
  • -d: Database (default: ctreeSQL)
  • -f: Fix certain problems
  • -v: verbose
  • -a: Admin Password

An example verify.log file might look like the following:

Info: Table admin_custmast index 6

Info: Full Key Distinct Count was 81917, now 46218

Info: Table admin_custmast index 7

Info: Full Key Distinct Count was 81917, now 48939

Error: table admin_ordritem, index 0 holds 0 keys. Expected 1(1). Rebuild

List of inconsistencies:

table | index | field | errorcd | errormsg

1 - syscolumns | | logicalid | 4019 | Mismatch column nullflag

This example demonstrates an error as shown on line 5 of the output. In this case a rebuild of the index is indicated. Consult with FairCom's support team should you have any questions about the output of this utility against your database. The last section of inconsistencies should always be reported to FairCom's support team for investigation.