SQL Server Performance

SMO Database Backup History

Discussion in 'SQL Server 2005 General Developer Questions' started by cemuney, Dec 21, 2005.

  1. cemuney New Member

    Hi all again.
    There is no main topic about Microsoft SQL Server 2005 SMO in forum.
    so i am writing it here...

    i am using SMO.

    And i want to get backup history of selected database with SMO...

    i can only get the
    db.LastBackupDate from
    Microsoft.SqlServer.Management.Smo.Database object

    i want to get this T-SQL list with SMO???
    use msdb
    select database_name, description, backup_finish_date from backupset
  2. Luis Martin Moderator



    Luis Martin

    One of the symptoms of an approaching nervous breakdown is the belief that one's work is terribly important
    Bertrand Russell

    Nunca esperes el reconocimiento de tus hijos, eso ocurrirá luego de tu muerte

    All postings are provided “AS IS” with no warranties for accuracy.

  3. cemuney New Member

    <br />thanks Luis.<br /><br />i have already checked MSDN online, and examples in internet. <br />and also exaples in <br /><br />C:program FilesMicrosoft SQL Server90SamplesEngineProgrammabilitySMO<br /><br />and i know about<br /> Microsoft.SqlServer.Management.Smo.Backup<br /> Microsoft.SqlServer.Management.Smo.Restore<br /> Microsoft.SqlServer.Management.Smo.Database <br />objects. but there is no property or method here about backup history(or i couldnt find<img src='/community/emoticons/emotion-6.gif' alt=':(' /> ).<br /><br />i think there is another object about backupsets.<br />i am trying to find it. <br />i will post it here if i could find......<br /><br />And i think there should be a main topic about ( Microsoft SQL Server 2005 SMO )<br /><br />thanks<br /><br />Cem Ãœney<br />DB Admin<br />

Share This Page