When a Transaction is Active
Without the DORMANT keyword, the SET CONNECTION statement implicitly puts the current connection in the dormant state.
When you issue a SET CONNECTION statement with the DORMANT keyword, the
SET CONNECTION statement explicitly puts the current connection in the dormant
state. In both cases, the statement can fail if a connection that becomes
dormant has an uncommitted transaction. If the connection that becomes dormant
has an uncommitted transaction, the following conditions apply:
- If the connection was established using the WITH CONCURRENT TRANSACTION clause of the CONNECT statement, SET CONNECTION succeeds and puts the connection in a dormant state.
- If the connection was not established by the WITH CONCURRENT TRANSACTION clause of the CONNECT statement, SET CONNECTION fails and cannot set the connection to a dormant state, and the transaction in the current connection continues to be active. The statement generates an error and the application must decide whether to commit or roll back the active transaction.