Technical Article

Search word in sps

,

Suppose i have used a server name in many Sps. Now the Server gets changed and so i need to update the servername in all sps.

It becomes a tedious task to go through all the sps. Instead i can run this script and get the list of Sps where that Servername is written and then just by a update statement you can update.

All the SP contents are stored in syscomments table in text field.

 

This script helps to get all the Sps or functions having the word Return in their contents.

 

select * from sysobjects where id in 
(select id from syscomments where text like '%Return%')

Rate

3.25 (4)

You rated this post out of 5. Change rating

Share

Share

Rate

3.25 (4)

You rated this post out of 5. Change rating