troubleshooting Question

RESTORE MASTER DATABASE -- NOW

Avatar of dbaSQL
dbaSQLFlag for United States of America asked on
Microsoft SQL Server
2 Comments1 Solution137 ViewsLast Modified:
There was an outage -- the drives that held logs were lost, so I had to rebuild the system databases to bring the system up, and then restore all databases.  Now I need to restore the master so that I can get all the logins back onto the instance -- but for the life of me, I cannot get the instance into single user AND do the restore of the master db.

I stop the service in config mgr
All other sql server services are disabled, so none of them will intrude
I got to cmd prompt and open up sqlcmd -- manuever to the sqlservr.exe directory, and run this;  .\sqlservr.exe –c –m
I get all kinds of output, including the service has started in single user mode....
then I open another cmd prompt and try to start sqlcmd, but of course, it tells me

    Login failed for user 'domain\me.'. Reason: Server is in single user mode. Only one administrator can connect at this time..

So then I try this -
Turn service back on, normal  mode
open cmd prompt, input my sqlcmd statement to restore the master databsase, and leave it there
   RESTORE DATABASE master FROM DISK = '.... master.bak' WITH REPLACE
Turn off service
open cmd prompt and run this to startup in single user mode:   .\sqlservr.exe –c –m
starts up fine, so I go back to my RESTORE statement and attempt to run it -- it fails, like this:

C:\Users\me>sqlcmd
1> RESTORE DATABASE master FROM DISK = '....master.bak' WITH REPLACE
2> GO
Shared Memory Provider: No process is on the other end of the pipe.
Communication link failure

What is the correct sequence to make this happen?  I must complete this recovery asap.  Any input is greatly appreciated.
ASKER CERTIFIED SOLUTION
dbaSQL
Consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros