Simple problem - drop database

  • My problem is quite simple. I want to drop database and before I do that I would like to disconnect all users from DB.

    I've already tried putting database into offline state and everything went good except the fact that db files were left on hdd.

    How can I disconnect all users, drop database (with db files)?

    Thanks for reply in advance.

  • probably the easiest way is to to set it to single_user:

    alter database emptyexample set single_user with rollback immediate

    drop database emptyexample

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • I like Lowell's advice. Set to single user, then remove.

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

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