Database will not be dropped

  • Hi,

    We have a database without the .mdf and .ldf file (delete by accident). The database is in a suspect status ofcourse. I dropped this database and get message that de drop was successful. But the database is still in place. The error log i can see that a dump file is created because of: Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION.

    I get the same message as I will set this database offline or in Emergency state.

    Has someone an idee how to remove this database?

    Thank you in advance,

    Casper

  • Try using sp_dbremove 'DatabaseName'

    MCITP SQL 2005, MCSA SQL 2012

  • Is you are the db owner ? or Sys admin ?

    Another work aroundis here

    1.

    If you have to delete mdf and ldf , in first it has to be detached other wise it throuws an error. So they might dettached and deleted those files. so you can reattach the files with some dummy and delete it

    2.

    set it to single user mode and try dropping it.

    [font="Tahoma"]
    --SQLFRNDZ[/url]
    [/font]

  • Does 'sp_detach_db' work?

    Best regards,

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • restart the sql server services for try

  • The complete disk was removed with the files. I have solved it to attache the disk with the missing files and then restart the sql server. After this the database was still suspect but I could drop the database.

    Thank you all for your support.

  • I can see so many advices going for a sql server reboot. This should be your last resort when nothing else works. Today you might have the luxury of doing a reboot but when you work in a big, complaex and money driven environment, this will be sin and you won't be able to justify this easily.

    So please go for this option only when you have exhausted everything else.

    Chandan

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

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