• What do you mean, 'relationships'? Are there only FK or some triggers do exist?

    If DB has only FK dependencies between tables then sure we can retrieve them from sys.foreign_keys. Next step is to find out circles in dependencies. If no circles found them it's quite possible to order tables by their level in the dependency tree.

    So what is the problem exactly, triggers or something?