After Error 823 Database stayed on "Restoration" and Can't Restore Can't Drop it

  • Hi all,

    We had a connection problem for some hours yesterday. All databases are re-attached automatically except one(DBNAME). One of them stayed on the "restoration" mode. So I Restored from backup DBNAME_RESTORE .

    So i really don't need this database.

    What i made :

    Drop Database DBNAME

    ---

    Result : successful

    ---

    sp_renamedb 'DBNAME_RESTORE','DBNAME'

    ---

    Result : Error , The database DBNAME already exists. Specify a database name unique.

    ---

    When i have a look i see that the dabase has not dropped.

    I try to restore it :

    Restore database DBNAME with recovery

    Msg 823, Level 24, State 2, Line 1

    The operating system returned error 21 (The device is not ready.) To SQL Server during a read at offset 0x00000000012000 in file 'C:\DBNAME.mdf'. You may find more details in the Additional messages in the error log and system event log to SQL Server. It is a condition of severe system-level error that jeopardizes the integrity of the database and must be corrected immediately. Perform a complete check of the consistency of the database (DBCC CHECKDB). This error can be caused by many factors, for more information, refer to the documentation in SQL Server Books Online.

    I can't execute :

    dbcc checkdb (DBNAME) because it is on restoring state...

    Do you have an idea haow to drop this database ?

    Thanks in advance .

Viewing 0 posts

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