Integration environments are typically supplied with data from production or pre-production. The usual deviation of the data structure between source and target, production, pre-production, integration, etc. are a challenge. Different solutions come into question. Compatible objects should be copied/refreshed by the fast copy methods. However, sometimes source and target object definitions are not compatible for the deployment of fast tablespace copy solutions as definitions differ in columns (type or order, additional or missing columns) or in tablespace attributes like psize, partnum, encoding schema or dsize. As a simple solution, a tool can automatically execute Unload/Load for the incompatible objects. When only a few objects are affected this approach is acceptable. If there are significantly more incompatible structures than compatible ones the performance would suffer, longer execution times, unacceptable CPU consumption.
Another option would be to drop the incompatible target objects and create them new with the attributes of the source objects. Now fast copying is possible, but the necessary alterations of the object structure would have to be done afterwards using ALTER or possibly unload, drop, recreate and load.
It would be ideal if the copy tool is smart enough to handle the above situations automatically. In case DB2 does not offer an ALTER command for the required structural changes, then the tool should select Unload/Load, otherwise it should decide to fast copy and afterwards execute the needed ALTERs.
