If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Drop Database command in DB2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-30-09, 05:59
radhak radhak is offline
Registered User
 
Join Date: Apr 2009
Posts: 1
Red face 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
Reply With Quote
  #2 (permalink)  
Old 04-30-09, 08:21
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On