Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2009
    Posts
    1

    Red face Unanswered: Drop Database command in DB2

    hi

    my db2 server version 8 resides in a remote machine R.
    am using a jdbc client to drop a database by name "test " in R.
    the driver am using for this is
    1)db2jcc.jar
    2)db2jcc_license_cu.jar.

    Connection is established fine to the Db. How ever am facing issues while
    dropping the DB "test". Select queries also go thru fine.

    Please let know how can a DB2 database be dropped from a JDBC client.

    Thanks,
    Radha

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You cannot do it through JDBC. JDBC is for issuing SQL statements. DROP DATABASE is a DB2 command, not SQL. Another issue is that you are connected to the database. You cannot drop a database in which someone is connected. DROP DATABASE requires an instance connection only.

    Andy

Posting Permissions

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