September 21, 2011 at 9:03 am
Hi Friends,
How we can redirect the backup details (whether backup has happened or not) into excel sheet.
September 21, 2011 at 9:19 am
There is a nice Powershell example from which you could build your own solution (this one creates an XL sheet as a report and sends it daily):
http://hassanszone.wordpress.com/2011/03/21/powershell-script-for-backup-monitor-for-all-the-sqlservers-in-network/[/url]
September 22, 2011 at 4:08 am
thanks for info, but i dont have knowledge of power shell, how i can start working on above?
September 22, 2011 at 4:19 am
Try with this select Database_name,
COALESCE(Convert(varchar(20), MAX(backup_finish_date), 101),'Backup Not Taken') as
LastBackUpTakenDate,
COALESCE(Convert(varchar(20), MAX(user_name), 101),'NA') as BackupTakenUser
from msdb.dbo.backupset
GROUP BY Database_name
September 22, 2011 at 4:31 am
along with i want result to be in excel sheet
September 22, 2011 at 5:24 am
Then you can export directly into an Excel file using whether OPENDATASOURCE (http://msdn.microsoft.com/en-us/library/ms179856.aspx) or creating a linked server to an Excel file with a SELECT INTO from the nice query above (http://www.sqlservercentral.com/Forums/Topic421984-148-1.aspx).
You can find a lot of help in this in SQLServerCentral itself
Another solution would be to create an SSIS Job.
Hope this helps!
September 22, 2011 at 8:51 am
Fabrizio Faleni's last option SSIS would be my prefered solution, the options are endless but using a procedure, powershell or SSIS you could;
Automate it in a job
Email the excel file
Export to Sharepoint (urghhhh, cant believe i just said that :sick:)
Thanks
Chris
September 22, 2011 at 9:41 am
Chris last option "export to SharePoint" is wonderful, instead! Why didn't I think about that one?:-D Users can setup an alert and get an email with the link to the document everytime it is updated, you can save a determined number of versions of the Excel file for history, save space on Exchange because the alert just sends the link to the file, etc.
One more option would be to setup an SSRS report, letting the users subscribe to it and receive it by mail.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply