I have database I am trying to attach. In SSMS the database does not show in the listing. However, the .mdf and .ldf files are shown. When I try to attach the database I get the following error:
Msg 5120, Level 16, State 101, Line 1
Unable to open the physical file "F:\TPTVSQL\TVDB336.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
The database name shows in sys.master_files, but does not show in sys.databases. I can path to the actual database files, but nothing I've tried has worked for attaching the database. I am a system admin with full control to the system. Any ideas?