IBM can do magic!!

Monday, February 25, 2008

Have you ever come across situations wherein you need to drop a table that has been defined with 'restrict on drop' clause and you can't access the table at all, possibly because you inserted rows with 'not logged initially' state and it crashed???
Do the following..

For each node, run the following accordingly.
1) Take db offline. Make sure db is offline by checking with "db2 list
active databases"

2) db2dart <dbname> /mt /serv 1 /oi <table id> /tsi <tablespaceid> /PW
IEOAHERU
-----Alas - IBM services are the only guys who can give the password in the PW argument!!!!

3) Connect to the db, run the following statement

db2 ALTER TABLE <tablename> DROP RESTRICT ON DROP

4) Then drop the table immediately.