db2

Reverse engineer indexes in DB2 – Take 2

Last week, I posted my first version of the sql. I am expanding on that this week. The one last week, may not work in the coming db2 versions. This version uses the new table indexcoluse table to get the column list, the order of the column and also find the include columns.
You can use this script to reverse engineer indexes for a particular table (as I have it on the sql) or can modify the sql to reverse engineer all the indexes in the database. I just wish IBM had this feature on the db2look.

Enjoy the script : db2look_index