because of "DSN" we can guess it is a Z/db2
always specify the platform and version to avoid wrong answers...
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be
How about starting at the beginning? You're dropping the Constraints. Why? #2 states that you're loading the data. Are you really running the DB2 Load Utility? Or are you running INSERT statements?
Next, let's talk about the REPAIR. REPAIR is a DB2 Utility, not a statement. I question the wisdom of running a REPAIR utility to reset the CHECKPENDING status. REPAIR will do this whether or not there are any violations. Is that really a wise choice?
From the REPAIR Utility chapter in the DB2 Utility Guide and Reference:
Verifying and possibly correcting referential integrity constraints by running CHECK DATA are recommended. CHECK DATA performs a complete check of all referential integrity constraints of the table space set, whereas with REPAIR, you are responsible for checking all the referential integrity constraints violations
DB2 sets the statuses for a reason. You better be 100% certain that you know what you're doing before you reset them, and then be prepared to live with the risks and consequences.