Function documentationSession Mode Locate this document in the navigation structure

 

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

Features

You can start Loader CLI in session mode by entering the following command:

Syntax Syntax

  1. loadercli
End of the code.

If you want to transfer further information when Loader CLI is called, use the corresponding options.

Syntax Syntax

  1. loadercli
      [<connect_options>]
      [<in_output_options>]
      [<version_options>]
End of the code.

You can enter options for establishing the connection, for input and output control, and for version queries. After starting Loader CLI in session mode, you can enter Loader commands and SQL statements interactively.

connect_options

-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

in_output_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

version_options

-V

Version of Loader server

-v

Version of Loader CLI

-R <dependent_path>

Directory containing the programs that are dependent on the version of the database software

More information: Determing Version Information: Loader CLI Options

Command Separator

The default value for a command separator is ENTER. If you enter a Loader command that is longer than one line and you end one of these lines with a forward slash (/), Loader CLI recognizes that the command is not yet complete. It is not yet executed when the command separator ENTER is inserted. Only when you enter the command separator ENTER without preceding it with a forward slash does Loader CLI recognize that the command is complete.

You can change this behavior by defining another command separator with the option –cs <command_separator>. If, for example, you define the semicolon as the command separator, you can write multiple lines until Loader finds a semicolon. Only when you enter the command separator “semicolon” does Loader CLI recognize that the command is complete.

Once the command separator is received, the command is sent to the Loader server, which executes it. After execution of all the Loader commands and SQL statements, Loader CLI displays a message. To end session mode, enter release or exit, followed by the command separator.

Example

Example Example

loadercli -d demodb -u mona,red -s hotel

End of the example.

Loader establishes a connection to the database DEMOB for the user MONA in the scheme HOTEL. Loader then waits for the Loader commands and SQL statements in the command line. Loader only processes them when you end the commands with ENTER.

Example Example

loadercli -d demodb -u mona,red -cs ;

End of the example.

Loader establishes a connection to the database DEMOB for the user MONA. Loader waits for the Loader commands and SQL statements in the command line. Loader only processes them when they you end them with a semicolon.

For more examples, see the Loader Tutorial, Session Mode.