DB2 DRDA Support

In this section:

The Adapter for DB2 supports IBM’s Distributed Relational Database Architecture (DRDA), including:


Top of page

x
Level 1 DRDA Support: CONNECT

How to:

Users can change their default database server with the CONNECT command.

The administrator (or authorized person) may establish one ID and password for a group of users. Assigning CONNECT authority to the group ID, rather than the individual users, simplifies the task of administering privileges (see Connection, Authentication, and Security).



x
Syntax: How to Issue the CONNECT Command

The syntax of the CONNECT command is

{ENGINE|SQL} [DB2] CONNECT [TO dbname|RESET]

where:

dbname

Is the DB2 location identifier.

RESET

Reconnects to the local DB2 server.

You can include the CONNECT command in a FOCEXEC such as the PROFILE FOCEXEC. The FOCEXEC may be encrypted.

Note:


Top of page

x
Level 2 DRDA Support

How to:

Level 2 DRDA commands include:



x
Syntax: How to Dynamically Connect to a DB2 Server or Release a Connection

The syntax for the SET CONNECTION and RELEASE commands is

SQL [DB2] SET CONNECTION server_name
SQL [DB2] RELEASE {server_name|option}

where:

server_name

Is the location name of any valid DRDA database server.

option

Can be one of the following:

CURRENT
ALL [SQL]

Note: Omit the DB2 target RDBMS qualifier if you previously issued the SET SQLENGINE command for DB2.



x
Syntax: How to Switch Application Packages Dynamically

You can use the SET CURRENT PACKAGESET command to switch application packages during a session. The effect is similar to the SET PLAN command, but does not require that the DB2 thread be closed and reopened (for example, when switching isolation levels).

SQL [DB2] SET CURRENT PACKAGESET {packageset_name|USER}

where:

packageset_name

Is the name of any package set previously bound into the current DB2 plan.

USER

Indicates the primary authorization ID.

Use of DRDA and the SET CURRENT PACKAGESET command requires that the adapter be installed using the DB2 BIND PACKAGE command. For more information, consult with the DBA at your site or refer to the IBM DB2 Application Programming and SQL Guide.

For a complete description of these commands, refer to the IBM DB2 SQL Reference.


Information Builders