Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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)

Finding Procedures with a specified text

By sa24,

This script will give the text of all the procedures with occurences of a specifc variable. Syscomments has a limitation of 4000 characters but this script overcomes that as it uses DMO. The output is generated in a text file. If you want the name of the procedure only. replace the line where it says output.writeline (storedprocedure.text) to output.writeline(storedprocedure.name).Its the fourth line from the end of the file.
Below are the steps for deployment
1) Copy the script below in a text file.
2) Save it as find_procedure.vbs
3) Open a command prompt and browse to the directory where the script is located.
4) It takes servername, uid, password, databasename and variable as the input parameters. Separate each value with a space. You can use double quotes for variables with space.
e.g. find_procedure.vbs server_name uid password database variable
5) The output of the script is generated in the file output.txt

Total article views: 158 | Views in the last 30 days: 1
 
Related Articles
FORUM

Variable not in script task

Package level variable not in dts.variables in script

FORUM

Script task variable population

How to use a variable populated by a script task later in the data flow.

BLOG

SSIS 2008 Script Component variable gotcha..

In a previous post I showed you how to access variables from within an SSIS script component.  More ...

BLOG

SSIS 2008 Script Component variable gotcha..

In a previous post I showed you how to access variables from within an SSIS script component.  More ...

FORUM

SSIS variable display

display a variable through a script task

Tags
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones