Command-line Options

From InterBase
Jump to: navigation, search

Only the initial characters in an option are required. You can also type any portion of the text enclosed in brackets, including the full option name. For example, specifying -n, -no, or -noauto has the same effect.

The table below lists the availabel isql command-line options:

Option Description

-a

Extracts all DDL for the named database.

-c[ache]

Set number of cache buffers for this connection to the database; see Default Cache Size Per isql.

-d[atabase] <name>

Used with -x; changes the CREATE DATABASE statement that is extracted to a file.

  • Without -d, CREATE DATABASE appears as a C-style comment and uses the database name specified on the isql command line.
  • With -d, isql extracts an uncommented CREATE DATABASE and substitutes <name> as its database argument.

-e[cho]

Displays (echoes) each statement before executing it.

-ex[tract]

Same as -x

-i[nput] <file>

Reads commands from an input file such as a SQL script file instead of from standard input.

  • input files can contain -input commands that call other files, enabling execution to branch and then return.
  • isql exits (with a commit) when it reaches the end of the first file.
  • In interactive sessions, use -input to read commands from a file.

-m[erge_stderr]

  • Merges stderr output with stdout.
  • Useful for capturing output and errors to a single file when running isql in a shell script or batch file.

-names <character set name>

Specifies the character set to use for current database attachment. Default is NONE.

Note: Any SET NAMES call in isql or inside an SQL script overrides the character set that you provide in the command-line.

-n[oauto]

Turns off automatic commit of DDL statements; by default, DDL statements are committed automatically in a separate transaction.

-nowarnings

Displays warning messages if, and only if, an error occurs (be default, isql displays any message returned in a status vector, even if no error occurred).

-o[utput] file

Writes results to an output file instead of to standard output; in interactive sessions, use -output to write results to a file.

-pas[sword] password

Used with -user

  • Specifies a password when connecting to a remote server.
  • For access, both <password> and <user> must represent a valid entry in the security database.

-page[length] <n>

Prints column headers every <n> lines instead of the default 20.

-q[uiet]

-r[ole] <rolename>

Grants privileges of role <rolename> to <user> on connection to the database.

-s[qldialect] <n>

Interprets subsequent commands as dialect <n> until end of session or until dialect is changed by a SET SQL DIALECT statement.

  • For <n> = 1, commands are processed as in InterBase 5 or earlier.
  • For <n> = 2, elements that have different interpretations in dialect 1 and 3 are all flagged with warnings or errors to assist in migrating databases to dialect 3.
  • For <n> = 3, all statements are parsed as current InterBase SQL semantics: double quotes are delimited identifiers, DATE data type is SQL DATE, and exact numerics with precision greater than 9 are stored as INT64.

-t[erminator] <x>

Changes the end-of-statement symbol from the default semicolon (;) to <x>, where <x> is a single character or any sequence of characters; deprecated in InterBase 7.

-u[ser] <user>

Used with -password; specifies a user name when connecting to a remote server.

  • For access, both <password> and <user> must represent a valid entry in the security database.

-x

Extracts DDL for the named database; displays DDL to the screen unless redirected to a file.

-z

Displays the software version of isql.

See Also

Personal tools
Previous Releases:
In other languages