Detached database creating log file on sql server restart

  • We have a database(say A) for which the log file got corrupted. We tried to restore it by trying out a few things none of which worked properly. Finally we detached the database and now it's gone. We want to create a fresh database with the same name(A) and location so we stopped the SQL server and moved all the data and log files from the originial location. However everytime we restart SQL server it creates a log file with same name at the same location. Now when we run our create DB script, it fails because it is not able to overwrite the above created log file.

    The problem is that although the original corrupt database A was detached, we are not able to get rid of the log file associated with that database. Can anyone please help resolve this?

  • found the issue guys. somehow the tempdb log file was set to the same path as the database logfile and this was the reason it is getting re-created everytime the database re-started.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply