Thursday 13 September 2012





Restoring system database on Sql Cluster.





When dealing with system database restore on a cluster environment, this requires additional steps compared against a standalone environment.  When you try to connect to the clustered sql instance in single user mode, you most likely will get the message .






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

 



 

This is usually because the NT Authority \ System account is already connected to the instance, preventing you from connecting.




Solution:

Stop the sql server instance on the cluster resource.
 
Open an command prompt and start the sql instance in single user mode by running the following command.

%programfiles%\Microsoft SQL Server\MSSQL.X\MSSQL\Binn>sqlservr -m -s MyVirtualServerName\MySqlInstance

(The sqlservr .exe to run is usually located under the directory %programfiles%\Microsoft SQL Server\ MSSQL.X , X being the number of the intended Sql instance)

 
When the sql instance had started in single user mode
 
Open another command prompt and use SqlCmd to connect to the sql instance.
 
sqlcmd -S MyVirtualServerName\MySqlInstance -E

now run the restore command in sqlcmd for the master database



The system database should now be restored. 

No comments:

Post a Comment