returning duration of maintenance plan

  • Does anyone know the t-sql statement that will allow me to email myself the time/duration it took for my maintenance plan's to run, I feel like it must be able to be done as it comes up if you use a maintenance plan wizard's email rather than a t-sql driven email, I just dont know where I should be looking. I feel like its probably in the msdb database but after that my intuition no longer serves me. Currently my end of task/maintenance plan email's t-sql is as follows:

    EXECUTE msdb.dbo.sp_notify_operator @name=N'Backups',@subject=N'SQLServer Backup Notification',@body=N'The SQLServer has had the database and transaction logs backed up.

    The database backup is located at

    ''\\doesntreallymatter\backend\database\SQLServer.bak''

    The transaction log backup is located at

    ''\\doesntreallymatter\backend\database\transact_log.back'''

    Sorry if this sounds newbie-ish... I still am one when it comes to using the Microsoft SQL Server Management Studio for SQL Server 2005... However any help would be greatly appreciated, thanks.

  • i guess DB mail would be usefull.......

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

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