views:

45

answers:

2

Hi,

We have a large database containing a lot of stored procedures. Now we are updating our database but some stored procedures still use the old structure. We've found most of them using 'sp_depends' but some sp's slipped through.

I was wondering if there isn't a way to check all stored procedures. If they call for a column that doesn't exist anymore you get an error.

Thx

+2  A: 

I think if you want to be 100% certain then you may wish to use software designed for this exact purpose. For example, RedGate have a product called SQL Dependency Tracker.

http://www.red-gate.com/products/SQL_Dependency_tracker/index.htm

I would suggest downloading a free trial and testing the functionality.

John Sansom
thx, we've been using some other red-gate products and we are very pleased with them. I'll give it a try
Sem Dendoncker
You're welcome. I would be interested to know how you get on and what you think.
John Sansom
I'll keep you posted
Sem Dendoncker
A: 

You could enter tables, stored procedures and functions into a project and then check for Errors shown in the "Objects In Project" pane.

George