Closed thorstenkampe closed 3 years ago
Exiting the shell from which the connection was opened, closes the session immediately.
@thorstenkampe, is it possible that this is a symptom of connection pooling? You can double check the logic for the Close-SqlConnecttion command. As you can see, the connection is being Closed and then Disposed...
It seems like this behavior might be normal for connections where Connection Pooling is turned on -- see MS documentation of the Close method.
Yes, I thought so myself. The connections sooner or later will disappear except for Oracle where it seems the connection stays indefinitely. At the moment Close-SqlConnection
is somehow a no-op - it doesn't do anything tangible from what I can see.
@thorstenkampe -- see this from Oracle: OracleConnection.Close().
As far as I can tell, if the connection is remaining open, then the oracle instance has connection pooling and the lifetime has not been exceeded.
Closing a database connection doesn't close the session on the database server. Tested with MSSQL, MySQL, Oracle and PostgreSQL. (PowerShell and database servers all latest versions)