Product Documentation

SQL Operations Guide

Previous Topic

Next Topic

ctpath - Change Internal (SQL) Database Paths

The ctpath utility allows you to adjust the path in the dictionary after extracting the SQL database directory from a backup and renaming it. This utility is command-line only, which allows it to run on all supported operating systems. It also includes a command line switch -v for verbose output.

Changes the internal SQL dictionary paths of database locations.

Syntax

ctpath [-s server] [-u user] [-p password] [-d database] [-v] from-path-prefix to-path-prefix

Options:

  • -s server - c-tree Server name
  • -u user - user name
  • -p pw - user password
  • -d database - database name
  • -v - verbose
  • from-path-prefix - path prefix to be replaced
  • to-path-prefix - path prefix to use as replacement

Description

  • When ctpath is executed without command line arguments, you get the full GUI version. ctpath GUI (without command-line arguments) always returns 0.
  • When ctpath is executed with command line arguments, it runs silently and all error messages are written in a log file CTPATH.LOG stored in the same directory as the ctpath file.Error messages are appended to CTPATH.LOG file with a date and time stamp to each error message.
  • ctpath with command line arguments returns 0 when the execution detected no errors, or a value different from 0 when errors were detected and the error messages are written to CTPATH.LOG.
  • If you omit the -d database switch, all databases in the session will be scanned.
  • Command-line switches should start with a '-' or '/' character. Command line switches accept both lowercase and uppercase characters, e.g. -s or -S are the same.
  • Command-line switches may not have optional spaces between the switch and the argument. Example: -s FAIRCOMS is not the same as -sFAIRCOMS.
  • Command-line switches may be entered in any order, but the from-path-prefix must appear before the to-path-prefix.
  • The -r switch indicates to repeat the substitution and replace all occurrences of the searched path and not just the first one.
  • The -v command-line switch indicates verbose output.

TOCIndex