Announcement

Collapse
No announcement yet.

​Cannot Start MSSQL Error Code 3 (Corrupt MASTER.MDF)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • ​Cannot Start MSSQL Error Code 3 (Corrupt MASTER.MDF)

    Afternoon All MSSQL Experts

    We run a MRP package called PREDCOM that uses MSSQL as a db. Since of this morning we cannot start the db service. The error message indicates that the master.mdf file is corrupt. Can anybody assist us to restore the database without losing the table definitions, stored procedures and data.

    Thanks

  • #2
    This is the main file for the Master database that controls all of SQL server. If it is corrupt, the best solution is to restore from backup. Failing that, you can create a new master database and re-attach other existing databases, so not losing data but probably losing security settings, logins etc.

    If you tell us which version of SQL server you are using, I will pull out some references, otherwise for SQL Server lost master database or similar will get you to the right place: https://www.google.co.uk/search?q=SQ...gBw&gws_rd=ssl

    If you don't have backups of the master database, I strongly suggest you review your backup policy once you have recovered
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      One of the methods for restoring sql database via T-SQL, if guide below can't help you, take a look at more powerful methods
      [MOD EDIT DODGY LINKS DELETED]

      Restore With Transact-SQL
      Step 1
      Click “New Query” in the Management Studio’s main toolbar. This opens a large text area on the right side of the screen.
      Step 2
      Click in the text area and type a Create Database statement using the following Transact-SQL code as a guide:
      CREATE DATABASE MyDatabase ON (FILENAME = 'c:\data files\my_data.mdf'), (FILENAME = ' c:\data files\my_data.ldf') FOR ATTACH;
      Step 3
      Click the “Execute” button in the Transact-SQL toolbar, located just under the Management Studio’s main toolbar. The Execute button symbol is a right-pointing triangle. SQL Server Management Studio restores the database.
      Last edited by Ossian; 22nd September 2015, 17:28.

      Comment


      • #4
        If you took the trouble to read the original post, you would see that the OP cannot start SSMS without the master database, so your post is useless.

        I suspect spam and am removing the links you posted.
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

        ** Remember to give credit where credit is due and leave reputation points where appropriate **

        Comment


        • #5
          When you can’t restore .sql data via standard solutions make use of guide below or if even the guide can’t help you, it might be that your sql data was severely corrupted and you may get more powerful tips on
          [MOD EDIT - commercial link deleted and spammer banned]
          Last edited by Ossian; 6th May 2016, 07:23.

          Comment

          Working...
          X