Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

ctdbdistinct - Key Count Utility

Operational Model

  • Client

ctdbdistinct is a utility for managing distinct key counts in SQL tables and databases.

Command Syntax

ctdbdistinct.exe -s server -c command [-d database][-t table][-u user][-p passwd]

Options

  • -c command where command is one of:
    • enable - enables distinct key counts
    • check - validates existing distinct counts
    • repair - resets existing distinct counts
  • -d database target database (all tables)
  • -s server source c-tree Server name (may be "local" for direct access)
  • -t table target table (one table)
  • -u uid user name on source server
  • -p upw user password on source server

The check command operates while the table(s) may be in use by other users. Tables that fail the validation are logged to stdout.

The repair command operates while the table(s) may be in use by other users, though update operations are blocked via a table read lock.

The enable command is intended for existing tables or databases created without distinct key counts.

Example 1:

Check distinct key counts on all files in the ctreeSQL database.

ctdbdistinct -s FAIRCOMS -c check -d ctreeSQL -u admin -p ADMIN

Example 2:

Repair distinct key counts on one table ./ctreeSQL.dbs/mytable.dat

ctdbdistinct -s FAIRCOMS -c repair -t ./ctreeSQL.dbs/mytable.dat -u admin -p ADMIN

TOCIndex