Creating a trigger if the DB is down?

  • I was trying to log into one of our DB and found out that it had been down since Sunday (Just a DEV environment). The problem is that I wouldn't have known if I hadn't logged into the system. I checked the log file and it was just giving me "Insufficient system memory in resource pool" error.

    Question: Is there a trigger I can create that will send an alert if the DB is not accessible or down for any reason?

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • You need to set up a service on a separate server to monitor your servers. That service can then send emails. You can do this through SQL Server, code, or by purchasing third party software. But you can't have a server that's offline send you a signal that it is offline or is going offline. The best bet is to go with a service of some type.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thanks.

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

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

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