Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favourite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved in your SSC briefcase from the favorites tab.
Download now (direct download link)

List SQL backups

By J. T. Shyman,

During the process of developing a script to make copies of local SQL database and transaction log backups, I needed to come up with an easy way of locating the backup files. This script queries the SQL2000 backup tables in the msdb database and returns backup start dates, types (D=database, L=Log, I=Differential) and the location of the backup file.

The variable @DBName should be set to the name of the database you want to query on. It is not case sensitive unless your collation is.

The variable @Days should be set to how many days back in the records you want to list backups for.

Total article views: 583 | Views in the last 30 days: 3
 
Related Articles
FORUM

database backup

database backup

FORUM

backup database

backup database

FORUM

Database backup

Database backup

FORUM

Database Backup

Database Backup

FORUM

Proper way to backup databases

backup databases

 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones