SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to restore master database.?


How to restore master database.?

Author
Message
Joy Smith San
Joy Smith San
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3296 Visits: 3200
what are the steps to restore master database..?

Thanks.
hi_abhay78
hi_abhay78
Mr or Mrs. 500
Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)

Group: General Forum Members
Points: 599 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)
Eswin
Eswin
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1979 Visits: 1078
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 :-D
hi_abhay78
hi_abhay78
Mr or Mrs. 500
Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)

Group: General Forum Members
Points: 599 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)
Eswin
Eswin
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1979 Visits: 1078
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 :-D
Eswin
Eswin
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1979 Visits: 1078
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 :-D
hi_abhay78
hi_abhay78
Mr or Mrs. 500
Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)Mr or Mrs. 500 (599 reputation)

Group: General Forum Members
Points: 599 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)
Eswin
Eswin
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1979 Visits: 1078
.

Tanx :-D
SQL Swerver
SQL Swerver
Old Hand
Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)Old Hand (308 reputation)

Group: General Forum Members
Points: 308 Visits: 529
The problem is you cannot connect to the SQL Instance using SSMS when it is running in single-user mode?
myoleherrera
myoleherrera
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search