Monday, February 13, 2006

 

Validating Sql Server objects

I recently wrote a handy little tool that goes through every stored procedure, view and function in a database and tests to see if they compile. I find this really useful if I am going through a process of restructuring the database, as well as to give me some confidence before we deploy that everything compiles.
I have posted the source onto Code Project.

Amendment:
Just to clarify slightly, this tool will only pick up stored procs etc that fail to compile. Just because something compiles does not mean it will work. One example would be if a table in a stored proc did not exist. This would compile ok, as Sql Server will use late-binding in this case. However, when you run it, then it will error.

Comments:
This is AWESOME!

Does it work for triggers also?
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?