Lot of sessions in SQL SQL - @@TRANCOUNT

Hello friends,

I have in my SQL sessions, some big sessions, someone know how to solve this problem?
or know how to find the query that causes this?

My database is configured with IMPLICIT_TRANSACTIONS OFF .


Good morning Agno.

Before answering the question, I would like to confirm with you if that screenshot is regarding sessions that are active or sleeping. If you can provide more information regarding the database sessions state would be awesome.

By my experience, the OS runtime user executes select @@trancount to confirm if there's any transaction open (on application side), so it can issue a COMMIT (most of the time) or a ROLLBACK in order to avoid lock escalation.

Best regards,

Good morning Andre,

Thank you for your answer.

Sessions @@TRANCOUNT are active.


Hi Agno,

Those might be the connections from the connection pool. Here you have explained in great detail how it works under the hood and how you can calculate the amount of connections.