November 23, 2002 at 3:26 pm
Hi there, I have a major problem. I backed up my databases, deleted the databases, reinstalled sql server and now am trying to restore the databases. However, I cannot put the master database to single user mode. I get the following error in Query Analyser:
Server: Msg 5058, Level 16, State 5, Line 1
Option 'SINGLE_USER' cannot be set in database 'MASTER'.
And in Enterprise Manager, the option is greyed out. What do I do? I need to get this database up soon as there are some jobs that run in about 3-4 hours. Thanks!
November 23, 2002 at 4:45 pm
Sorry I haven't got SQL on this machine. You have to set a startup flag that puts the server in single user mode.
It should be in BOL.
Sorry I can't be more specific.
Probably look under sqlserver.exe in BOL
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
November 23, 2002 at 4:55 pm
I believe the flag is -m check out
http://dbforums.com/archives/t215896.html
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
November 23, 2002 at 4:59 pm
Yes it is. Simon, thank you.
I think I should be running this:
net stop mssqlserver
and then
sqlservr.exe -m
And then restore, correct?
November 24, 2002 at 10:18 am
Yep thats it
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
November 25, 2002 at 5:35 am
You need the -c option also.
From BOL
quote:
How to start the default instance of SQL Server in single-user mode (Command Prompt)To start the default instance of SQL Server in single-user mode from a command prompt
From a command prompt, enter:
sqlservr.exe -c -m
Note You must switch to the appropriate directory (for the instance of Microsoft® SQL Server™ you want to start) in the command window before starting sqlservr.exe.
November 25, 2002 at 6:10 am
-c is not essential, this just means it is not starting as a service, so can't be controlled through services
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
November 25, 2002 at 2:03 pm
Well, I ran into a problem, even with starting the service manually. My backup software is Veritas Backup Exec 8.6. It sitting on our backup server. For some reason Veritas could not see the database when it was started manually. I got the following error:
Unable to attach to DBNAME.
The item was not found.
Any idea why this would happen? Thank you.
November 25, 2002 at 7:06 pm
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply