?
Solved

How do I delete the MSSql log files?

Posted on 2008-10-02
6
Medium Priority
?
841 Views
Last Modified: 2012-05-05
I have recently set my MSSql database properties for the Recovery Model to "Options" 'Simple" to limit their growth. I am completely out of disk space because of heses two log files:
C:\Program Files\Microsoft SQL Server\MSSQL\Data\CSSDemoInstanceCSSDemo_LDF
C:\Program Files\Microsoft SQL Server\MSSQL\Data\CSSInstanceCSS_LDF

How do I delete the information in these files, that I don't need, so I can free up more space?

0
Comment
Question by:cssc1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 1000 total points
ID: 22624194
if you've set to simple, you'll need to shrinkthem.


dbcc shrinkfile('CSSDemoInstanceCSSDemo_LDF', 0)
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22624197
btw..you can't delete them as they are required by sql to function.
0
 
LVL 41

Assisted Solution

by:graye
graye earned 1000 total points
ID: 22626327
There may be some good business reasons to why you would want your database in the "Full" recovery model.   So later, if you decide to switch back to the "Full" recovery model, there are some simple steps you can use to curb the growth of log files.
The bottom line is this....   you control the growth of the log files with periodic log backups, and you control the size of the log files with a shrink operation.
http://home.hot.rr.com/graye/Articles/SQL_LogMaintenance.htm 
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22626352
>>and you control the size of the log files with a shrink operation

If you keep well enough control of backing up the log files, you shouldn't really need to shrink them.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
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.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

752 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