Syntax of the dbload command
The dbload command loads data into databases or tables.
Element | Purpose | Key Considerations |
---|---|---|
-c command file | Specifies the file name or path name of a dbload command file | References: For information about building the command file, see Command file for the dbload utility. |
-d database | Specifies the name of the database to receive the data | Additional Information: To use more than the simple name of the database, see Database Name . |
-e errors | Specifies the number of bad rows that dbload reads before terminating. The default value for errors is 10. | References: For more information, see Bad-row limit during a load operation. |
-i ignore rows | Specifies the number of rows to ignore in the input file | References: For more information, see Rows to ignore during a load operation. |
-k | Instructs dbload to lock the tables listed in the command file in exclusive mode during the load operation | References: For more information, see Table locking during a load operation. You cannot use the -k option with the -r option because the -r option specifies that no tables are locked during the load operation. |
-l error log file | Specifies the file name or path name of an error log file | If you specify an existing file, its contents are
overwritten. If you specify a file that does not exist, dbload creates the file. Additional Information: The error log file stores diagnostic information and any input file rows that dbload cannot insert into the database. |
-n commit interval | Specifies the commit interval in number of rows
The default interval is 100 rows. |
Additional Information: If your database
supports transactions, dbload commits a transaction after the
specified number of new rows is read and inserted. A message appears
after each commit. References: For information about transactions, see the IBM Informix Guide to SQL: Tutorial. |
-p | Prompts for instructions if the number of bad rows exceeds the limit | References: For more information, see Bad-row limit during a load operation. |
-r | Prevents dbload from locking the tables during a load, thus enabling other users to update data in the table during the load | Additional Information: For more information,
see Table locking during a load operation. You cannot use the -r option with the -k option because the -r option specifies that the tables are not locked during the load operation while the -k option specifies that the tables are locked in exclusive mode. |
-s | Checks the syntax of the statements in the command file without inserting data | Additional Information: The standard output displays the command file with any errors marked where they are found. |
-V | Displays the software version number and the serial number | None. |
-version | Extends the -V option to display additional information about the build operating system, build number, and build date | None. |
-X | Recognizes HEX binary data in character fields | None. |
Tip: If you specify part (but
not all) of the required information, dbload prompts you for
additional specifications. The database name, command file, and error
log file are all required. If you are missing all three options, you
receive an error message.
dbload command example
The following command loads data into the stores_demo database
in the turku directory on a database server called finland:
dbload -d //finland/turku/stores_demo -c commands -l errlog