Avatar of anushahanna
anushahanna
Flag for United States of America asked on

best system table to search code

what is the best system table in 2000 and 2005+ to search for specific text in a code (UDF or proc) etc

thanks
Microsoft SQL Server

Avatar of undefined
Last Comment
anushahanna

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ephraim Wangoya

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
anushahanna

ASKER
OK-

I guess in 2000, that is the only option, right?

what about in 2005 & 2008?
SOLUTION
lcohan

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
anushahanna

ASKER
good point - INFORMATION_SCHEMA.ROUTINES also will work on all versions, right?
Ephraim Wangoya

correct, INFORMATION_SCHEMA.ROUTINES for all versions
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
lcohan

"Returns the first 4000 characters of the definition text of the function or stored procedure if the function or stored procedure is not encrypted. Otherwise, returns NULL."

http://msdn.microsoft.com/en-us/library/ms188757%28SQL.90%29.aspx

Where do you get the Views and Triggers code from?
As far as I'm aware they are ALL in sys.syscomments.text column

Ephraim Wangoya


@icohan
What are you talking about?

This question is about UDFs and Stored Procedures
lcohan

Right - my bad...overlooked that and thought is ALL sql code objects.
Please disregard my answer.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
anushahanna

ASKER
thanks to both of you!