Monitor TempDB Contention

Measures the total duration of latch waits on the tempdb database, in a one-minute time interval. First, create and start for the following Extended Events session on the monitored SQL Server instance: [crayon-6a8ea938ad369228396642/] The goal is to get the total duration of latch waits, in the last minute, so this session collects all the event […] Read more

Monitoring Changes in Permissions, Users, Roles and Logins

Reports the number of changes to logins, users, roles in the past 10 minutes. It measures every change but doesn’t tell you if this is a drift from what it should be, since it might only be a permission being temporarily created and then revoked. First, create the following function in the database on the […] Read more

Detect Suspicious Errors Typical of a SQL Injection Attack

Detects errors characteristic of a possible SQL Injection attack, or other attempts to gain illicit access to a database server. Returns the number of errors detected in the last 20 minutes. First, create an Extended Events session on the monitored SQL Server instance: [crayon-6a8ea938ad70f749976937/] Start the event session, like this: [crayon-6a8ea938ad713122436802/] Read more