Making a current connection as the dormant connection

In the SET CONNECTION connection DORMANT statement, connection must represent the current connection. The SET CONNECTION statement with the DORMANT option makes the specified current connection a dormant connection.

For example, the following SET CONNECTION statement makes connection con1 dormant:
SET CONNECTION 'con1' DORMANT;
The SET CONNECTION statement with the DORMANT option generates an error if you specify a connection that is already dormant. For example, if connection con1 is current and connection con2 is dormant, the following SET CONNECTION statement returns an error message:
SET CONNECTION 'con2' DORMANT;
The following SET CONNECTION statement executes successfully:
SET CONNECTION 'con1' DORMANT;