How to restore master database.?

  • what are the steps to restore master database..?

    Thanks.

  • 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)

  • 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 😀

  • 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)

  • 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 😀

  • 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/.%5B/i%5D Go through them carefully and you will get everything related to all the versions (except 2008 as of now).

    the second link..........:-)

    Tanx 😀

  • 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)

  • .

    Tanx 😀

  • The problem is you cannot connect to the SQL Instance using SSMS when it is running in single-user mode?

  • 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

  • nice explanations

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply