Wednesday, March 21, 2012

Out of control log file

To all:
I have a database that's about 2.5 GB in size, but the log file has grown to
over 55GB and has eaten up almost all of my drive space. How can I
remove/replace/compress that log file to recover my hard drive space back?
I've tried recreating the log file by running sp_detach_db, creating a new
log file, and then reattaching the db but it fails. Any suggestions are
greatly appreciated. Thanks in advance.
Steve
Steven Johnston wrote:
> To all:
> I have a database that's about 2.5 GB in size, but the log file has
> grown to over 55GB and has eaten up almost all of my drive space. How
> can I remove/replace/compress that log file to recover my hard drive
> space back? I've tried recreating the log file by running
> sp_detach_db, creating a new log file, and then reattaching the db
> but it fails. Any suggestions are greatly appreciated. Thanks in
> advance.
Read BOL about backup of your database. You can only shrink your tx log
if you do a backup (or do a log backup for truncation only). HTH
robert
|||Have a look here:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp Shrinking
considerations
http://www.nigelrivett.net/Transacti...leGrows_1.html Log File issues
http://www.support.microsoft.com/?id=317375 Log File Grows too big
http://www.support.microsoft.com/?id=110139 Log file filling up
http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
and AutoShrink
http://www.support.microsoft.com/?id=272318 Shrinking Log in SQL Server
2000 with DBCC SHRINKFILE
http://www.support.microsoft.com/?id=873235 How to stop the log file from
growing
http://www.support.microsoft.com/?id=305635 Timeout while DB expanding
http://www.support.microsoft.com/?id=307487 Shrinking TempDB
Andrew J. Kelly SQL MVP
"Steven Johnston" <saj3@.jasper.he.net> wrote in message
news:%23BT4PoUOGHA.2472@.TK2MSFTNGP11.phx.gbl...
> To all:
> I have a database that's about 2.5 GB in size, but the log file has grown
> to over 55GB and has eaten up almost all of my drive space. How can I
> remove/replace/compress that log file to recover my hard drive space back?
> I've tried recreating the log file by running sp_detach_db, creating a new
> log file, and then reattaching the db but it fails. Any suggestions are
> greatly appreciated. Thanks in advance.
> Steve
>

No comments:

Post a Comment