Home Forums SQL Server 2008 T-SQL (SS2K8) Send Alert when no log backup completed in 24 hours RE: Send Alert when no log backup completed in 24 hours

  • i do this with Powershell. Job runs every morning, and checks to see if a backup, full or differential, has been run in the last 24 hours. Also checks to see if a full backup is more than a week old, in case we are running differentials instead of full backup. it also checks to see if the db has FULL recovery, and if so, checks to see if the transaction log is more than 24 hours old. Loops through all of my servers, and then emails if backup is old or if it can't connect to a server. i have attached a zip file, with the Powershell code. this version is used to run from a SQL Agent job. You will need to update how the servers are retrieved. i put them in a table.

    Only the server that runs the report needs to have ability to smtp.

    You also need to make sure your job can connect to all of your other servers. i have a proxy set up to do that.

    Leonard