Thursday, March 22, 2012

List number of opened transaction in SQL server

Sometimes when you work in SQL Server management studio you open transaction and forgot to commit or rollback. To check how many transactions are opened execute:

print @@trancount