Thursday, March 22, 2012

Database file and log

Hi,

I am just about to get familiar with SQL-Server 2005. Since I created a database and played a little with it I recognized that the database file has grown up to 150 MB as well as the log file.

I used the shrink task to resize the database file. After doing so the .ldf remained as it was (150 MB). Since I would not need log information stored there, is it possible to shrink the ldf-file as well?

Thanks for your help!

Hi,

have a look here: http://www.aspfaq.com/show.asp?id=2471

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||rather than shrink the log file every single time, you can set the recovery model to SIMPLE for the database, which uses minimal disk space for the log file. See ALTER DATABASE on books online.|||

Hi,

but keep in mind that with your setting backup mode to simple you might loose some features of your implemented database backpup strategy. Read more about this in the BOL under "Rovery models".

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||Thanks to both of you I could finally learn something about the log files and also resolve my problem.

No comments:

Post a Comment