Results 1 to 3 of 3

Thread: Delete Database

  1. #1
    Join Date
    Sep 2004
    Posts
    24

    Unanswered: Delete Database

    Hi,

    i try to create some DBs with sample-content.

    The Problem is, that the Database existed with the same name (and alias)
    before.

    Depending to an application i have to create these DBs with the same name and alias.

    How can i delete the Databases out of the System- locale-Databasedirectory?`

    I tryed uncatalog but it seems that the DB-Alias is still registered ?

    Can anyone help plaese?

    Thanks in advance.

    anwy

  2. #2
    Join Date
    Nov 2004
    Posts
    374

    drop db

    you can always drop a db : db2 drop database xxx
    db2 list db directory
    db2 catalog db xxx as yyyy on /path/
    if you uncatalog - always execute db2 terminate (will also flush some resident setting/memory...)
    Best Regards, Guy Przytula
    DB2/ORA/SQL Services
    DB2 DBA & Advanced DBA Certified
    DB2 Dprop Certified
    http://users.skynet.be/przytula/dbss.html

  3. #3
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Which catalog is it in?

    1) LIST DATABASE DIRECTORY
    2) LIST DATABASE DIRECTORY ON /path

    (replace "/path" with your path)

    If the database exists in (2) but not (1), catalog and drop.

    If the database exists in (1) but not (2) (ie. you deleted the directory) then simply uncatalog.

    If you're still having problems, post the entire error message and output of the LIST DATABASE DIRECTORY commands please.
    --
    Jonathan Petruk
    DB2 Database Consultant

Posting Permissions

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