Model DB amoung the missing

  •  attempted to move my Model and msdb database files to a different drive on the server. I did the following:

    * Restarted SQL Server 2K with the -T3608 startup parameter

    * successfully detached msdb and model DBs

    * moved the msdbdata.mdf, msdblog.ldf, model.mdf and modellog.ldf

    files to their new homes

    * successfully reattached model and msdb

    When I take away the -T3808 startup parameter and restart SQL Server, I do not see the model database in the db list in enterprise manager eventhough my 'attach' seemed to work.  Now I get the following error when i try and query against the Model database using query analyzer:

    Could not locate entry in sysdatabases for database 'model'. No entry found with that name. Make sure that the name is entered correctly.

    What did I do wrong?

  • Just a thought.

     

    Have you checked the sysdatabases table in the master database to see where the data and log files for the model database are pointing to?

    If the location is different to the location they live I believe this might cause you problems.

     

    Other than that Close down EM and re-open as it may be DMO being slow to refresh.

     

    Hope this helps

     

    Carl

     

  • Sorry you will find the location of the log file in the sysaltfiles table in the master database.  This also points to the data file location

     

    Regards

     

    Carl

     

  •  Just to confuse you further :o)

     

    Did you do move the master database first and then bring online and unattach the model and reattach seperately?

     

    If you unattached and re-attached the master database and did the same for the model db before restarting I think the master may have the old location of the model data and log files?

     

    Whenever I have moved the system databases I have done the master database seperately to the model and msdb.

     

    Regards

     

    Carl

     

  • No, I have not touched the Master DB.  I only performed these steps:

    added -T3608 to SQL Server startup parameters and restarted sql server.

    detached Model and msdb, moved data and LDF files to new locations and reattached Model and msdb.   I got NO errors when reattaching either databases.

    now when I look in the sysaltfile table in the Master database, there is no reference at all to the Model DB.. ??? 

  • As it turns out.   I reattached the Model and msdb in the wrong order!!!!!!

    when detaching and reattaching model and msdb - the model DB needs to be reattched BEFORE the msdb database.

    Thank you for your thoughts.

  • Glad you found out what the problem was.

     

    Regards

     

    Carl

Viewing 7 posts - 1 through 6 (of 6 total)

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