October 24, 2012 at 2:54 am
Comments posted to this topic are about the item Get Databases with no backup
October 24, 2012 at 7:28 pm
For MS-SQL 2000, the list of databases is only in the master database.
http://msdn.microsoft.com/en-us/library/aa260406%28v=sql.80%29.aspx
Modifying "sys.databases" to read "master..sysdatabases" worked for me. Here is the resulting script:
use msdb
go
select distinct
d.name
from master..sysdatabases d
left join backupset bs
on bs.database_name = d.name
where bs.database_name is null
and d.name <> 'tempdb'
order by d.name
January 30, 2014 at 12:57 am
It's a simple and effective tool!
I would change it to include any databases whose last backup is older than X days.
It's also intesresting to see how restoring a database from server A to server B creates a row in the msdb.backupset table of server B indicating where the backup came from and when it was done, etc.
April 27, 2016 at 1:51 pm
Thanks for the script.
May 9, 2016 at 1:19 pm
Turned out to be a good one.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply