Alerting on session count

  • Hi

    Does anyone know how I could create an alert on a database when a particular number of connected sessions is reached? We had an outage last week and I suspect that it was caused by this.

    many thanks

  • If its for the entire instance, then Alerts, and define a SQL Server Performance Condition Alert on SQLServer:General Statistics, Logical Connections.

    For a specific database, maybe something along the lines of scheduling:

    select db_name(dbid), count(dbid) from sysprocesses group by DB_NAME(dbid), throw the output into a table and query it with a RAISEERROR or send dbmail to let you know that way?

    Cheers

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply