Product Documentation

FairCom ISQL

Previous Topic

Next Topic

Starting Interactive SQL

Start FairCom DB SQL ISQL by issuing the ISQL command at the shell prompt. FairCom DB SQL invokes ISQL and displays the ISQL> prompt:

# isql sampledb

c-treeSQL Interactive Interpreter

ISQL>

Issue FairCom DB SQL statements at the ISQL> prompt and terminate them with a semicolon. You can continue statements on multiple lines. ISQL automatically prompts for continuation lines until you terminate the statement with a semicolon.

To execute host operating system commands from the FairCom DB SQL ISQL prompt, type HOST followed by the operating system command. After completion of the HOST statement, the ISQL> prompt returns. To execute FairCom DB SQL scripts from FairCom DB SQL ISQL, type ‘@’ followed by the name of the file containing FairCom DB SQL statements.

To exit the FairCom DB SQL ISQL, type EXIT or QUIT.

You can supply optional switches and arguments to the FairCom DB SQL ISQL command.

Syntax

isql [-s script_file] [-u user_name] [-a password] [-S BASIC | <cert_filename>] [connect_string]

Arguments

-s script_file
The name of a FairCom DB SQL script file that FairCom DB SQL executes when it invokes FairCom DB SQL ISQL.

Note: For Windows platforms, if the file name has a space, such as:
test script.sql
The file name must be enclosed in doubles quotes, such as:
isql -s “test script.sql” testdb

  • -u user_name
    The user name FairCom DB SQL uses to connect to the database specified in the connect_string. FairCom DB SQL verifies a user name against a corresponding password before it connects to the database. If omitted, the default value depends on the environment. (On Unix, the value of the DH_USER environment variable specifies the default user name. If DH_USER is not set, the value of the USER environment variable specifies the default user name.)
  • -a password
    The password c-treeSQL uses to connect to the database specified in the connect_string. c-treeSQL verifies the password against a corresponding user name before it connects to the database. If omitted, the default value depends on the environment. (On Unix, the value of the DH_PASSWD environment variable specifies the default password.)
  • -S -S - TLS/SSL options for secure connection
    • BASIC - Basic TLS/SSL encryption
    • <cert_filename> - Client cross-check certificate for TLS authentication
  • connect_string
    A string that specifies which database to connect to. The connect_string can be a simple database name or a complete connect string. For example, to connect to a local database named ‘myDatabase’, you would use the following syntax:

# isql -u ADMIN -a ADMIN myDatabase

To connect to a remote database named c-treeSQL, you would use the 6597@remotehost:database syntax as follows:

# isql -u ADMIN -a ADMIN 6597@hotdog.faircom.com:ctreeSQL

See the CONNECT statement in the c-treeSQL Reference Manual for details on how to specify a complete connect string. If omitted, the default value depends on the environment. (On Unix, the value of the DB_NAME environment variable specifies the default connect string.)

Local User Configuration

ISQL first looks for a file sql_conf in a ./lib subdirectory of your current working directory. This is the area where you call it, not where the executable file resides. A symbolic link is recommended . For example, place a symbolic link for isql in /usr/local/bin (Linux/Unix) and then each user can have an individual ./lib/sql_conf in their working directory.

sql_conf contains a series of line each with this syntax: <keyword>=<value>

Supported configurations:

ISQL_DEFAULT_ISOLATION values: 0,1,2,3

ISQL_AUTOCOMMIT values: Y, ON

ISQL_HISTORY values: number

ISQL_CMD_LINES values: number

ISQL_PAUSE values: Y, ON

ISQL_TIME values: Y, ON

ISQL_REPORT values: Y, ON

ISQL_LINESIZE values: number

ISQL_PAGESIZE values: number

ISQL_ECHO values: Y, ON

ISQL_OUTPUT values: N, OFF

TOCIndex