Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 SQL and Removing Old Backup Files

Author  Topic 

Bird
Starting Member

3 Posts

Posted - 2006-07-18 : 09:22:13
Our plan is configured to delete files older than 4 weeks.

Does anyone know what SQL looks at to determine if the file is the correct one to delete (File name, Time/Date stamp, something in the file)??

The reason I ask is we had a file about 4 months old restored to the backup location. The file name was change but still deleted. So we are trying to figure out if SQL did it during the maintenance plan or something else happened.

Thanks....

nr
SQLTeam MVY

12543 Posts

Posted - 2006-07-18 : 09:51:25
Don't use maintenance plans.
Code the backups yourself and include the datetime in the filename.
Write the delete job based on the filename.
see
http://www.nigelrivett.net/SQLAdmin/BackupAllDatabases.html

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Bird
Starting Member

3 Posts

Posted - 2006-07-18 : 10:02:33
Interesting solution.....however our plans are working very well. We have different retention periods on databases as well as frequency of backups depending on how critical the db is to our business.

This was more of a curious question on how SQL determines which files are truely old backup files so it knows which files to delete and which ones to leave alone? Any thoughts.
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-07-18 : 10:09:58
Probably does a restore header only

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Bird
Starting Member

3 Posts

Posted - 2006-07-18 : 11:08:01
Thanks.....
Go to Top of Page
   

- Advertisement -