How trancate log files in simple mode?

Posted on 2009-12-16
Last Modified: 2012-05-08
I  don't plan on doing point in time recovery on my databases, so the recovery mode is "Simple". The transaction logs are suppose not to get so large.  However, the log files are still are big, even when I have allocated 200 MB and errors in the SQL Server occur. How can I truncate the log files when in simple mode?
Question by:gtrapp
    LVL 75

    Accepted Solution

    DBCC SHRINKFILE (databaseLogFile, 10)
    LVL 142

    Assisted Solution

    by:Guy Hengel [angelIII / a3]
    you want to shrink the file.
    use this syntax:

    DBCC SHRINKFILE your_log_file

    also, check out:


    while connected to your database to see if you have any old open transactions

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
    Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

    737 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

    22 Experts available now in Live!

    Get 1:1 Help Now