How to drop a DB2 instance when the instance owner was removed This is a real sticky situation. I was handed over a machine (running an AIX 7.1), and my first task was to re-install DB2 server on it. But someone before me had conveniently removed an instance owner account, and probably recreated it. Now, the problem is this:

1) When I try to uninstall DB2, it says the instance is active and has to be dropped first.

2) When I try to drop this instance, DB2 says there is no such instance.

I am quite new to DB2 administration. Not sure how to proceed here. Any help is appreciated

Thanks
If you dropped the instance from the file system (perhaps while DB2 was down with db2stop), then, DB2 still "knows" about the instance because its directories contain a reference to it.

I would perhaps try to uncatalog the instance first (this would remove it from the directories).

Try the following:

db2 uncatalog node &lt;instance name&gt;;
db2 terminate;


And see if that doens't help. You may also need to remove the instance definition from the DB2 registry:

# make sure there is a space after the equals sign to unassign this variable.
db2set DB2INSTDEF= -g
db2stop
db2start


As with anything, try to take a backup of everything before you mess around so you don't make it worse.