December 6, 2011 at 5:23 am
Hi,
There are 3 log files(.ldf) in the database.
I want to make them into one log file.
Could some one provide the procedure to delete the 2 log files .
Thanks.
December 6, 2011 at 6:18 am
This should give you what you want. Note the link at the very top of this page regarding emtptying files.
How to: Delete Data or Log Files from a Database (SQL Server Management Studio)
December 6, 2011 at 7:24 am
thanks for the link...
should we directly delete the log files?
is there no data impact ?
December 6, 2011 at 7:37 am
you cannot directly delete the log files. You need to empty them with log backups and ensure the one file you need is the active file.
Also, make sure if you reduce to one file that the one file has enough space in it to handle the peak transaction log load between log backups.
December 6, 2011 at 7:40 am
Also worthy to note that logs are use SEQUENTIALLY. So there's no point in having more than 1 log file aside from having the main drive full and needing more space on a 2nd drive.
Having more than 1 log file does NOT help performance.
December 6, 2011 at 7:44 am
thanks...
December 9, 2011 at 1:53 am
if you only want to keep one log file you dont have a choice which one, you must keep the log file with file id of 2, delete all others either via the database properties dialog or by the alter database t-sql command
use DBCC LOGINFO to determine which logs contain active transactions
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply