Hi Fay, I have a few concerns with the committed code:
1. Do schema generation and other things work if you specify DB2 JDBC URL property currentSchema=my_schema? Does metaData.getUserName() return "my_schema" in this case?
2. If the above is false, have you considered issuing "VALUES CURRENT SCHEMA" query instead of calling "metaData.getUserName()"?
In other words, I am afraid that the current schema not always equals user name with DB2 (and maybe some other databases also) and whether by fixing this issue we are creating another one.