• Like it well enough, was hopping for a SPROC that took into account dependencies across the entire database creating levels. With these levels you could say work from the branch inward. Truncating all children. then all parnet/children so on and so on until you arrived at an empty database with no keys.

    On second thought I guess it would be even easier if I'm ending up with an empty db just to modify your sproc to only include the top loop that scripits out the FK to a "real" table and drops the original. Then call it with a sp_foreachtable statment.

    Then truncate again using sp_foreachtable.

    Than write another sproc that uses your stored FK's to recreate all the FK's because every table is empty i.e. null every constraint should create as it will validate true and you just nocked one out of the park...

    I'll post my code when I finish.

    Thanks,

    T:cool: