Db2 – IBM DB2 9.7 and latest 10 version compatibility

db2

At some point projects need to move from IBM DB/2 9.7 to some 10 version. Are there any significant compatibility issues that should be taken into account? We ofcourse use tables in schemas, but then also triggers and some stored procedures.

Best Answer

Not as much a compatibility thing, but definitely something to watch out for.....table spaces that are still DMS/SMS. You can upgrade a V 9.7 database with them to a V 10.x database, and it will accept them. You can't create DMS/SMS anymore, but it appears to be backwards compatible for migration purposes. You will probably want to convert to automatic storage as soon as possible.

Now...here's what really to watch out for....SMS/DMS tablespaces from a database originally created prior to version 9.7 and then migrated to version 9.7. Reason being, there is something called the reclaimable storage attribute that was not introduced until version 9.7 and unfortunately it is only set on table space creation. It is not added if you migrate to 9.7 or higher (even if you migrate the table space to automatic storage!!!!). This becomes a problem only in the sense that if a REORG is issued after mass deletes, DB2 may not release the freed up disk back to the OS. You may need to lower the high water mark to do so. However you cannot lower the high water mark on DMS or converted automatic storage table spaces if the table space was from a database created prior to 9.7. From what I have researched, the only way to resolve that issue (ie, getting tablespaces with the reclaimable storage attribute) is to create new table spaces with copies of your tables and unload and load all your data into these new tables and then drop the old ones.