0

I need to restore master Db on my SQL 2005. But I get an error. From prompt I stop the sql instance, then restart it in single user mode with /m command. Then launching sqlcmd -s nameistance I've this error

Msg 18461, Level 14, State 1, Server ServerName, Line 1. Login Failed for user 'ServerName/Administrator'. Reason: server is in single user mode. Only one administrator can connect at this time.

Then I go to stop all other sql service and sqlcmd work.

Then I restore the master DB and going restarting sql, the service don't want to start.

Maybe a user problem? Restoring old master I don't restore the new user created in the new sql installation and it don't start it? Or what?

I give to you some more details of the situation. The server hard disk where an ERP was installed, crash at startup. I've all backup for master, msdb, model and society dB and ERP core. Then I've all MDF and log file for all SQL DB in the data folder. Now I've restored all backup, so not MDF, and the only one I can't restore is the master. The ERP is very old and need SQL 2005.

As I read you mean that is not enough to have DB but I need also Windows registry key? Because the support has been discontented and my reseller don't have setup for server. They don't remember if it's enough to restore only DB so I want to restore also master to understand if it can work the same. I've also the server folder with all ERP files. There's no installation folder in the server. Only this folder copied manually in C:

Original Master has one table dedicated to user login, that in the standard SQL master is not present. And the error I receive from clients is for a user login problem. But when I restore master, SQL service don't start. So I was thinking that, if in the new installation of SQL I've set an user different from to original one, because I don't know it, so when I restore the old one, user is different and SQL don't start.

3
  • 1
    Out of curiosity, why are you running SQL Server 2005 today in 2021?
    – Dai
    Commented Dec 3, 2021 at 0:12
  • 2
    The trick is to disable all other SQL Server services (like SQL Agent) as well as disabling all network endpoints that SQL Server has enabled, and then connect using the command-line client in shared-memory mode.
    – Dai
    Commented Dec 3, 2021 at 0:14
  • The output of the ERRORLOG is required for you to analyze why is the instance not starting.
    – Hybris95
    Commented Dec 7, 2021 at 15:30

1 Answer 1

3

So you did manage to restore the master database, but SQL Server wouldn't start after the restore.

First step is to consider the boot process:

  1. SQL server opens the files for the master database, the path are in the registry.
  2. It does recovery of the model database, the path for model mdf file is in the master database.
  3. It creates tempdb, the paths where to create the tempdb files are in the master database.

There are a lot more details than that, of course, but above are major points of SQL Server's boot process. If any of above fails, then SQL Server won't start.

You need to figure your why SQL server didn't start. Check the errorlog file. Then act (or leave a comment here and complement your post with info about the error messages that caused your SQL Server to not start).

2
  • I've integrated the question with more details. I'll post the error log as I can control it.. maybe 1 or 2 hour. Thank you!
    – BigBlack
    Commented Dec 3, 2021 at 13:25
  • I don't know why you refer to the registry in your addition, I didn't mention the registry in my reply. Nor did I mention anything about users. I feel hesitant about the file copy thing you mention, but there is too little details about what you did to comment on. Again, you need to figure out why your SQL Server refuses to start (the errorlog file). If the problem is far wider than that (i.e., even with SQL server started you have issues), consider hiring a consultant. Commented Dec 3, 2021 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.