How do I delete the MSSql log files?

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?

cssc1Asked:
Who is Participating?
 
chapmandewCommented:
if you've set to simple, you'll need to shrinkthem.


dbcc shrinkfile('CSSDemoInstanceCSSDemo_LDF', 0)
0
 
chapmandewCommented:
btw..you can't delete them as they are required by sql to function.
0
 
grayeCommented:
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
 
chapmandewCommented:
>>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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.