Connection Pooling
-
External connections made by statements
WITH COMMON TRANSACTION
(the default) will remain open until the current transaction ends.They can be reused by subsequent calls toEXECUTE STATEMENT
, but only if connection_string is identical, including case -
External connections made by statements
WITH AUTONOMOUS TRANSACTION
are closed as soon as the statement has been executed -
Statements using
WITH AUTONOMOUS TRANSACTION
can and will re-use connections that were opened earlier by statementsWITH COMMON TRANSACTION
.If this happens, the reused connection will be left open after the statement has been executed.(It must be, because it has at least one active transaction!)