x

My database switched to master DB

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

more ▼

asked Sep 06, 2014 at 04:55 AM in Default

avatar image

Therealist
281 9 19 30

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

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 exists. Its basically a readonly offline mdf viewer, and it is awesome.

more ▼

answered Sep 06, 2014 at 12:16 PM

avatar image

zippy1981
31 2 3

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x18
x10
x-7

asked: Sep 06, 2014 at 04:55 AM

Seen: 368 times

Last Updated: Sep 06, 2014 at 12:20 PM

Copyright 2017 Redgate Software. Privacy Policy