Product Documentation

SQL Operations Guide

Previous Topic

Next Topic

ctsqlcdb - FairCom DB SQL Database Maintenance Utility

Operational Model:

  • Client


ctsqlcdb <command> <dbname> [<servername>]

Valid Commands:

  • -add: Adds a reference to an existing database
  • -create: Creates a new database
  • -drop: Removes a reference to an existing database
  • -exist: Returns 1 if database exists, 0 if not, 2 on error
  • -list <servername>: Lists databases available from the server
  • -create_preimage: Creates a preimage only database (supporting only atomicity; no transaction logs for durability.)

Or the following command syntax copies an existing database and adds a reference to the new copy:

  • -copy <dbname> <newname> [<servername>]

    -copy also includes non c-tree files when present in the database directory area.


    • <dbname> is the database name, and
    • <servername> is the optional FairCom DB SQL name.

The ‑copy command supports virtual tables (called "Multi Record Tables" or "MRT tables").

This utility supports the use of an encrypted password file. Encrypted password files keep user IDs and passwords from plain view when the utility is used within a script file. They are created with the ctcmdset utility. The plain text form of the file should be:

; User Id
; User Password
PASSWD <pass>

Use the -1 option to specify the name of the encrypted file.