USE USER Command

You can use the USE USER Loader command for starting a database session to create a connection with the specified information.

Syntax

<use_user_command>     ::= USE USER <user_spec> [SCHEMA <schema_name>]
                           [DB <database_spec>] [<isolation_level_spec>]

<user_spec>            ::= <database_user> <password>
<schema_name>          ::= <identifier>
<database_spec>        ::= <database_name>
                           [ON <database_computer> [ENCRYPTION <protocol_name>]]
<isolation_level_spec> ::= ISOLATION LEVEL <unsigned_integer>

<database_user>

Name of the database user

The name of the database user is automatically converted by the database system into uppercase letters. If you want to suppress the conversion, you must place the name in quotation marks.

See the SQL Reference Manual, User Name (user_name)

<password>

Password

The password for the database user is automatically converted by the database system into uppercase letters. If you want to suppress the conversion, you must place the name in quotation marks.

See the SQL Reference Manual, Password (password).

Concepts of the Database System, Conventions for User Names and Passwords

<schema_name>

Schema for the database user

If the name of the schema is identical to a keyword or if the upper- and lowercase notation is relevant, the name must be placed in double quotation marks.

See the SQL Reference Manual, Schema Name (schema_name)

<database_name>

Name of the database instance

Valid for the entire database session with this database instance

If the name of the database instance is identical to a keyword or if the upper- and lowercase notation is relevant, the name must be placed in quotation marks.

See also: Concepts of the Database System, Conventions for Database Names

<database_computer>

Name of the computer on which the database instance is installed for which a database session is to be started.

If this is not specified, the Loader assumes that the specified database instance was created on the computer to which the user of the Loader is logged on.

<protocol_name>

Name of the encryption protocol

In addition, you can specify, after the key word ENCRYPTION, the name of the requested encryption protocol valPROTOCOL_NAME to ensure the data transfer is encrypted. This option is currently only supported for SAP systems and SSL.

ISOLATION LEVEL <unsigned_integer>

unsigned_integer: value of the isolation level to be set

Default value: 3

See the SQL Reference Manual, CONNECT-Statement (connect_statement)

Concepts of the Database System, Isolation Level

Examples

USE USER mona red DB demodb ON genua

Use user MONA to log on to database instance DEMODB on computer GENUA

USE USER mona red SCHEMA hotel DB demodb ON genua

Use user MONA to log on to database instance DEMODB in the schema HOTEL on computer GENUA

USE USER mona red DB demodb ON genua ISOLATION LEVEL 0

Set isolation level 0

Explanation

This command terminates the current connection of the Loader to the database instance and creates a new connection with the specified parameters. This setting applies as long as no new parameter is specified with a USE command.

<schema_spec>

You can specify in which schema the user is to be logged on. If you do not specify a schema, the user uses the schema that is assigned to him. This setting applies as long as no other schema is specified using a USE USER, USE SCHEMA or SET CURRENT SCHEMA command.

<database_spec>

If you do not specify a database instance name in the USE USER command, the new connection is created to the database instance that was used prior to the USE USER command or set using option –u. You can establish a connection to another database instance with the USE DB Command.

<isolation_level_spec>

You can use the USE USER command to set the isolation level for a user and override the value set by the SET ISOLATION LEVEL command. If you do not specify an isolation level, the value set for the database session is used.

The current isolation level value can also be changed using an EXPORT COLUMNS command  by specifying the appropriate LOCK option in the SELECT statement.

See also:

Creating a Database Session: Commands

Options for Establishing a Connection