How can I get an email when there is heavy server load?

  • Hello,

    I am relatively inexperienced with SQL but need to set something up to email me or otherwise notify me when the server load reaches a certain number of sessions.  I have done some Linux/MySQL work in the past and an admin set up a cron that would check the load and email me when it reached a given point.  Right now I am having heavy traffic on a site and sql times out when I get too many sessions going. I am also working on a way to cut back on the sessions, but until then and in the future would just like an email sent to me so I can monitor before the server times out.

    Thanks,

    Bob

  • Hi Bob,

    this isn't something I've done myself but hopefully this will point you in the right direction (?) until one of the resident gurus comes along.

    This is SQL 2000 BTW.

    Enterprise Manager, Management - SQL Server Agent - Alerts.

    Right click and select new alert.

    Have a look through the options listed under "SQL Server performance condition" to see if one best suits your needs.

    Note that the SQLServeragent service (windows) needs to be running in order to use features contained within SQL Server Agent.

    All the best.

  • I would approach it as QPR has suggested.  And then you can create an operator and the alert's response would be to email them.  Check out Alerts in BOL.

  • I would query master.dbo.sysprocesses(nolock) get a count of all (sp_id) processes runing per DB, pass @spid parameter to dbcc inputbuffer(@spid), and built a report with per DB, processes running, login and what is running, you can put the query inside a job and run the job every 5 min, if somehow u have more process running than what u want then use xp_sendmail sproc and notify urself

    hope it helps

Viewing 4 posts - 1 through 3 (of 3 total)

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