Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I delete the MSSql log files?

Posted on 2008-10-02
6
Medium Priority
?
842 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

There are some very powerful Dynamic Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a di…
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

604 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