Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete old files using tsql

Status
Not open for further replies.

gday2u

Programmer
Apr 3, 2003
6
AU
I am relatively new to SQLserver and I am putting together
some TSQL code to backup our databases and transaction logs.
I want to also include some code which will delete backup
files older than a specified number of days.

Has anyone written some code to do this ?

TIA
 
You seem to be reinventing the wheel.

Open up Enterprise manager.

Find Management in the tree on the left. Open it up and find database maintenance plans. Use the wizard to create a backup plan.

It will do all the thing you listed in about 2 minutes of clicking on buttons. No code required.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top