Cannot delete db on sqlserver

  • Delete the entry from sysdatabase system table.

  • our db is still on recovery\read only mode, do you have query on that? or codes to execute this method you suggested: "delete entry from sysdatabase system table.

    "

  • what do you get for your database when you run this:

    select state_desc from sys.databases where name='test'

    Online Trainer For SQL DBA and Developer @RedBushTechnologies with 18 yrs exp.

  • Did you try starting SQL in Single-User mode with the No-Recovery Trace Flag, and then dropping the database?

    Stop SQL Server and SQL Agent,

    Add -m and -T3608 to the SQL Server Service startup parameters (use SQL Server Configuration Manager, in case you didnt know),

    Start SQL Server, but NOT SQL Agent,

    Log in and Drop the database (you may need to set to OFFLINE first, if not already done so),

    Stop SQL,

    Remove the -m and -T3608 startup parameters,

    Restart SQL Server and SQL Agent.

  • reshma_t22 (11/24/2010)


    Delete the entry from sysdatabase system table.

    First, direct manipulation of system tables is an extraordinarily BAD idea. Second, it's very difficult to do. I'm thinking that even you haven't ever done it before.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Build a new, empty database. Detach it and then try restoring that to the "bad entry". I've only had to do that once so I don't know if it'll work all the time but it's something else to try.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

Viewing 6 posts - 16 through 20 (of 20 total)

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