Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Model Database won't attach in SQL 7.0

Status
Not open for further replies.

skerr

Technical User
Joined
Aug 23, 2001
Messages
8
Location
US
I used sp_detach_db to detach the master, model and msdb databases on ServerA and then used sp_attach_db to attach the master, model and msdb databases on ServerB. The attach process completed successfully for all databases (and I did start SQL Server with trace flag 3608 for the detach and re-attach of model). However, when I go to view the database tree - model does not appear and when I try to create a new database I am told I can't because model cannot be located.

I'd like to avoid rebuilding the master database, so if anyone has any suggestions I would really appreciate them(of course, if my only option is to rebuild and restore master, then I would like to know that also) Thanks.
 

Did you restart SQL Server after attaching MODEL? According to the MS document on m,oving those databases, that step is required.

I'm surprised that you say you detached master successfully. I've not found that was possible or even desirable. The master contains Server specific information that will be incorrect when moved from one server to another. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
I have restarted the Server and I still don't see model. I misled you - I did not detach master, I first changed all of my system supplied databases to a new drive (E: to d:) and then I detached all of the system database and then I copied master and all of the system database files. ServerA was then rebuilt as ServerB. ServerB has no e: drive - that is why I moved the system databases first. Everything was ok except for model - which I am now guessing that maybe I did not move it to drive d: before I moved copied master out.

I looked at the system tables and sysdevices lists the model files on drive e: and it also references the master files on e: (but if I run sysfiles on master it shows the master files located on d:)

I don't know what to do to fix this - my ignorance in this area is really showing and I appreciate your help and your patience. Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top