Product Documentation

Database Integrity Utilities

Previous Topic

Next Topic

ctsqlcdb - FairCom DB SQL Database Maintenance Utility

Operational Model:

  • Client

Usage

ctsqlcdb <command with args> [<servername>] [<user> <password>]]

Valid Commands:

  • -add <dbname>: Adds a reference to an existing database
  • -addctdb <dbname> <path>: Adds a reference to an existing CTDB database located at <path>
  • -create <dbname> [-casesensitive|-cs|-caseinsensitive|-ci]: Creates a new database
  • -create_preimage: Creates a preimage only database (supporting only atomicity; no transaction logs for durability.)
  • -drop <dbname>: Removes a reference to an existing database
  • -exist <dbname>: Returns 1 if the database exists, 0 if not, 2 on error
  • -list <servername>: Lists databases available from the server

Copy an existing database and add a reference to the new copy:

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

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

    where:

    • <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 encoded password file. Encoded 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
USERID ADMIN
; User Password
PASSWD <pass>

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

TOCIndex