In command file mode, a command file written by the user is processed sequentially. The command file can contain any sequence of Loader commands and SQL statements.
You can start Loader CLI in command file mode by entering the following command:
Syntax
loadercli -b <command_file>
If you want to transfer additional information when Loader CLI is called, use the corresponding options.
Syntax
loadercli -b <command_file> [<connect_options>] [<in_output_options>] [<version_options>]
Enter the name of the command file after option –b. You can also enter the requested options for establishing the connection, for input and output control and for version queries. Loader reads the Loader commands and SQL statements from the specified command_file and transfers them to the Loader server. You can also create a command file by generating the design data in transport mode.
<command_file> |
Command file |
-d <database_name> |
Name of database |
-u [<database_user>[,<password>]] |
Name and password of database user |
-n <database_computer>[:<port>] |
Name of database computer |
-s <schema_name> |
Name of schema |
-e <encryption> |
Encryption method |
More information: Opening a Database Session: Loader CLI Options
-o[w|a] <file_name> |
Name of output file |
-cs <separator> |
Command separator |
-ps<number> <string> |
Substitution parameter |
-E <number> |
Maximum number of errors allowed |
More information: Input and Output: Loader CLI Options
-V |
Version of Loader server |
-v |
Version of Loader CLI |
-R <installation_path> |
Directory containing the programs that are dependent on the version of the database software |
More information: Determing Version Information: Loader CLI Options
Example
loadercli -b command.dat -d demodb -u mona,red –E 20
Loader establishes a connection to the database DEMOB for the user MONA. Loader processes the Loader commands and SQL statements contained in the command file command.dat. If errors occur (return code <> 0), processing of the command file is terminated after 20 error messages. For more examples, see the Loader Tutorial, Command File Mode.