My current client is struggling with their release process. It's a bit complex and a little uncontrolled. I'm trying to fix the process problems, but in the meantime it would be helpful if I could put together a utility that could scan their scripts, look for dependencies, and generate the order in which those scripts need to run.
Rather than reinvent the wheel I thought that I'd try to find the code that SQL Server uses for filling sys.sql_dependencies(1) (now that it's actually pretty accurate in current versions).
Is this code available somewhere as a hidden system stored procedure/trigger or is it some inaccessible binary code somewhere?
Just to be clear, I'm looking for the code that fills the system tables, not code that accesses them to determine dependencies. In other words, the code that runs when I do a "CREATE PROCEDURE ..."
If there's open source code or a third-party application that already has this functionality then I'd be interested in that as well.
(1) Ok, technically, sys.sql_dependencies is a view over sys.sysmultiobjrefs so ultimately I'm looking for the code that fills that table.