Showing posts with label storedprocedures. Show all posts
Showing posts with label storedprocedures. Show all posts

Wednesday, March 7, 2012

Find In...Stored Procedures?

All:
Is there a way to do a "Find" across the text of a set of stored
procedures? (SQL Server 2000)
I am in the process of doing some code refactoring and have eliminated
a column in one of my tables. Now, I want to find all the stored
procedures that use the column name.
Is there a way to do this? Alternatives?
Many thanks,
JohnHow do I find a stored procedure containing <text>?
http://www.aspfaq.com/show.asp?id=2037
AMB
"jpuopolo@.mvisiontechnology.com" wrote:

> All:
> Is there a way to do a "Find" across the text of a set of stored
> procedures? (SQL Server 2000)
> I am in the process of doing some code refactoring and have eliminated
> a column in one of my tables. Now, I want to find all the stored
> procedures that use the column name.
> Is there a way to do this? Alternatives?
> Many thanks,
> John
>|||Look at the syscomments table; it contains the text for your stored
procedures and views.
SLECT *
FROM syscomments
WHERE text like '%[column name]%'
HTH,
Stu|||Stu:
Thanks - worked like a charm.
Best,
John|||Use dbname
go
SELECT OBJECT_NAME(ID) from syscomments
where TEXT like '%columnname%'
Thanks
Hari
SQL Server MVP
"Stu" <stuart.ainsworth@.gmail.com> wrote in message
news:1126359684.486000.4260@.g49g2000cwa.googlegroups.com...
> Look at the syscomments table; it contains the text for your stored
> procedures and views.
> SLECT *
> FROM syscomments
> WHERE text like '%[column name]%'
> HTH,
> Stu
>

Find in SPs option for SQL

Hi All,
Just a quick question, is there any option to search in all stored
procedures in a database for a particular string, without scripting out
the whole lot?
Thanks
WillHow about a query against syscomments (2000) or sys.sql_modules (2005), for
example:
USe pubs
SELECT OBJECT_NAME(id) FROM syscomments WHERE text LIKE '%authors%'
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Will" <william_pegg@.yahoo.co.uk> wrote in message
news:1146735219.374369.41630@.g10g2000cwb.googlegroups.com...
> Hi All,
> Just a quick question, is there any option to search in all stored
> procedures in a database for a particular string, without scripting out
> the whole lot?
> Thanks
> Will
>|||Thanks Tibor,
I was hoping that there was some nice GUI addition to Management
studio, but I suppose it's going to have to be a SQL query
Will