Do you have a server that has been a repository for stored procedures for more than 10 years…  Do you even know if all the procs are used, let alone whether they still work after databases have moved, changed names/schemas, had columns refactored and renamed?  Here is a handy little program for you.  I called it DbValidator and essentially what it does is run through all of the stored procedures and views of a database and spit out errors on those that do not compile.  It makes use of the T-SQL feature: “SET NOEXEC ON” to re-compile each proc and view and give you the results.  I made this into a console application that is run like this:

dbvalidator.exe @Server @Database > @Output File as Text

Give it try and leave me comments, thanks.

Download DbValidator.zip

  • Share/Bookmark

Related posts:

  1. SQL Server DBA Harvests: Permissions
  2. SQL Server: Server List Table

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>