Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Find a string in Procedures, Triggers, etc

By Joseph Gama,

I want to thank James Travis for his original and excellent work and to Razvan Socol for alerting about a similar problem that led me to improve James' code. The problem is that when searching for a word that is split between two 8kb blocks, James' code would ignore it. The solution is to look for the parts in the adjacent blocks. This code works for words up to 10 chars but the code can be changed to allow longer words. The original code is here:

Total article views: 110 | Views in the last 30 days: 1