I have recovered one of my databases from suspect mode successfully,at the final stage i saw the result that says "database switched to Master database" since then what ever the operations that occurring on the recovered database are reflecting on Master database, for instance if i create a table under the recovered DB i am seeing that table saved in Master DB, so i am wondering how to make the recovered database work normally as it was before crashing like other user databases Thanks in advance
Truely odd. First of all, do a `select * from sys.databases` and a `select * from sys.databases_files` in both master and the database your restored and post that in your questions. The second thing I'd check for is what are the command line options of the sqlservr.exe process. The third thing I would do is look for clues in `mssqlsystemresource.mdf`. That is the "secret database" in the binn folder that can only be accessed via the DAC connection in single user mode. I don't see where in mssqlsystemresource the location of master is stored, but its probably there and its possible you might be able to change it with just an `update` query. Finally, as an aside, when you screw around with the internals of SQL Server, you should be aware [OrcaMDF](
https://github.com/improvedk/OrcaMDF) exists. Its basically a readonly offline mdf viewer, and it is awesome.