The dbload utility loads records from an input data file into tables of a database. The format of the data file is specified by a record description given in an input commands file.
Operational Model:
Client
The dbload command does not directly specify an input file, but instead names a commands file that in turn specifies data input files. The dbload command accepts the commands file name, the database name, and a list of command options.
Syntax
dbload -f commands_file [ options ] database_name
-f commands_file - Specifies the file containing dbload commands.
options - One or more of the options as described below
database_name - Name of the database, including the complete reference to the c-tree server:
[port@] [server machine name | ip : ]database_name
Options
-u user_name - The user name c-treeSQL uses to connect 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. If omitted, the default value depends on the environment. (On UNIX, the value of the DH_PASSWD environment variable specifies the default password.)
-z maximum multiple inserts - The maximum number of records to be inserted at one time in each bulk insert (used to improve performance)
-l logfile - Specifies the file into which the error logging is done. stderr is the default. dbload also writes statistics to the file:
Number of records read
Number of records skipped
Number of records loaded
Number of records rejected
-b badfile - The file into which the bad rows that were not loaded, are written. By default badfile is put in the current directory.
-c commit_frequency - Store the specified number of records before committing the transaction. The default frequency is 100 records.
-e maxerrs - The maximum number of tolerable errors. The default number is 50 errors.
-s skipcount - Skip the specified number of rows in the first data file. If multiple files are specified, the rows are skipped only in the first file. The default number is zero rows.
-m maxrows - Stop storing rows at the specified number.
-n - Parse the commands file and display errors, if any, without doing the database load. If the parsing is successful, the following message displays on stdout: "No errors in the commands file."
-S BASIC | <cert_filename> - Basic TLS encryption or cross checked authentication using <cert_filename>
Unicode
The dbdump Data Unload and dbload Data Load utilities properly dump and load data out of a Unicode-enabled FairCom DB SQL Server. The commands file must be in ASCII format. The output file generated by dbdump is in Unicode format with an optional Byte Order Mark (BOM) indicating the Unicode encoding form (using the ‑B command-line switch).
The input file for dbload needs to be in Unicode (native "wchar" encoding form) with an optional BOM, in which case the utilities check for the proper format.