I am new to this. I have a database (created by someone else) that has 2 .ldf files in it. (blah_log.ldf and blah_log2.ldf). My manager asked me to delete one of the log files, but I canβt. How can I do it? I tried to put it on another server, disconnect, delete the log files, attach, but it gives an error. I thought this would create only one, but he wanted both. Then I tried to right-click and delete the files, would not let me delete. He said the log file is not empty. How the hell am I doing this? I just want to do this where the dang database contains one log file without two files. It should not be so difficult. I am new and donβt know anything, so maybe this is not so. Please help!
I just tried: empty SQL Server database transaction log file
backup log [dbname] with truncate_only go DBCC SHRINKDATABASE ([dbname], 10, TRUNCATEONLY) go
Then I deleted the second log file and clicked OK. Think that's all I need? I tried this on a test server from recovery.
source share