<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Finding Last Backup Time for All Database</title>
	<atom:link href="http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Sun, 26 May 2013 06:55:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Sahul Hameed</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-433421</link>
		<dc:creator><![CDATA[Sahul Hameed]]></dc:creator>
		<pubDate>Thu, 07 Mar 2013 14:12:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-433421</guid>
		<description><![CDATA[Error received on running the topmost(first) script in SQL Server 2005 as :

Msg 208, Level 16, State 1, Line 1
Invalid object name &#039;sys.sysdatabases&#039;.

Please help me on this....

Thank you.]]></description>
		<content:encoded><![CDATA[<p>Error received on running the topmost(first) script in SQL Server 2005 as :</p>
<p>Msg 208, Level 16, State 1, Line 1<br />
Invalid object name &#8216;sys.sysdatabases&#8217;.</p>
<p>Please help me on this&#8230;.</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al Wilson</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-420625</link>
		<dc:creator><![CDATA[Al Wilson]]></dc:creator>
		<pubDate>Mon, 11 Feb 2013 12:57:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-420625</guid>
		<description><![CDATA[you can use this for SQL 2000

    SELECT   a.name AS [Database Name],databasepropertyex(a.name, &#039;Recovery&#039;) as RecoveryModel,
         (select MAX(b.backup_finish_date) from msdb..backupset b where b.type = &#039;D&#039; and a.name=b.database_name) AS [Full Backup],
         (select MAX(b.backup_finish_date) from msdb..backupset b where b.type = &#039;L&#039; and a.name=b.database_name) AS [Log Backup] 
    FROM     master.dbo.sysdatabases a]]></description>
		<content:encoded><![CDATA[<p>you can use this for SQL 2000</p>
<p>    SELECT   a.name AS [Database Name],databasepropertyex(a.name, &#8216;Recovery&#8217;) as RecoveryModel,<br />
         (select MAX(b.backup_finish_date) from msdb..backupset b where b.type = &#8216;D&#8217; and a.name=b.database_name) AS [Full Backup],<br />
         (select MAX(b.backup_finish_date) from msdb..backupset b where b.type = &#8216;L&#8217; and a.name=b.database_name) AS [Log Backup]<br />
    FROM     master.dbo.sysdatabases a</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al Wilson</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-420592</link>
		<dc:creator><![CDATA[Al Wilson]]></dc:creator>
		<pubDate>Mon, 11 Feb 2013 11:06:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-420592</guid>
		<description><![CDATA[Here is my code to check for the last database backup.  It gives the database recovery model and the last time of a full and log backup.

I hope it help someone

    SELECT   a.name AS [Database Name],a.recovery_model_Desc AS [Recovery Model],
         (select MAX(b.backup_finish_date) from msdb..backupset b where b.type = &#039;D&#039; and a.name=b.database_name) AS [Full Backup],
         (select MAX(b.backup_finish_date) from msdb..backupset b where b.type = &#039;L&#039; and a.name=b.database_name) AS [Log Backup] 
    FROM     master.sys.databases a]]></description>
		<content:encoded><![CDATA[<p>Here is my code to check for the last database backup.  It gives the database recovery model and the last time of a full and log backup.</p>
<p>I hope it help someone</p>
<p>    SELECT   a.name AS [Database Name],a.recovery_model_Desc AS [Recovery Model],<br />
         (select MAX(b.backup_finish_date) from msdb..backupset b where b.type = &#8216;D&#8217; and a.name=b.database_name) AS [Full Backup],<br />
         (select MAX(b.backup_finish_date) from msdb..backupset b where b.type = &#8216;L&#8217; and a.name=b.database_name) AS [Log Backup]<br />
    FROM     master.sys.databases a</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahboob Alam</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-411256</link>
		<dc:creator><![CDATA[Mahboob Alam]]></dc:creator>
		<pubDate>Tue, 22 Jan 2013 14:12:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-411256</guid>
		<description><![CDATA[Hi Asim Bhai,
Is there any to take backup of database for certain date and time.
for example i want to get database backup for 12-12-2012 12:15:00.
if you could suggest some way to do it, 
Thanks]]></description>
		<content:encoded><![CDATA[<p>Hi Asim Bhai,<br />
Is there any to take backup of database for certain date and time.<br />
for example i want to get database backup for 12-12-2012 12:15:00.<br />
if you could suggest some way to do it,<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sathiskumar Selvaraju</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-373115</link>
		<dc:creator><![CDATA[Sathiskumar Selvaraju]]></dc:creator>
		<pubDate>Mon, 12 Nov 2012 19:21:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-373115</guid>
		<description><![CDATA[Thank you All.  Following SQL start,end and duration for all databases on your server

SELECT sdb.Name AS DatabaseName,
COALESCE(CONVERT(VARCHAR(20), MAX(bus.backup_start_date), 100),&#039;-&#039;) AS StartTime,
COALESCE(CONVERT(VARCHAR(20), MAX(bus.backup_finish_date), 100),&#039;-&#039;) AS EndTime,
isnull(datediff(mi,max(bus.backup_start_date),max(bus.backup_finish_date)),0) &#039;BackupDuration&#039;
FROM sys.sysdatabases sdb
LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_name = sdb.name
GROUP BY sdb.Name]]></description>
		<content:encoded><![CDATA[<p>Thank you All.  Following SQL start,end and duration for all databases on your server</p>
<p>SELECT sdb.Name AS DatabaseName,<br />
COALESCE(CONVERT(VARCHAR(20), MAX(bus.backup_start_date), 100),&#8217;-') AS StartTime,<br />
COALESCE(CONVERT(VARCHAR(20), MAX(bus.backup_finish_date), 100),&#8217;-') AS EndTime,<br />
isnull(datediff(mi,max(bus.backup_start_date),max(bus.backup_finish_date)),0) &#8216;BackupDuration&#8217;<br />
FROM sys.sysdatabases sdb<br />
LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_name = sdb.name<br />
GROUP BY sdb.Name</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Beginning New Weekly Series &#8211; Memory Lane &#8211; #001 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-368291</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Beginning New Weekly Series &#8211; Memory Lane &#8211; #001 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 03 Nov 2012 01:31:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-368291</guid>
		<description><![CDATA[[...] Finding the last backup time for all the databases This little script is very powerful and instantly gives details when was the last time your database backup performed. If you are reading this blog post &#8211; I say just go ahead and check if everything is alright on your server and you have all the necessary latest backup. It is better to be safe than sorrow. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Finding the last backup time for all the databases This little script is very powerful and instantly gives details when was the last time your database backup performed. If you are reading this blog post &#8211; I say just go ahead and check if everything is alright on your server and you have all the necessary latest backup. It is better to be safe than sorrow. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anuradha</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-363323</link>
		<dc:creator><![CDATA[Anuradha]]></dc:creator>
		<pubDate>Tue, 23 Oct 2012 11:35:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-363323</guid>
		<description><![CDATA[Hi Pinal,
   Can you please explain about system databases?]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,<br />
   Can you please explain about system databases?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: himanshuk</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-363296</link>
		<dc:creator><![CDATA[himanshuk]]></dc:creator>
		<pubDate>Tue, 23 Oct 2012 10:19:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-363296</guid>
		<description><![CDATA[no it gives one date only to all columns as below 

for script as :
SELECT sdb.Name AS DatabaseName,
COALESCE(CONVERT(VARCHAR(12), MAX(bus.backup_finish_date), 101),&#039;-&#039;) AS LastBackUpTime
FROM sys.sysdatabases sdb
LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_name = sdb.name
GROUP BY sdb.Name



master	10/22/2012
tempdb	-
model	10/22/2012
msdb	10/22/2012
Actional	10/22/2012
ScConfiguration	10/22/2012
ScReporting	10/22/2012
ScTrans	10/22/2012
Vault	10/22/2012
AuditTrail	10/22/2012
BitKooDirectory	10/22/2012
Keystone2	10/22/2012
keystone2_audit	10/22/2012
Keystone2Log	10/22/2012
BitkooDeployer	10/22/2012
TraceLogs	10/22/2012
SmcWmArchive	10/22/2012
SmcWmIs	10/22/2012
SmcWmMws	10/22/2012
SmcWmOptimize	10/22/2012
SmcWmProcess	10/22/2012
BIxPress	10/22/2012
ProblemResolution	10/22/2012]]></description>
		<content:encoded><![CDATA[<p>no it gives one date only to all columns as below </p>
<p>for script as :<br />
SELECT sdb.Name AS DatabaseName,<br />
COALESCE(CONVERT(VARCHAR(12), MAX(bus.backup_finish_date), 101),&#8217;-') AS LastBackUpTime<br />
FROM sys.sysdatabases sdb<br />
LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_name = sdb.name<br />
GROUP BY sdb.Name</p>
<p>master	10/22/2012<br />
tempdb	-<br />
model	10/22/2012<br />
msdb	10/22/2012<br />
Actional	10/22/2012<br />
ScConfiguration	10/22/2012<br />
ScReporting	10/22/2012<br />
ScTrans	10/22/2012<br />
Vault	10/22/2012<br />
AuditTrail	10/22/2012<br />
BitKooDirectory	10/22/2012<br />
Keystone2	10/22/2012<br />
keystone2_audit	10/22/2012<br />
Keystone2Log	10/22/2012<br />
BitkooDeployer	10/22/2012<br />
TraceLogs	10/22/2012<br />
SmcWmArchive	10/22/2012<br />
SmcWmIs	10/22/2012<br />
SmcWmMws	10/22/2012<br />
SmcWmOptimize	10/22/2012<br />
SmcWmProcess	10/22/2012<br />
BIxPress	10/22/2012<br />
ProblemResolution	10/22/2012</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ali</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-360596</link>
		<dc:creator><![CDATA[Ali]]></dc:creator>
		<pubDate>Tue, 16 Oct 2012 04:09:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-360596</guid>
		<description><![CDATA[Can some one help me,  how to get the db backup info for all instance in a single domain.]]></description>
		<content:encoded><![CDATA[<p>Can some one help me,  how to get the db backup info for all instance in a single domain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prashanth</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-353517</link>
		<dc:creator><![CDATA[prashanth]]></dc:creator>
		<pubDate>Thu, 27 Sep 2012 09:45:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-353517</guid>
		<description><![CDATA[Hi Pinnal,

Please do the need full this is P1.


I need a single script for below output for all databases.

Database name,
Database Size,
Occurrence of the log backups (i.e. every 15, 30, 60 etc).


Regards.

prashanth Kumar]]></description>
		<content:encoded><![CDATA[<p>Hi Pinnal,</p>
<p>Please do the need full this is P1.</p>
<p>I need a single script for below output for all databases.</p>
<p>Database name,<br />
Database Size,<br />
Occurrence of the log backups (i.e. every 15, 30, 60 etc).</p>
<p>Regards.</p>
<p>prashanth Kumar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nilesh</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-308479</link>
		<dc:creator><![CDATA[Nilesh]]></dc:creator>
		<pubDate>Mon, 02 Jul 2012 13:59:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-308479</guid>
		<description><![CDATA[The above scripts are really very useful.
Thank You for your help.
Nilesh]]></description>
		<content:encoded><![CDATA[<p>The above scripts are really very useful.<br />
Thank You for your help.<br />
Nilesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: suhas</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-250404</link>
		<dc:creator><![CDATA[suhas]]></dc:creator>
		<pubDate>Thu, 09 Feb 2012 10:40:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-250404</guid>
		<description><![CDATA[Hi pinal,

As your all posts are usefull. I need sql code to find out database name with all their previous backup datetime 
I am waiting for your reply.

Thanks and regards,
suhas]]></description>
		<content:encoded><![CDATA[<p>Hi pinal,</p>
<p>As your all posts are usefull. I need sql code to find out database name with all their previous backup datetime<br />
I am waiting for your reply.</p>
<p>Thanks and regards,<br />
suhas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arun</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-240022</link>
		<dc:creator><![CDATA[Arun]]></dc:creator>
		<pubDate>Wed, 18 Jan 2012 06:08:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-240022</guid>
		<description><![CDATA[Schedule through  Maintenance--&gt;management--&gt;new management plan in sql server create one schedules 
1) for creating a backup of the day
2) for deleting the previous days back up]]></description>
		<content:encoded><![CDATA[<p>Schedule through  Maintenance&#8211;&gt;management&#8211;&gt;new management plan in sql server create one schedules<br />
1) for creating a backup of the day<br />
2) for deleting the previous days back up</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jayant dass</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-201785</link>
		<dc:creator><![CDATA[Jayant dass]]></dc:creator>
		<pubDate>Mon, 21 Nov 2011 23:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-201785</guid>
		<description><![CDATA[it&#039;s for sql server 6.5


SELECT sdb.Name AS DatabaseName,
COALESCE(CONVERT(VARCHAR(12), MAX(bus.backup_finish), 101),&#039;-&#039;) AS LastBackUpTime
FROM sysdatabases sdb
LEFT OUTER JOIN msdb.dbo.sysbackuphistory bus ON bus.database_name = sdb.name
GROUP BY sdb.Name


Thanks &amp; Regards
Jayant Dass]]></description>
		<content:encoded><![CDATA[<p>it&#8217;s for sql server 6.5</p>
<p>SELECT sdb.Name AS DatabaseName,<br />
COALESCE(CONVERT(VARCHAR(12), MAX(bus.backup_finish), 101),&#8217;-') AS LastBackUpTime<br />
FROM sysdatabases sdb<br />
LEFT OUTER JOIN msdb.dbo.sysbackuphistory bus ON bus.database_name = sdb.name<br />
GROUP BY sdb.Name</p>
<p>Thanks &amp; Regards<br />
Jayant Dass</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jayant dass</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-201774</link>
		<dc:creator><![CDATA[Jayant dass]]></dc:creator>
		<pubDate>Mon, 21 Nov 2011 23:28:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-201774</guid>
		<description><![CDATA[Hi Pinal,

Finally your script is working fine 2005 onwards

SELECT sdb.Name AS DatabaseName,
COALESCE(CONVERT(VARCHAR(12), MAX(bus.backup_finish_date), 101),&#039;-&#039;) AS LastBackUpTime
FROM sys.sysdatabases sdb
LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_name = sdb.name
GROUP BY sdb.Name


SQL Server 2000 and 7.0

use master

go


SELECT sdb.Name AS DatabaseName,
COALESCE(CONVERT(VARCHAR(12), MAX(bus.backup_finish_date), 101),&#039;-&#039;) AS LastBackUpTime
FROM sysdatabases sdb
LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_name = sdb.name
GROUP BY sdb.Name

Thanks &amp; Regards
Jayant Dass]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>Finally your script is working fine 2005 onwards</p>
<p>SELECT sdb.Name AS DatabaseName,<br />
COALESCE(CONVERT(VARCHAR(12), MAX(bus.backup_finish_date), 101),&#8217;-') AS LastBackUpTime<br />
FROM sys.sysdatabases sdb<br />
LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_name = sdb.name<br />
GROUP BY sdb.Name</p>
<p>SQL Server 2000 and 7.0</p>
<p>use master</p>
<p>go</p>
<p>SELECT sdb.Name AS DatabaseName,<br />
COALESCE(CONVERT(VARCHAR(12), MAX(bus.backup_finish_date), 101),&#8217;-') AS LastBackUpTime<br />
FROM sysdatabases sdb<br />
LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_name = sdb.name<br />
GROUP BY sdb.Name</p>
<p>Thanks &amp; Regards<br />
Jayant Dass</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Ryan</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-155131</link>
		<dc:creator><![CDATA[Sean Ryan]]></dc:creator>
		<pubDate>Mon, 08 Aug 2011 18:54:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-155131</guid>
		<description><![CDATA[I have a backup &quot;full&quot; running each day to disk but the database last backup up always remains at none.

Does this mean the instance is not able to carry out hot backups?]]></description>
		<content:encoded><![CDATA[<p>I have a backup &#8220;full&#8221; running each day to disk but the database last backup up always remains at none.</p>
<p>Does this mean the instance is not able to carry out hot backups?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joben</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-103427</link>
		<dc:creator><![CDATA[Joben]]></dc:creator>
		<pubDate>Thu, 02 Dec 2010 11:37:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-103427</guid>
		<description><![CDATA[Hi Pinal,

I really need a big favor from you. I need to set up a process

which will take a backup everyday and delete the previous 

days backup. Can you please help me with it? I would really 

appreciate your help.

Thanks,
Joben]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I really need a big favor from you. I need to set up a process</p>
<p>which will take a backup everyday and delete the previous </p>
<p>days backup. Can you please help me with it? I would really </p>
<p>appreciate your help.</p>
<p>Thanks,<br />
Joben</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Get All the Information of Database using sys.databases Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-99195</link>
		<dc:creator><![CDATA[SQL SERVER – Get All the Information of Database using sys.databases Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Fri, 12 Nov 2010 01:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-99195</guid>
		<description><![CDATA[[...] I wrote blog article SQL SERVER – Finding Last Backup Time for All Database. In the response of this article I have received very interesting script from SQL Server Expert [...]]]></description>
		<content:encoded><![CDATA[<p>[...] I wrote blog article SQL SERVER – Finding Last Backup Time for All Database. In the response of this article I have received very interesting script from SQL Server Expert [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajesh.Dharmakkan</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-99064</link>
		<dc:creator><![CDATA[Rajesh.Dharmakkan]]></dc:creator>
		<pubDate>Thu, 11 Nov 2010 11:53:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-99064</guid>
		<description><![CDATA[Hi pinal, 

The script is much more useful to me also. 

I have a question regarding this. 

How can we get the failed backup operation list. 
In our office we use 5 databases. All the databases are sceduled for backup on every day night, this is scheduled via the job. 

if any one database get failed while executing job, the job shows in error.  How can i know which data base backup get failed. 

Is there any history like this. ?]]></description>
		<content:encoded><![CDATA[<p>Hi pinal, </p>
<p>The script is much more useful to me also. </p>
<p>I have a question regarding this. </p>
<p>How can we get the failed backup operation list.<br />
In our office we use 5 databases. All the databases are sceduled for backup on every day night, this is scheduled via the job. </p>
<p>if any one database get failed while executing job, the job shows in error.  How can i know which data base backup get failed. </p>
<p>Is there any history like this. ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Get Database Backup History for a Single Database Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-98786</link>
		<dc:creator><![CDATA[SQL SERVER – Get Database Backup History for a Single Database Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Wed, 10 Nov 2010 01:31:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-98786</guid>
		<description><![CDATA[[...] is the script suggested by SQL Expert aasim abdullah, who has written excellent script which goes back and retrieves the history of any single [...]]]></description>
		<content:encoded><![CDATA[<p>[...] is the script suggested by SQL Expert aasim abdullah, who has written excellent script which goes back and retrieves the history of any single [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matteo</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-98038</link>
		<dc:creator><![CDATA[Matteo]]></dc:creator>
		<pubDate>Fri, 05 Nov 2010 16:40:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-98038</guid>
		<description><![CDATA[-- Complete info about all databases

SELECT
    database_id,
    convert(varchar(25), DB.name) as dbName,
    convert(varchar(10), Databasepropertyex(name, &#039;status&#039;)) as [Status],
    state_desc,
    (SELECT COUNT(1) FROM sys.master_files WHERE DB_NAME(database_id) = DB.name AND type_desc = &#039;rows&#039;) AS DataFiles,
    (SELECT SUM((size*8)/1024) FROM sys.master_files WHERE DB_NAME(database_id) = DB.name AND type_desc = &#039;rows&#039;) AS [Data MB],
    (SELECT COUNT(1) FROM sys.master_files WHERE DB_NAME(database_id) = DB.name AND type_desc = &#039;log&#039;) AS LogFiles,
    (SELECT SUM((size*8)/1024) FROM sys.master_files WHERE DB_NAME(database_id) = DB.name AND type_desc = &#039;log&#039;) AS [Log MB],
    user_access_desc AS [User access],
    recovery_model_desc as [Recovery model],
    CASE compatibility_level
        WHEN 60 THEN &#039;60 (SQL Server 6.0)&#039;
        WHEN 65 THEN &#039;65 (SQL Server 6.5)&#039;
        WHEN 70 THEN &#039;70 (SQL Server 7.0)&#039;
        WHEN 80 THEN &#039;80 (SQL Server 2000)&#039;
        WHEN 90 THEN &#039;90 (SQL Server 2005)&#039;
    END AS [compatibility level],
    CONVERT(VARCHAR(20), create_date, 103) + &#039; &#039; + CONVERT(VARCHAR(20), create_date, 108) as [Creation date],

    -- last backup
    ISNULL((SELECT TOP 1
        CASE TYPE WHEN &#039;D&#039; THEN &#039;Full&#039; WHEN &#039;I&#039; THEN &#039;Differential&#039; WHEN &#039;L&#039; THEN &#039;Transaction log&#039; END + &#039; - &#039; +
        ltrim(ISNULL(STR(ABS(DATEDIFF(day, GetDate(),Backup_finish_date))) + &#039; days ago&#039;, &#039;NEVER&#039;)) + &#039; - &#039; +
        CONVERT(VARCHAR(20), backup_start_date, 103) + &#039; &#039; + CONVERT(VARCHAR(20), backup_start_date, 108) + &#039; - &#039; +
        CONVERT(VARCHAR(20), backup_finish_date, 103) + &#039; &#039; + CONVERT(VARCHAR(20), backup_finish_date, 108) +
        &#039; (&#039; + CAST(DATEDIFF(second, BK.backup_start_date,
        BK.backup_finish_date) AS VARCHAR(4)) + &#039; &#039;
        + &#039;seconds)&#039;
    FROM msdb..backupset BK WHERE BK.database_name = DB.name ORDER BY backup_set_id DESC),&#039;-&#039;) AS [Last backup],

    CASE WHEN is_fulltext_enabled = 1 THEN &#039;Fulltext enabled&#039; ELSE &#039;&#039; END AS [fulltext],
    CASE WHEN is_auto_close_on = 1 THEN &#039;autoclose&#039; ELSE &#039;&#039; END AS [autoclose],
    page_verify_option_desc AS [page verify option],
    CASE WHEN is_read_only = 1 THEN &#039;read only&#039; ELSE &#039;&#039; END AS [read only],
    CASE WHEN is_auto_shrink_on = 1 THEN &#039;autoshrink&#039; ELSE &#039;&#039; END AS [autoshrink],
    CASE WHEN is_auto_create_stats_on = 1 THEN &#039;auto create statistics&#039; ELSE &#039;&#039; END AS [auto create statistics],
    CASE WHEN is_auto_update_stats_on = 1 THEN &#039;auto update statistics&#039; ELSE &#039;&#039; END AS [auto update statistics],
    CASE WHEN is_in_standby = 1 THEN &#039;standby&#039; ELSE &#039;&#039; END AS [standby],
    CASE WHEN is_cleanly_shutdown = 1 THEN &#039;cleanly shutdown&#039; ELSE &#039;&#039; END AS [cleanly shutdown]
FROM sys.databases DB
ORDER BY dbName, [Last backup] DESC, NAME

Cheers!]]></description>
		<content:encoded><![CDATA[<p>&#8211; Complete info about all databases</p>
<p>SELECT<br />
    database_id,<br />
    convert(varchar(25), DB.name) as dbName,<br />
    convert(varchar(10), Databasepropertyex(name, &#8216;status&#8217;)) as [Status],<br />
    state_desc,<br />
    (SELECT COUNT(1) FROM sys.master_files WHERE DB_NAME(database_id) = DB.name AND type_desc = &#8216;rows&#8217;) AS DataFiles,<br />
    (SELECT SUM((size*8)/1024) FROM sys.master_files WHERE DB_NAME(database_id) = DB.name AND type_desc = &#8216;rows&#8217;) AS [Data MB],<br />
    (SELECT COUNT(1) FROM sys.master_files WHERE DB_NAME(database_id) = DB.name AND type_desc = &#8216;log&#8217;) AS LogFiles,<br />
    (SELECT SUM((size*8)/1024) FROM sys.master_files WHERE DB_NAME(database_id) = DB.name AND type_desc = &#8216;log&#8217;) AS [Log MB],<br />
    user_access_desc AS [User access],<br />
    recovery_model_desc as [Recovery model],<br />
    CASE compatibility_level<br />
        WHEN 60 THEN &#8217;60 (SQL Server 6.0)&#8217;<br />
        WHEN 65 THEN &#8217;65 (SQL Server 6.5)&#8217;<br />
        WHEN 70 THEN &#8217;70 (SQL Server 7.0)&#8217;<br />
        WHEN 80 THEN &#8217;80 (SQL Server 2000)&#8217;<br />
        WHEN 90 THEN &#8217;90 (SQL Server 2005)&#8217;<br />
    END AS [compatibility level],<br />
    CONVERT(VARCHAR(20), create_date, 103) + &#8216; &#8216; + CONVERT(VARCHAR(20), create_date, 108) as [Creation date],</p>
<p>    &#8212; last backup<br />
    ISNULL((SELECT TOP 1<br />
        CASE TYPE WHEN &#8216;D&#8217; THEN &#8216;Full&#8217; WHEN &#8216;I&#8217; THEN &#8216;Differential&#8217; WHEN &#8216;L&#8217; THEN &#8216;Transaction log&#8217; END + &#8216; &#8211; &#8216; +<br />
        ltrim(ISNULL(STR(ABS(DATEDIFF(day, GetDate(),Backup_finish_date))) + &#8216; days ago&#8217;, &#8216;NEVER&#8217;)) + &#8216; &#8211; &#8216; +<br />
        CONVERT(VARCHAR(20), backup_start_date, 103) + &#8216; &#8216; + CONVERT(VARCHAR(20), backup_start_date, 108) + &#8216; &#8211; &#8216; +<br />
        CONVERT(VARCHAR(20), backup_finish_date, 103) + &#8216; &#8216; + CONVERT(VARCHAR(20), backup_finish_date, 108) +<br />
        &#8216; (&#8216; + CAST(DATEDIFF(second, BK.backup_start_date,<br />
        BK.backup_finish_date) AS VARCHAR(4)) + &#8216; &#8216;<br />
        + &#8216;seconds)&#8217;<br />
    FROM msdb..backupset BK WHERE BK.database_name = DB.name ORDER BY backup_set_id DESC),&#8217;-') AS [Last backup],</p>
<p>    CASE WHEN is_fulltext_enabled = 1 THEN &#8216;Fulltext enabled&#8217; ELSE &#8221; END AS [fulltext],<br />
    CASE WHEN is_auto_close_on = 1 THEN &#8216;autoclose&#8217; ELSE &#8221; END AS [autoclose],<br />
    page_verify_option_desc AS [page verify option],<br />
    CASE WHEN is_read_only = 1 THEN &#8216;read only&#8217; ELSE &#8221; END AS [read only],<br />
    CASE WHEN is_auto_shrink_on = 1 THEN &#8216;autoshrink&#8217; ELSE &#8221; END AS [autoshrink],<br />
    CASE WHEN is_auto_create_stats_on = 1 THEN &#8216;auto create statistics&#8217; ELSE &#8221; END AS [auto create statistics],<br />
    CASE WHEN is_auto_update_stats_on = 1 THEN &#8216;auto update statistics&#8217; ELSE &#8221; END AS [auto update statistics],<br />
    CASE WHEN is_in_standby = 1 THEN &#8216;standby&#8217; ELSE &#8221; END AS [standby],<br />
    CASE WHEN is_cleanly_shutdown = 1 THEN &#8216;cleanly shutdown&#8217; ELSE &#8221; END AS [cleanly shutdown]<br />
FROM sys.databases DB<br />
ORDER BY dbName, [Last backup] DESC, NAME</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anil</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-97862</link>
		<dc:creator><![CDATA[Anil]]></dc:creator>
		<pubDate>Thu, 04 Nov 2010 18:15:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-97862</guid>
		<description><![CDATA[I use the following query:-



SELECT  B.name as Database_Name, ISNULL(STR(ABS(DATEDIFF(day, GetDate(), 
        MAX(Backup_finish_date)))), &#039;NEVER&#039;) as DaysSinceLastBackup,
        ISNULL(Convert(char(10), MAX(backup_finish_date), 101), &#039;NEVER&#039;) as LastBackupDate
        FROM master.dbo.sysdatabases B LEFT OUTER JOIN msdb.dbo.backupset A 
        ON A.database_name = B.name AND A.type = &#039;D&#039; GROUP BY B.Name ORDER BY B.name]]></description>
		<content:encoded><![CDATA[<p>I use the following query:-</p>
<p>SELECT  B.name as Database_Name, ISNULL(STR(ABS(DATEDIFF(day, GetDate(),<br />
        MAX(Backup_finish_date)))), &#8216;NEVER&#8217;) as DaysSinceLastBackup,<br />
        ISNULL(Convert(char(10), MAX(backup_finish_date), 101), &#8216;NEVER&#8217;) as LastBackupDate<br />
        FROM master.dbo.sysdatabases B LEFT OUTER JOIN msdb.dbo.backupset A<br />
        ON A.database_name = B.name AND A.type = &#8216;D&#8217; GROUP BY B.Name ORDER BY B.name</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aasim abdullah</title>
		<link>http://blog.sqlauthority.com/2010/11/04/sql-server-finding-last-backup-time-for-all-database/#comment-97777</link>
		<dc:creator><![CDATA[aasim abdullah]]></dc:creator>
		<pubDate>Thu, 04 Nov 2010 09:18:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10739#comment-97777</guid>
		<description><![CDATA[-- for single db back up history i use

     DECLARE @db_name VARCHAR(100)
        SELECT  @db_name = DB_NAME()

    -- Get Backup History for required database

        SELECT TOP ( 30 )
                s.database_name,
                m.physical_device_name,
                cast(CAST(s.backup_size / 1000000 AS INT) as varchar(14))
                + &#039; &#039; + &#039;MB&#039; as bkSize,
                CAST(DATEDIFF(second, s.backup_start_date,
                              s.backup_finish_date) AS VARCHAR(4)) + &#039; &#039;
                + &#039;Seconds&#039; TimeTaken,
                s.backup_start_date,
                CAST(s.first_lsn AS varchar(50)) AS first_lsn,
                CAST(s.last_lsn AS varchar(50)) AS last_lsn,
                CASE s.[type]
                  WHEN &#039;D&#039; THEN &#039;Full&#039;
                  WHEN &#039;I&#039; THEN &#039;Differential&#039;
                  WHEN &#039;L&#039; THEN &#039;Transaction Log&#039;
                END as BackupType,
                s.server_name,
                s.recovery_model
        FROM    msdb.dbo.backupset s
                inner join msdb.dbo.backupmediafamily m ON s.media_set_id = m.media_set_id
        WHERE   s.database_name = @db_name
        ORDER BY backup_start_date desc,
                backup_finish_date]]></description>
		<content:encoded><![CDATA[<p>&#8211; for single db back up history i use</p>
<p>     DECLARE @db_name VARCHAR(100)<br />
        SELECT  @db_name = DB_NAME()</p>
<p>    &#8212; Get Backup History for required database</p>
<p>        SELECT TOP ( 30 )<br />
                s.database_name,<br />
                m.physical_device_name,<br />
                cast(CAST(s.backup_size / 1000000 AS INT) as varchar(14))<br />
                + &#8216; &#8216; + &#8216;MB&#8217; as bkSize,<br />
                CAST(DATEDIFF(second, s.backup_start_date,<br />
                              s.backup_finish_date) AS VARCHAR(4)) + &#8216; &#8216;<br />
                + &#8216;Seconds&#8217; TimeTaken,<br />
                s.backup_start_date,<br />
                CAST(s.first_lsn AS varchar(50)) AS first_lsn,<br />
                CAST(s.last_lsn AS varchar(50)) AS last_lsn,<br />
                CASE s.[type]<br />
                  WHEN &#8216;D&#8217; THEN &#8216;Full&#8217;<br />
                  WHEN &#8216;I&#8217; THEN &#8216;Differential&#8217;<br />
                  WHEN &#8216;L&#8217; THEN &#8216;Transaction Log&#8217;<br />
                END as BackupType,<br />
                s.server_name,<br />
                s.recovery_model<br />
        FROM    msdb.dbo.backupset s<br />
                inner join msdb.dbo.backupmediafamily m ON s.media_set_id = m.media_set_id<br />
        WHERE   s.database_name = @db_name<br />
        ORDER BY backup_start_date desc,<br />
                backup_finish_date</p>
]]></content:encoded>
	</item>
</channel>
</rss>
