what is wrong with this Database?

  • Hi All,

    When you go to the enterprise manager and expand the Databases node, you see all the databases listing for that instance. Then you also see an expand button "+" next to each database.

    I have a situation where among 40 databases 2 databases does not show the expand button next to it. And when I try to detach the database, it shows me a message

    "Detach database failed".

    What is wrong with this databases?

    Thanks.

  • I suppose you're the system administrator of the server, so, there's no permission issues.

    Try to identify whether the sql datafiles are still there, maybe occurred some corruption on it.

    It can explain the detach/attach error.

  • Yes, the mdf and ldf are there.

  • There are several possibilities. For example, the database could be in single-user mode, and there could be some user with an open connection. That "user" could be SQL Agent, another admin, an application/web page, etc.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Have you tried?

    Connect on master, switch the database using the "USE" command, afterwards type "DBCC CHECKDB".

  • I had to restore the DB and it is ok now. Should have done CheckDB, but now it is too late.

    Thanks for your time.

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

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