Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 invalid stored procedures.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-06-13 : 08:08:14
sids writes "i'm looking for a way to find all the invalid stored procedures due to schema changes by running some stored procedure or sql."

dsdeming

479 Posts

Posted - 2002-06-13 : 08:38:20
By invalid, do you mean procedures that have been orphaned ( the objects they reference no longer exist ) or ones that now reference invalid columns in existing tables/views?

Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-06-13 : 09:59:06
I usually joing syscomments to sysobjects and look for text like the objectname that you have changed.

Like if you make a change to table foobar...

select distinct
so.name
from
sysobjects so
inner join syscomments sc
on so.id = sc.id
where
sc.text like '%foobar%'

 
That'll atleast give you a list to start working with....

<O>
Go to Top of Page

colinm
Yak Posting Veteran

62 Posts

Posted - 2002-06-13 : 10:54:47
This may be also be of use to you (or not!)

In Enterprise Manager select your table and goto all tasks and display dependcies.
Probably would of been more use to take a note of these results before any schema changes.

Go to Top of Page
   

- Advertisement -