November 19, 2009 at 5:40 am
Can any one tell me how to shrink log file.
I have a database in that log file is 15 GB and data file size is 148 MB.
Please can someone help me for this..
Thanx in advance
Satish R
November 19, 2009 at 5:55 am
-Vikas Bindra
November 19, 2009 at 6:09 am
Thanks Vikas for quick reply, I already use
DBCC SHRINKFILE (DBName, Size)
for reducing my database but it not work. Database base log file size remain same.
I also run a script:-
http://www.sqlservercentral.com/scripts/63782/
but this is only for 2005 not for 2008.
Is their any other way to comprase/Delete Log file.
Thanks
-Satish R
November 19, 2009 at 6:14 am
I have a database in that log file is 15 GB and data file size is 148 MB.
is your DB 15gb and log = 148? or the ther way around?
either way, you can try the easy way:
in SSMS, right click the DB, Tasks, Shrink, Files.
You will see a screen with options:
Set: FILE TYPE to Log
At the Bottom you wil se Shrink Action Options:
1. Release unused space
2. Reorganize Pages ......
3. Empty file by moigrating data.
my choice is 1 or 2.
3 will give you sort of the same result as Truncating it. But it wont make the file smaller, just emptier.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
November 19, 2009 at 6:47 am
satish.ratnaparkhi (11/19/2009)
Thanks Vikas for quick reply, I already useDBCC SHRINKFILE (DBName, Size)
for reducing my database but it not work. Database base log file size remain same.
I also run a script:-
http://www.sqlservercentral.com/scripts/63782/
but this is only for 2005 not for 2008.
Is their any other way to comprase/Delete Log file.
Thanks
-Satish R
Hi Satish,
If DBCC SHRINKFILE with target size is not working then can you open DBCC SHRINKFILE in BOL and there a section "The File Does Not Shrink", try the steps provided there and let us know the output.
-Vikas Bindra
November 19, 2009 at 7:04 am
After doing whatever proccess told by Henrico. Database size remain same, and in my database ldf size is 15gb and mdf size is 200mb.
Actually I want to make ldf size smaller. so I can restore into the testing server, for futher testing.
With DBCC SHRINKFILE option I think it is not possible. So, Is there any other way to do it.
Thanks
Satish R
November 19, 2009 at 7:12 am
Please read through this - Managing Transaction Logs[/url]
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy