title: SQL Server database has 2 log files and I want to remove one. HOW?
body: <p>I am new to this. I have a database (created by someone else) that has 2 .ldf files. (blah_log.ldf and blah_log2.ldf). My manager asked me to remove one of the log files but I cannot. How do I do this? I tried to put it on another server, detach, delete log files, attach, but it gives an error. I thought that way it would create just one, but it wanted both. Then i tried to right click properties and delete the files, would not let me delete. It said the log file was not empty. How in the heck do I achieve this. I just want to make it where the dang database has one freaking log file not two. This shouldn't be this complicated. I am a beginner and know nothing so maybe it isn't really. Please HELP! </p>
  
  <p>I just tried this:
  empty SQL Server database transaction log file</p>
  
  <p>backup log [dbname] with truncate_only
  go
  DBCC SHRINKDATABASE ([dbname], 10, TRUNCATEONLY)
  go</p>
  
  <p>Then I deleted the second log file and clicked ok. I guess this is all I need to do? I tried it on a test server from a restore.</p>