DB2 Version 9.7 for Linux, UNIX, and Windows

GET CONNECTION STATE command

Displays the connection state.

Possible states are:
  • Connectable and connected
  • Connectable and unconnected
  • Unconnectable and connected
  • Implicitly connectable (if implicit connect is available).
This command also returns information about:
  • the database connection mode (SHARE or EXCLUSIVE)
  • the alias and name of the database to which a connection exists (if one exists)
  • the host name and service name of the connection if the connection is using TCP/IP

Authorization

None

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-GET CONNECTION STATE----------------------------------------><

Command parameters

None

Examples

The following is sample output from GET CONNECTION STATE:

   Database Connection State

 Connection state       = Connectable and Connected
 Connection mode        = SHARE
 Local database alias   = SAMPLE
 Database name          = SAMPLE
 Hostname               = montero
 Service name           = 29384

Usage notes

This command does not apply to type 2 connections.