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:

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.
LVL 18
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dbaSQLAuthor Commented:
Problem resolved.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dbaSQLAuthor Commented:
When I was starting the service in single user mode, I was also opening a connection.  When I corrected the startup, the restore completed immediately, without error.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.