how to restore master database if missing from backup

  • i have a sql2008 r2 server that had a bad hard drive

    that caused the master database to be lost

    I have it on backup i cant set to single user mode

    surely there is a utility like rebuildm that just restore all the system files

  • I've never had to use it before, but I think you do it through the setup utility. You'll probably need the installation media. I imagine if you use your favourite search engine to look for something like "rebuild master SQL 2008 R2", you'll find out how to do it.

    John

  • i did search it several times and it says setup with about 15 switches none of which is database backup location

    or an msdn article on using sqlcmd which only works if the master exists to begin with

  • You have to rebuild the master. After that you can connect to the server and restore the master from your backup.

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • trying not to sound stupid but that is the question

    how do i restore the master.dbf

    repair installation center says missing master

    sqlcmd restore doesnt works missing master

    with the master databases missing

    which little utility do i use

    I mean really it is just a harddrive with data shouldnt have to be all hidden

  • http://blogs.msdn.com/b/psssql/archive/2008/08/29/how-to-rebuild-system-databases-in-sql-server-2008.aspx

    ---------------------------------------------------------------------

  • Overall summary:

    Final result: Failed: see details below

    Exit code (Decimal): -2068643838

    Exit facility code: 1203

    Exit error code: 2

    Exit message: The state of your SQL Server installation was not changed after the setup execution. Please review the summary.txt logs for further details.

    Start time: 2011-06-22 10:56:40

    End time: 2011-06-22 10:56:56

    Requested action: RebuildDatabase

    Machine Properties:

    Machine name: SQL11

    Machine processor count: 24

    OS version: Windows Server 2008

    OS service pack: Service Pack 1

    OS region: United States

    OS language: English (United States)

    OS architecture: x64

    Process architecture: 64 Bit

    OS clustered: No

    Product features discovered:

    Product Instance Instance ID Feature Language Edition Version Clustered

    Sql Server 2008 Management Tools - Basic 1033 Standard Edition 10.50.1600.1 No

    Sql Server 2008 Management Tools - Complete 1033 Standard Edition 10.50.1600.1 No

    Sql Server 2008 Client Tools Connectivity 1033 Standard Edition 10.50.1600.1 No

    Sql Server 2008 Client Tools Backwards Compatibility 1033 Standard Edition 10.50.1600.1 No

    Sql Server 2008 Integration Services 1033 Standard Edition 10.50.1600.1 No

    Package properties:

    Description: SQL Server Database Services 2008

    SQLProductFamilyCode: {628F8F38-600E-493D-9946-F4178F20A8A9}

    ProductName: SQL2008

    Type: RTM

    Version: 10

    SPLevel: 0

    Installation edition: EVAL

    User Input Settings:

    ACTION: RebuildDatabase

    CONFIGURATIONFILE:

    HELP: False

    INDICATEPROGRESS: False

    INSTANCENAME: MSSQLSERVER

    QUIET: True

    QUIETSIMPLE: False

    SAPWD: *****

    SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS

    SQLSYSADMINACCOUNTS: gts\sqlservice

    X86: False

    Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20110622_105626\ConfigurationFile.ini

    Detailed results:

    Rules with failures:

    Global rules:

    There are no scenario-specific rules.

    Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20110622_105626\SystemConfigurationCheck_Report.htm

    Exception summary:

    The following is an exception stack listing the exceptions in outermost to innermost order

    Inner exceptions are being indented

    Exception type: Microsoft.SqlServer.Setup.Chainer.Workflow.NoopWorkflowException

    Message:

    The state of your SQL Server installation was not changed after the setup execution. Please review the summary.txt logs for further details.

  • in order to fix my problem i had to restore all the databases to another server then copy them back to the d drive

    I am sure that isnt the correct ms way to do it:crazy:

  • Well, the correct way would be to rebuild master database like this:

    start /wait setup.exe /qn INSTANCENAME="Instance" REINSTALL=SQL_Engine

    this is done when master database is corrupted nad you have to use SQLCMD.

    After rebuilding attach your databases and then restore master from backup (if you have backup)

    P.S With rebuilding you will loose logins, linked servers...

Viewing 9 posts - 1 through 8 (of 8 total)

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