 <p>What do you mean by all database? all data? or even the DDL?</p> <p>I think you are exporting all data, and you leave the tables created to be refilled with the exported data.</p> <p>The problem are the constraints and the generated values. There is a good article about generated values: <a href="http://www.ibm.com/developerworks/data/library/techarticle/0205pilaka/0205pilaka2.html" rel="nofollow">http://www.ibm.com/developerworks/data/library/techarticle/0205pilaka/0205pilaka2.html</a></p> <p>For the referential contraints, the best is to drop/deactivate them before import, then import data, and finally recreate/active referential constraints.</p> <p>Here, a good stored procedure to enable/disable constraints: <a href="http://www.dzone.com/snippets/db2-enabledisable-constraints" rel="nofollow">http://www.dzone.com/snippets/db2-enabledisable-constraints</a></p>