Entering content frame

 CONNECT Statement in the SQL Mode INTERNAL 

Use

Use the CONNECT statement to connect to the database instance, and specify the user name, password, and options for the database session.

Syntax

EXEC SQL [<session_number>] CONNECT 
         [<user_name> IDENTIFIED BY <password> | <uidpwd>]
         [<connect_option>...] [KEY <key>];

<uidpwd> ::= <user_name>/<password>

<connect_option> ::= [ISOLATION LEVEL <unsigned_integer>]
                     [TIMEOUT <unsigned_integer>]

·        Enter <session_number> as the session number if you want your application program to open multiple database sessions in parallel. In the SQL mode INTERNAL, there can be a maximum of eight parallel sessions with different MaxDB database instances.

·        The user name <user_name> and password <password> can also be specified as a character string in a host variable (character or UNICODE data types).

·        In <connect_option> you can specify an isolation level and timeout value.

·        You can specify the <key> in a host variable with data type char. You can specify an XUSER user key, DEFAULT or the environment variable SQLOPT. For information on setting the connection options at runtime in this environment variable, see your operating system documentation.

·        The values of the <key> complete or override the values from the SET SERVERDB statement, as well as the explicitly specified user name, password, and CONNECT options.

 

Leaving content frame