Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

share|improve this question
    
Are you trying to drop it using db2idrop? –  Chris Aldrich Dec 28 '12 at 14:02
    
Yes, I tried with db2idrop. Which is when it complained that the instance does not exist. –  vaisakh Dec 31 '12 at 12:44
    
Firstly, you can try running db2greg -dump to list everything DB2 knows about its environment. It will list all instances ("I" as the first field in the record), as well as the expected instance directories. If the instance directory referenced in the registry does not exist, you can remove the instance record with db2greg -delinstrec instancename=whatever –  mustaccio May 30 '13 at 17:31

2 Answers 2

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 <instance name>;
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.

share|improve this answer

This has worked for me on AIX 7.1:

First, run db2ilist to find the list of instances. Run db2iset -d <instance> for each instance to remove the global registry entry. Now when you re-run db2ilist you should not see the instances, and your uninstall should work properly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.