Make a connection current

When multiple connections exist, the application can only communicate with one connection at a time. This connection is the current connection. All other established connections are dormant. Your application can make another connection current with either of the following connection statements:
  • The CONNECT statement establishes a new connection and makes the connection current.
  • The SET CONNECTION statement switches to a dormant connection and makes the connection current.
When you make a connection dormant and then current again, you perform an action similar to when you disconnect and then reconnect to the database environment. However, if you make a connection dormant you can typically avoid the need for the database server to perform authentication again, and thus save the cost and use of resources that are associated with the connection.
Tip: A thread-safe application can have multiple current connections, one current connection per thread. However, only one current connection is active at a time.