Drop database on DB2 9.5 - SQL1035N The database is currently in use

Just as a tip if Arun's tip does not work, because an remote app is instantly reconnecting to the db.

db2 force applications all 
db2 terminate 

db2set DB2COMM= 
db2stop 
db2start 

db2 force applications all 
db2 terminate 

... do your stuff here ...

db2set DB2COMM=TCPIP 
db2stop 
db2start 

Not sure if the db2 force and the db2 terminate is necessary, though. It's just our best practice.


I just use 'db2stop force', then 'db2start' , then drop db. This way is better than quiesce command which is asynchronous by nature.


Your problem might occur because of the differences of connect reset and terminate. Have a look at this discussion. You can also have a look at the IBM documentation. So it might work for you if you run a db2 terminate instead of a db2 connect reset.

Tags:

Db2