Model Database - Help!!

  • Hi there,

    I have a problem!!

    I was moving some of my system db's to other drives. This included the model database. Followed the correct steps to the tee, setting the right parameters & so forth. Restarted SQL server & everything looked & worked fine.

    This morning we did a server reboot & the model database dissapeared!! It does not want to restore or attach now..

    Does anyone have any idea of how I can recover my model db again??

    Thanks in advance!!

    T.

     

     

     

     

  • That is weird. You can copy the data and log files for model database from another server and attach them on this server.

  • did you check the error log and are you sure that the pathing for attaching them is correct?

  • Nope!!

    Just tried it, same error...

    I picked something up, it dissapeared from sysdatabases as well...

  • Try to attach it, no luck...

    Try to restore, no luck...

  • What error messages are you getting when you try to attach or restore?

    Exacty what steps are you taking when you try to attach? 

    Have you tried copying model.mdf and modellog.ldf from another server and attaching those?

    Steve

  • The message when trying to restore or attach is...

    "Error 1807: Could not obtain exclusive lock on database "MODEL". Retry the operation later"

    I tried to attach the db using Enterprise Manager & using sp_attach_db in T/SQL.

    Yes, I also tried to attach & restore another servers' model db, but no luck, the same error comes up.

    Thanks!!

     

     

  • you probably attached msdb back before attaching model back. In this case add startup traceflag -T3608 (to only recover master db on startup) then detach msdb. Accordingly you would now attach model and then msdb.

  • Here's an entire QOD and ensuing discussion on this...

    model db







    **ASCII stupid question, get a stupid ANSI !!!**

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

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