• Good post!

    Another option is to use a recursive CTE that returns the entire dependency chain in a single query. I wrote such a function and the code is posted here: http://www.sqlserverandxml.com/2008/09/find-dependent-objects-recursively.html

    .