I have a test database and I was able to see the database in SSMS and all of a sudden Its not listng my database and When I checked the mdf and ldf files they seems to be locked . I am using Sql server 2008 R2. Can anyone help me?
1 Answer
Just converting the part of comment to an answer so as to close this question:
It seems like someone had the database detached, because of which database was not visible and hence you were also able to view its respective mdf and ldf.
Right Click Databases--> click Attach--> Choose the respective mdf files for the database in question.
Refresh and check , the database should be visible.
sys.databases
?