Entering content frame

Procedure documentation Call Options of the Loader CLI Locate the document in the library structure

You can call the Loader using the Loader CLI Client (LOADERCLI). By specifying the corresponding options, you can control the settings of the operating mode and transfer connection information and so on.

Procedure

You can specify options when you call the Loader CLI.

loadercli [<options>]

Call up the help to get an overview of all options.

loadercli -h

Explanation

The input to the Loader can happen via three operating modes: interactive transport mode, command file mode and session mode.

     In transport mode, the user is interactively prompted for input to export application data from one database instance and import it into another database instance. The input parameters and the loader configuration file are used to generate and execute the syntax of the loader commands.

The generated Loader commands are optionally displayed on the console and the user can then use them as templates for commands he has written himself. In the actual transport mode, no knowledge of the loader syntax is required.

     In command file mode, a command file written by the user is processed sequentially. In contrast to transport mode, the command file can contain any sequence of Loader commands and SQL statements. In most application cases, the Loader commands generated in transport mode only need to be slightly modified to create a command file.

     In session mode the user can transfer the Loader commands and SQL statements to the Loader directly via the console.

Options for Setting up the Operating Mode

The option that is required for determining the required operating mode always has to be specified.

options

-p [<package_name>]

Loader CLI is transferred into transport mode if you specify option -p

See also: Transport Mode

 

-b <command_file>
[<connect_options>]
[<in_output_options>]
[<version_options>]

Loader CLI is transferred into command file mode if you specify option –b

See also: Command File Mode

<command_file>

Command file

[<connect_options>]
[<in_output_options>]
[<version_options>]

Loader CLI is transferred into session mode, if you specify neither option –p nor option –b.

See also:
Session Mode

 

Options for Transferring Connection Information

You can transfer connection information.

connect_options

-d <database_name>

Name of database instance

-u <database_user>[,<password>]

Database user’s name and password

-n <database_computer>[:<port>]

Name of the database computer

-s <database_schema>

Name of the schema

-e <encryption>

Encryption method

See also:

Options for Establishing a Connection

Options for Controlling Input and Output

You can control input and output

in_output_options

-o[w|a] <file_name>

Name of the output file

-cs <separator>

Specifies a command separator

-ps <number><string>

Specifies a substitution parameter

-E <number>

Maximum permitted number of errors

See also:

Options for Input and Output

Options for Determining Version Information

You can determine version information.

version_options

-V

Version of the Loader server

-v

Version of the Loader CLI

-R <dependent_path>

Directory that contains the programs that depend on the version of the database software

See also:

Options for Determining Version Information

Examples

Loader Tutorial, Structure linkTransport Mode, Structure linkCommand File Mode, Structure linkSession Mode

Result

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

In all three operation modes, the Loader writes a log file and, if appropriate, additional information.

See also:

Log File

Log Functions

Errors

If errors occur when commands or SQL statements are processed, the way in which the Loader responds depends on the operation mode in which it was used.

     Transport mode: the Loader stops processing the commands and SQL statements when an error occurs. Detailed information is written to log files. For the export and import the errors are written to the log file. In case of a transport there is a separate log file for the export and the import.

     Command file mode: the Loader 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 optionE, the Loader stops running after the first command with an error. You cannot react to the errors when you are using the Loader CLI.

     Session mode: the Loader reports the error that has occurred and then awaits further input for processing.

Note

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

See also:

Perl Manual, Structure linkSAP::DBTech::loader Module

Python Manual, Structure linksdb.loader Module

 

Leaving content frame