Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2002
    Location
    chennai
    Posts
    30

    Question Drop and Remove database options in DB2 UDB.

    Hi all,

    I have a problem when i try to drop a database. It gives a message that database in use. But i am very sure that the database which i am planning to drop is not in use by any one because the server resides on my local machine.

    I have one more query, can anyone tell me what is the difference between drop and remove database options in db2 udb.
    Thanks,
    sekhar rao k

  2. #2
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256
    Prior to the drop statement you can state a 'force all' statement to do a hard disconnect on all connections like:

    db2=> force application all

    you should be able do a drop database statement then...
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  3. #3
    Join Date
    Jan 2003
    Location
    Zutphen,Netherlands
    Posts
    256

    Re: Drop and Remove database options in DB2 UDB.

    Originally posted by k_sekhar_rao


    I have one more query, can anyone tell me what is the difference between drop and remove database options in db2 udb.
    As far as I can remember the drops really deletes the database, whereas the remove uncatalogs it. It is still there, but not recognized as such........... (could be wrong though on this one)
    Ties Blom
    Senior Application Developer BI
    Getronics Healthcare
    DB2,ORACLE,Powercenter,BusObj,Access,
    SQL, SQL server

  4. #4
    Join Date
    Jan 2003
    Posts
    1,595

    Re: Drop and Remove database options in DB2 UDB.

    Hi,

    DROP - permanently deletes a database (recovery is not posible)
    REMOVE - unacatalog database (with Add options you can catalog it back)

    Hope this helps,
    Grofaty

  5. #5
    Join Date
    Oct 2002
    Location
    chennai
    Posts
    30

    Question Re: Drop and Remove database options in DB2 UDB.

    Hi,

    Thanks for the support.

    since i was not able to drop a database, i removed that. can u tell me how to completely drop that database, which i have removed.


    Originally posted by grofaty
    Hi,

    DROP - permanently deletes a database (recovery is not posible)
    REMOVE - unacatalog database (with Add options you can catalog it back)

    Hope this helps,
    Grofaty
    Thanks,
    sekhar rao k

  6. #6
    Join Date
    Jan 2003
    Posts
    1,595

    Re: Drop and Remove database options in DB2 UDB.

    Hi,

    In Control Center click pluses to open Database folder. Then on Database folder click Add and then enter the database name. Select Default drive and press OK. When database apears select right click on database and drop. If you will not be able to drop the database. Then right click and Disconect. Then try drop again.

    Hope this helps,
    Grofaty

    Originally posted by k_sekhar_rao
    Hi,

    Thanks for the support.

    since i was not able to drop a database, i removed that. can u tell me how to completely drop that database, which i have removed.

  7. #7
    Join Date
    Jul 2002
    Location
    ATL
    Posts
    170
    db2stop kill

    Will force all the users out and kills all the db2 process hanging.
    This step will ensure that db2 will not be under use of any body

    Now execute the drop command.

    If this does not help you need to uncatalog the database and manually delete all the containers


    Good Luck
    Prasad

  8. #8
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,649

    Re: Drop and Remove database options in DB2 UDB.

    A very common question ...

    Well, since you have uncataloged the database, you will have to catalog it again ...

    db2 catalog database <dbname> on Cor whatever your database drive is )

    Then issue

    db2 drop database <dbname>
    and now you should see the database dropped ...

    Cheers

    Sathyaram

    Originally posted by k_sekhar_rao
    Hi,

    Thanks for the support.

    since i was not able to drop a database, i removed that. can u tell me how to completely drop that database, which i have removed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •