I was hunting for a script. I needed something that could
And so I found this:
http://sqlblog.com/blogs/jamie_thomson/archive/2009/09/08/deriving-a-list-of-tables-in-dependency-order.aspx
- crawl the metadata for a given DB
- get all the tables in said DB
- figure out the metadata-based relationships (via the foreign keys)
- and then walk the chain of relationships, but do it backwards so I could disable the keys in proper order without conflict
And so I found this:
http://sqlblog.com/blogs/jamie_thomson/archive/2009/09/08/deriving-a-list-of-tables-in-dependency-order.aspx
Really love this!
No comments:
Post a Comment