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)
 Way to get rid off old backups that are 4 days old

Author  Topic 

avkravi
Starting Member

8 Posts

Posted - 2003-04-24 : 03:17:02
Hello Everybody,

I am a new entrant to this forum. I was given a task to design a procedure for backing up all the databases which were residing on 2 servers consisting of SQL 7 (7.00.0623) and SQL 2000 (8.00.760). A DB maintenance plan has been created by my predecessor which is doing fine but not able to delete the backups which were 4 days old after checking the options in the maintenance wizard.

I went through Mr. Narayana Vyas article on "Best Practices ..." and very knowledgable. But some time should go for me to have a very good understanding of the SQL Administration.

I request you people to help me with your valuable suggestions in this matter.

Thanks in advance


Ravi

KnooKie
Aged Yak Warrior

623 Posts

Posted - 2003-04-24 : 08:24:29
within the maintenance plan there is the option to remove backups older than whatever date you specify. We have been doing this for ages with no problems at all.

====
Paul
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2003-04-24 : 08:40:18
Don't like maint plans.

I always create the backups as
dbname_FULL_yyyymmdd_hhmm.bak

Then it's a simple job to get the directory list and delete old ones.
If you don't want that sort of format you can use the timestamp on the file.

To get a directory list use xp_cmdshell with a dir command.

==========================================
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
   

- Advertisement -