April 25, 2008 at 1:13 am
Hi,
Can anyone tell me what is the best method to shrink the file size of ldf file.
Thanks
Chandra Mohan N
[font="Verdana"]Thanks
Chandra Mohan[/font]
April 25, 2008 at 2:30 am
hi,
first check, how many trancation going on per min. & assign log file growth.
second, how frequent log file growth pattern & those log are important are business or not,
third, dont shrink log file during in business hours(pick hours), it take some time.
syntax:
1) backup log db_name with truncate_only
2) dbcc shrinkfile (2,500) or dbcc shrikfile (logfilename, 500)
April 25, 2008 at 3:16 am
I agree with SK.
You will want to monitor the txn log file growth, and based on that set in the growth parameters by appropriate size numbers. If you txn log drive space constraints, then the only option would be to shrink the log files to a minimum based on the observation you have made during monitoring. Apart from this, just see if you could add another log file to a drive in the system to avoid an unfortunate outage.
Hope this helps!
Viking
April 25, 2008 at 5:25 am
I assume you are using the Full recovery model?
why would you backup the log with truncate only? surely that renders the log useless and hence your ability to recover?
Do you need the Full recovery model? If you don't then placing the database in simple mode will help better manage the transaction log size.
If you need the full recovery model adjust the frequency of your log backups that will help maintain the size transaction log
To shrink the file i would take a normal backup then run the dbcc shrinkfile command. You can look up the correct syntax in BOL
Gethyn Elliswww.gethynellis.com
April 25, 2008 at 5:34 am
CM,
r u understand or not?
IF any doubt, first check on test DB enviornment & go on live sever.
i think, this is proper solution as per my knowledge..
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply