I am in a somewhat awkward situation, it goes like this:
I am in the business of extracting data from Oracle, SAP, MSSQL and DB2 databases. However, I don't do the extracting myself, I just maintain and deliver the extracting tool. Furthermore, I don't have access to the databases that are to be extracted. So, once in a while I have a customer at the other end of the line who is disappointed 'cos his data couldn't be extracted.
To minimize these problems and to know as much as possible about any configuration difference that might cause a hick-up I want to know as much configuration data as possible. It all has to be gathered via a low-level and (preferably) version-independant query. I can do this easily for MSSQL, get some for Oracle (I'd love to know more but am quite satisfied so far), know almost nothing about a DB2 configuration and didn't start yet on SAP.
There is a tool that comes with DB2 called db2support, it is used to collect a lot of configuration data for troubleshooting purposes - see if it provides you with the information you need. To extract the database schema, use db2look, options "-e" and "-m" will be useful I think. Details in the manual.