SMO Database Backup History | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SMO Database Backup History


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

Check: http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.backup.aspx
http://msdn2.microsoft.com/en-us/library/ms219496.aspx
http://msdn2.microsoft.com/en-us/library/ms219166.aspx Luis Martin
Moderator
SQL-Server-Performance.com 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.
<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 />
]]>