Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

How to restore master database.? Expand / Collapse
Author
Message
Posted Sunday, June 28, 2009 11:43 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 7:54 PM
Points: 1,569, Visits: 2,631

what are the steps to restore master database..?

Thanks.


Post #743363
Posted Sunday, June 28, 2009 11:58 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, June 13, 2014 12:27 PM
Points: 267, Visits: 386
go to services >> double click the SQL Server service>>
stop the service >> type "-m" (excluding quotes) in the start parameters and click on start (do not click ok) >> open the SSMS and give this command :

restore database master from disk='' with replace

stop SQL Server remove -m and start it again .

Regards


Abhay Chaudhary
Sr.DBA (MCITP/MCTS :SQL Server 2005/2008 ,OCP 9i)
Post #743370
Posted Monday, June 29, 2009 12:11 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, October 28, 2013 8:50 AM
Points: 1,606, Visits: 1,039
Abhay

Will all logins , users, roles will be restored.

Should be restore the user database before master , model and msdb if a server crash occurs and you are creating an new environment using the backups save from the crashed server.



Tanx
Post #743374
Posted Monday, June 29, 2009 12:42 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, June 13, 2014 12:27 PM
Points: 267, Visits: 386
all logins , users, roles will be restored from the pervious master backup .In case you more logins/users created after the last master backup , then you need to script them out using : http://support.microsoft.com/kb/246133/ and http://support.microsoft.com/kb/246133/. Go through them carefully and you will get everything related to all the versions (except 2008 as of now).

Restore the user databases after the system databases.The reason is you cant restore the user databases if your system databases are not up and running as the instance will be down.

Regards


Abhay Chaudhary
Sr.DBA (MCITP/MCTS :SQL Server 2005/2008 ,OCP 9i)
Post #743384
Posted Monday, June 29, 2009 1:08 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, October 28, 2013 8:50 AM
Points: 1,606, Visits: 1,039
If we restore the user databases after the system databases how will we know which database the user is mapped and what role he has.



Tanx
Post #743394
Posted Monday, June 29, 2009 1:11 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, October 28, 2013 8:50 AM
Points: 1,606, Visits: 1,039
hi_abhay78 (6/29/2009)
all logins , users, roles will be restored from the pervious master backup .In case you more logins/users created after the last master backup , then you need to script them out using : http://support.microsoft.com/kb/246133/ and http://support.microsoft.com/kb/246133/. Go through them carefully and you will get everything related to all the versions (except 2008 as of now).


the second link..........



Tanx
Post #743395
Posted Monday, June 29, 2009 1:48 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, June 13, 2014 12:27 PM
Points: 267, Visits: 386
So this is what you need to do :

-> restore the system databases
-> restore the user databases
-> run the script in master for rest of the users/logins creations ...

makes sense ??

Regards


Abhay Chaudhary
Sr.DBA (MCITP/MCTS :SQL Server 2005/2008 ,OCP 9i)
Post #743401
Posted Monday, June 29, 2009 1:52 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, October 28, 2013 8:50 AM
Points: 1,606, Visits: 1,039
.

Tanx
Post #743403
Posted Tuesday, January 12, 2010 3:02 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, October 20, 2014 2:26 AM
Points: 100, Visits: 467
The problem is you cannot connect to the SQL Instance using SSMS when it is running in single-user mode?
Post #846578
Posted Monday, January 18, 2010 2:21 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 2, 2010 11:32 AM
Points: 1, Visits: 5
Yes you can connect to SSMS while in single user mode. Before putting your server into single user mode, make sure you have a proper user account set up or use the sa account to log in. The real issue is that you cannot restore the master database using the query stated earlier.

Myole H.
SQL DBA / Report Developer
Post #849403
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse