Back Up details

  • Hi Friends,

    How we can redirect the backup details (whether backup has happened or not) into excel sheet.

  • 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]

    MCITP Database administrator 2008
    MCTS SQL Server 2008 Implementation and maintenance
    MCTS Sharepoint configuration
    MCP Designing Deploying and Managing a Network Solution for the Small and Medium-sized Business
    ITIL V3 Foundation
  • thanks for info, but i dont have knowledge of power shell, how i can start working on above?

  • 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

  • along with i want result to be in excel sheet

  • 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!

    MCITP Database administrator 2008
    MCTS SQL Server 2008 Implementation and maintenance
    MCTS Sharepoint configuration
    MCP Designing Deploying and Managing a Network Solution for the Small and Medium-sized Business
    ITIL V3 Foundation
  • 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

    ------------------------
    I am the master of my fate:
    I am the captain of my soul.
    ------------------------
    Blog: http://sqlserver365.blogspot.co.uk/
    Twitter: @ckwmcgowan
    ------------------------
  • 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.

    MCITP Database administrator 2008
    MCTS SQL Server 2008 Implementation and maintenance
    MCTS Sharepoint configuration
    MCP Designing Deploying and Managing a Network Solution for the Small and Medium-sized Business
    ITIL V3 Foundation

Viewing 8 posts - 1 through 7 (of 7 total)

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