Detached tempDB and other DBs - SQL is now nonfunctioning

  • I was attemping to move all the logfiles on the server to another disk. I brought up the server with -c -m -T3608 and then shot myself in the foot.

    I didn't realize that tempDB is not ever to be detached, but I did.

    Any operation I now attempt to perform on this instance results in

    Could not find database ID 2. Database may not be activated yet or may be in transition.

    When I attempt to reattach tempdb:

    Server: Msg 615, Level 21, State 1, Line 1

    Could not find database table ID 3, name '3'.

    Connection Broken

    I don't care about data, I'd just like to get back to a blank SQL instance that is workable. If I have to reinstall SQL 2000 that is fine, but any help would be much appreciated.

    Terrence - SQL Killer :crying:

  • If you don't care about data/logins/etc. you can just rebuild the system DBs using "Rebuild Master" Rebuildm.exe utility

  • have you tried moving the tempdb files back to where they originally were?

    -SQLBill

  • Also, you could temporarily rename the user databases (add .old after the file extension). Then reinstall SQL Server. Once it is reinstalled, rename the user database files (take off the.old) and attach them.

    -SQLBill

  • Shut down the server (if its running) and move the tempdb files back to where they were (and any other files that you moved) then restart SQL. It should come up.

    If it doesn't, with what error?

    Aside, the way to move tempDB is with the ALTER DATABASE command. It's the only DB that can be moved in such a way

    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

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

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