how to delete old .bak old files  in MSSQL 08

Posted on 2012-09-17
Last Modified: 2012-09-17
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???
Question by:shpresa
    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
    create a dos batch file on the server and schedule it to run once a day
    LVL 15

    Accepted Solution

    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.
    LVL 10

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
    This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now