Circular Dependency

ansoneeansonee Posts: 3
edited May 27, 2014 5:46AM in SQL Data Generator
I'm trying to generate test data and I keep running into an issue with "circular dependencies". Of course, those tables involved in the circular dependencies are the most important tables and NEED to have data generated in them.

I've looked everywhere and can find nothing on how to resolve this error.

How have people resolved the circular dependency issue in the past?

Thank you!

Comments

  • The Dependency Tracker application 9available as part of our SQL Tools bundle) is able to help see where circular dependencies may be occurring. You add any objects that you want it to represent and then you can see all the dependencies- some of which will have a closed chain (circular).
  • I'm actually already aware of where the circular dependencies are...

    I would just like to know whether or not Data Generator has a way to deal with circular dependencies. There are several in the structure I'm trying to generate data for, and without those in place, the data is no good.

    In reading RedGate's material, it looks like it can't handle them...
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    SQL Data Generator warns you about circular dependencies because it cannot reliably determine which table to update first. So for this reason, I would not say SQL Data Generator would always fail in this situation, but whether or not it works is left to chance.

    Also, circular dependencies is a blanket-term for a group of problems - possibly a group of FK dependencies, or a trigger and maybe some other thing. In some cases, you could work around the issue by de-selecting all but one table that serves the root data and populate it in one project, then do the rest via a second project.

    But I have seen some problems where even this does not work - for instance if the only way is to update a record in table A then one in table B then one in table C. Since SDG bulk inserts data one table at a time, it can't cope with *all* circular dependencies.
Sign In or Register to comment.