Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 17,645 of 19,505    |
|    Erland Sommarskog to miroslavsi@gmail.com    |
|    Re: Shrinking database, simple model    |
|    24 Sep 09 11:14:05    |
      From: esquel@sommarskog.se              m (miroslavsi@gmail.com) writes:       > We have database in SIMPLE recovery model.       >       > MDF file is about 3GB       > but LDF file is about 15GB       >       > We tried to shrink LDF, and after shrinking we got LDF about 7GB.       >       > We used shrinking before and LDF file was always about 1Mb.       >       > Can anyone tell me why SQL server still keep that 7 GB in LDF file and       > is there any chance for server to release that space on his own without       > forsing it? Is that just a question of time, and becouse SIMPLE recovery       > model SQL server will do it by itself?              First, if the log file keeps growing to 15 GB, let it be that size. You       only lose performance if you shrink it. Particularly if you shrink to 1MB       with 10% autogrow.              If your log files grows to that size in simple recovery, this means that       you have individual transactions that require that amount of log space.       Do you perform heavy table reloads? Maybe these could be improved?              One reason the file does shrink more is that there is an open transaction.       The log will not be truncated past the oldest transaction in the database.       You can run DBCC OPENTRAN in the database to find out.                            --       Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se              Books Online for SQL Server 2005 at       http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx       Books Online for SQL Server 2000 at       http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca