List of Options and Switches

Top  Previous 

The following is the full list of options available, along with the corresponding command-line switches that could be used instead, if not provided in a control file.

Keyword

Argument[s]

Switch
Equivalent

Purpose

charset=NAME

NAME is an identifier

-t NAME

Sets the client character set.  NAME is the identifier or alias of a character set known to the database

dateform=N

N is a number

-f N

N identifies the external date or date/time format of input or output date literals.  The numbers and the corresponding format templates are listed in the topic Date/Time Data.

db=ARG

ARG is an unquoted string that is the fully qualified path or alias to the database, according to platform, server model and whether it is local or remote.

-d ARG

Targets the database to which dbFile must connect in order to write or read the data.

 


Don't forget that, on POSIX, a local connection cannot be made if the server is Superserver and, on Windows, Classic 1.5.x versions cannot take a local connection.

delimiter=C
or
delimiter=xNN

C is an ASCII character, which may be in hex notation as xNN for special characters; e.g., x08 for TAB

-c C

Required for delimited text input or output, it takes as its argument the character that is used as the field delimiter.  Refer to the notes in the introduction regarding delimiter usage.

direction=C

In a control file, C is a character which must be either i  or o

For a switch, the argument NAME is a string which is the fully qualified or relative path to the data file

-i  NAME

or

-o NAME

Specifies whether the operation is an import or an export.

In a control file, i specifies an import, o an export.  The input or output file is specified in a separate options attribute, file=NAME
On a command-line, the -i or -o switch takes NAME as its argument.

The direction= directive may be omitted if you use the STARTDATA feature to embed the input data in your control file.

discards=NAME

NAME is the relative or fully-specified path to a file

 

Discards from input processing can be sent to a file.  On POSIX, the default is /dev/null.

errors=N

Stop loading after N errors

 

Causes the import or export operation to stop after N errors have occurred.  Default is 1 (stop on the first error).

excel

 

No arguments

-e

Informs dbFile that the file is in Excel format.  For input files dbFile will ignore the first line.  For output files, it will generate column names as the first line of the file.

file=NAME

NAME is the relative or fully-specified path to  the input or output file

Argument to
the -i or -o switch

N.B. the control file can also be the input file - see the topic about the STARTDATA directive.

fractComma

No arguments

-m

Fractional numbers use a comma as the decimal point. The default decimal separator is a period.

hyphenateDate

No arguments

-h

Use hyphens instead of the default slashes as element separators for output dates.

lineend=C

C is a character, one of M, P or U

-l C

Indicates the line-break type (M for Mac, P for Windows/DOS, U for Unix).  The default is the standard line-break type applicable to the operating system.

logfile=NAME

NAME is a relative or fully-specified file path

-s NAME

Path to the file name for logging both stdout and stderr.  On POSIX, stdout and stderr are the default.  On Windows, no logging will be provided unless the logfile option or -s switch is explicitly supplied.

lrecl=N

N is the length of a fixed-length input record, where there are no line breaks separating records

 

Used only for fixed size records only and only those with with no line endings (like some IBM output formats).  There is a caveat:  there can be no short records, except the last, and applying the wrong value to N will create data in your database that is wrecked beyond repair.

pad=C

C is a single character to be used as padding

 

 

For fixed output, use the character specified by C to fill in any parts of the output record not described by either SQL output or filler fields. Escaping is valid.

For information about escape characters, refer to the topic Escaping Shell-sensitive Characters.

passwd=NAME

NAME is an unquoted string.  It is case-sensitive

-p NAME

Firebird login user name.  Can be omitted if the ISC_USER and ISC_PASSWORD environment variables are set

quote=X    

X must be either a single or double quote character

NOTE :: If you need to specify single quotes then only the control file method supports it.

-q

Switch takes no argument:  only double-quotes are available

Valid only if the
-c switch is used

For use only if the delimiter option is used.  Specifies the style of quote used for quoting strings.  Strings only need to be quoted if the delimiter character potentially may occur in the string.  If the quote option is specified, all output strings will be quoted ALWAYS.

Numbers do not need to be quoted and will never appear in output with quotes.

rows=N

N is a number

 

Stop the import or export after after N rows have been processed.  Default: no limit on the number of rows to process.

short_ok

No arguments

-z

The default is to treat short input records as errors and not to load them (skip them and optionally log them).  The effect of short_ok is to specify that short records are to be loaded, with missing fields treated as null.

skip=N

N is a number

 

Skips N records in the input file or the SQL query output before commencing the import or export process.

startcount=N

N is a number

N

Uses N as the base for generated filler counts.  As each record  is processed, N is incremented by 1.  The default base N is 0.

timestamp

No arguments

 

Include time in generated date/time fields (default is just date)

trans=N

N is a number

 

Commit the transaction after every N rows of input.  Default: 5000.  The minimum for N is 100, maximum 20000.

user=NAME

NAME is a string.

If the user was created in double-quotes AND has any characters that are not 7-bit upper-case then it must be double-quoted and quote symbols may need to be escaped.

-u NAME

Firebird login user name.  Can be omitted if the ISC_USER and ISC_PASSWORD environment variables are set.

The user must be one that has the appropriate privileges to the database tables and/or objects that will be accessed by the DSQL statement. 

variables=N

N is a number, viz., the number of input or output parameters

-n N

For input this directive is required.  For output, you may omit it if there are no filler fields.  If provided, it is checked against columns specified in the query.


For output, if you have a SELECT * query as your SQL, you may still include a variables= descriptor.  If N is unknown in these circumstances, use an escaped questionmark (\?) for the N argument.

verbose

No arguments

-v

Execute the process in verbose mode.  The default is to report only errors.

xtra_fields=N

N is a number

 

A count of the extra "filler" fields to be built for output. For information about filler fields, see the topic Filler Fields for Exports.

year=NN

NN is a number representing the last 2 digits of a year

-y NN

Treat any 2-digit year in input dates after this number as belonging to the previous century