How to restore model database.

  • How to restore model database.

    My Instance was down i deleted model database file. I have .bak file. I tried to restore but its not working.

    1. I connected single user mode using cmd.. Its connected but not restored model database.

    2. I restored model.bak file in difference instance and then i copied and past from difference instance to deleted instance and then. I tried to start the services but its not worked.

    Help me on this how to restore model database from .bak

  • rajeshjaiswalraj (10/27/2014)


    How to restore model database.

    My Instance was down i deleted model database file. I have .bak file. I tried to restore but its not working.

    1. I connected single user mode using cmd.. Its connected but not restored model database.

    Which command line did you use to start SQL Server?

    2. I restored model.bak file in difference instance and then i copied and past from difference instance to deleted instance and then. I tried to start the services but its not worked.

    Help me on this how to restore model database from .bak

    Was the other instance the same exact version?

    Which error did you get?

    -- Gianluca Sartori

  • See this post to get a working solution.

    -- Gianluca Sartori

  • Section 2: https://www.simple-talk.com/sql/backup-and-recovery/the-sql-server-instance-that-will-not-start/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • rajeshjaiswalraj (10/27/2014)


    How to restore model database.

    My Instance was down i deleted model database file. I have .bak file. I tried to restore but its not working.

    1. I connected single user mode using cmd.. Its connected but not restored model database.

    2. I restored model.bak file in difference instance and then i copied and past from difference instance to deleted instance and then. I tried to start the services but its not worked.

    Help me on this how to restore model database from .bak

    Follow these steps;

    • Copy the tempdb files to the system directory where you deleted model from and rename them to model.mdf and modellog.ldf
    • Restart sql server instance normally apart from the agent.
    • Restore the model database from the backup you have
    • restart the agent service

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

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 5 posts - 1 through 4 (of 4 total)

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