• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 678
  • Last Modified:

how to delete old .bak old files in MSSQL 08

Hello Experts,

I am running sql2008 and I noticed that the free space available is getting smaller and smaller.
I Have many backups and transaction log files from years ago. How can I get rid of them? I am new to this and I was wondering if there is a way to do it the wizard way?
I noticed a shrink database option on the database task... would that get rid of my old backup files???

Any suggestion???
0
shpresa
Asked:
shpresa
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
create a dos batch file on the server and schedule it to run once a day

http://technicallyeasy.net/2011/02/delete-files-older-number-days-dos/
0
 
AnujCommented:
Maintenance plan in SSMS comes with a tool to delete old files, you can check this here

You can do the same using SSIS also.

Shrink operation does not do cleanup, shrink allows you to reclaim the unused space in database or log files. This is not recommended best practice as this unused space is reused by the database when it grows in future, Another bad thing about shrink is, very resource consuming also, makes your index fragmented causing performance problems.
Shrink is recommended only when you have a space issue or after dropping or deleting huge tables.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now