July 2020

T-SQL-Commands

T-SQL: Kill all inactive sessions from specific user

The SQL statement below will kill all sessions from a specific user, which wasn’t active the last hour.Of course, change ‘my_user’ with your preferred userid. If you want you can also uncomment the ‘program_name’ if you want to filter on…

Read More
T-SQL-Commands

T-SQL: Check status of automatic seeding

Automatic seeding for SQL Always On it nice, but in case of big databases this can take some time. Of course, it can be annoying if something is running, and you don’t see the status of it. The query below…

Read More