Entering content frame

 Call with the Loader CLI (LOADERCLI) 

You can call the Loader using the Loader CLI client (LOADERCLI).

Call

loadercli [<options>]

You can specify options when you call the Loader.Note the following options in particular:

·        You can use the option -r to decide whether you want to use the Loader Server embedded in the Loader CLI, or the Loader Server that is separate from the Loader CLI.

·        You can use the option -b to specify the operating mode. This determines whether the commands and SQL statements are processed interactively or in the background.

Process Flow

Before it connects to the database instance, the Loader CLI first evaluates the relevant options. The commands and SQL statements in the command file (or those entered interactively) are then executed.

Calling the separate Loader (server and client in one program), which then processes the commands and SQL statements in the background

loadercli -d demodb -usqltravel01,travel01 –b command.dat -E 20

The Loader creates a connection to the database instance demodb for the user sqltravel01. The Loader processes the commands and statements contained in the command file command.dat. If errors occur (return code <> 0), the processing of the command file is terminated as soon as 20 error messages occur.

Calling the Loader Server separately from the Loader CLI on the local host. The Loader Server then processes the commands and SQL statements in the background.

loadercli –d demodb -u sqltravel01,travel01 –r loaderhost -b command.dat -E 20

The Loader CLI creates a connection to the Loader Server on the local host loaderhost. The Loader Server creates a connection to the database instance demodb for the user sqltravel01. The Loader processes the commands and statements contained in the command file command.dat. If errors occur (return code <> 0), the processing of the command file is terminated as soon as 20 error messages occur.

Calling the separate Loader (server and client in one program), which then processes the commands and SQL statements interactively

loadercli –d demodb -u sqltravel01,travel01

The Loader creates a connection to the database instance demodb for the user sqltravel01. The Loader then waits for the commands and SQL statements in the command line, and processes them.

Result

The Loader executes the commands and SQL statements. The Loader writes a log file.

Errors

If errors occur when commands or SQL statements are processed, the way in which the Loader responds depends on whether it is running interactively or in the background.

If you are using the Loader in interactive mode, it registers the error, and then waits for your next entry.

If you are using the Loader in the background, it stops processing commands and SQL statements after a defined number of errors, and exits.You can use the option –E to define the number of errors that the Loader ignores before it stops processing commands.If you do not use the option –E, the Loader stops running after the first command with an error. You cannot react to the errors when you are using the Loader CLI.

If you want to respond to errors, the Loader functions are available as a library for the Perl and Python script languages.

See also:
Call with the Perl Interface of the Loader
Call with the Python Interface of the Loader

 

Leaving content frame