How can i drop database

  • While droping database i am getting following error:

    Cannot drop the database 'demodb', because it does not exist or you do not have permission.

    I am runing following query

    USE MASTER

    GO

    DROP DATABASE demodb

    Thanks,

    Jaydeep

  • Well... do you have the SA privs to drop it or not?

    --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)

  • Yes I have the Admin privileges.

    Is there any permissions need to apply on removing database? eg. Public etc.

  • If you do have admin privileges, then maybe you misspelled the database’s name. If the server was installed as case sensitive, the database’s name is also case sensitive. Could that be the problem?

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Adi Cohn (12/30/2008)


    If you do have admin privileges, then maybe you misspelled the database’s name. If the server was installed as case sensitive, the database’s name is also case sensitive. Could that be the problem?

    Adi

    Yep, I agree.

    --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)

  • Yes I found the same one.

    Thank you.

    Cheers,

    Jaydeep

  • jaydeep (12/30/2008)


    Yes I found the same one.

    Thank you.

    Cheers,

    Jaydeep

    Does that mean you were able to drop it by matching case?

    --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)

  • jaydeep (12/30/2008)


    Yes I found the same one.

    Thank you.

    Cheers,

    Jaydeep

    Ok...can you post the info how did you find the solution!? - just for info ...couz we here are trying everyday to help people why not to see the others solutions!

    😛

    ============================================================
    SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • Dugi (12/30/2008)


    jaydeep (12/30/2008)


    Yes I found the same one.

    Thank you.

    Cheers,

    Jaydeep

    Ok...can you post the info how did you find the solution!? - just for info ...couz we here are trying everyday to help people why not to see the others solutions!

    😛

    I am creating database through my .net application. And there is 'database name' spelling mistake in application.

    And again trying to drop database from application only. There is no any case sensitive problem in it.

    Cheers,

    Jaydeep

  • Heh... thanks, JayDeep. Falls into the ol' "Must look eye" category.

    --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)

Viewing 10 posts - 1 through 10 (of 10 total)

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