mssqlsystemresource.mdf file is missing

Discussion in 'Computer Programming, Emulation, and Game Modding' started by deandresoto, Nov 22, 2015.

  1. deandresoto
    OP

    deandresoto Newbie

    Newcomer
    1
    0
    Nov 22, 2015
    United States
    Our network admin applied a service pack for SQL Server 2008 on the db server.

    Now the SQL server main service and agent service will not start. Looked at the log file which indicates that mssqlsystemresource.mdf file cannot be opened. I went and looked in the BINN folder and sure enough it's not there.


    How do I recover this?


    What to do?
     
  2. spoonm

    spoonm Can count to 3.

    Member
    174
    84
    May 20, 2015
    Brazil
    Have you tried this?
     
  3. lateefauddin

    lateefauddin Newbie

    Newcomer
    1
    0
    Nov 25, 2015
    Macau
    Some useful links from Internet space:

    https://sql.recoverytoolbox.com/ Recovery Toolbox for SQL Server - in case any solution cant assist you, you make use of this tool


    There is a manual solution to fix this problem, but you need to have Microsoft SQL Server Management Studio for that. If you have it, you need to follow the steps given below:


    Open Microsoft SQL Server Management Studio on your system.

    Now click on New Query button.

    A new query page will be opened. Write the SQL scripts (shown below) on the page:


    EXEC sp_resetstatus [YourDatabase];

    ALTER DATABASE [YourDatabase] SET EMERGENCY

    DBCC checkdb ([YourDatabase])

    ALTER DATABASE [YourDatabase] SET SINGLE_USER WITH ROLLBACK IMMEDIATE

    DBCC DATABASE ([YourDatabase], REPAIR_ALLOW_DATA_LOSS)

    ALTER DATABASE [YourDatabase] SET MULTI_USER


    Now click on Execute.


    Now you can see the file is not tagged as Suspect.