Link to home
Start Free TrialLog in
Avatar of anushahanna
anushahannaFlag 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
ASKER CERTIFIED SOLUTION
Avatar of Ephraim Wangoya
Ephraim Wangoya
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of anushahanna

ASKER

OK-

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

what about in 2005 & 2008?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
good point - INFORMATION_SCHEMA.ROUTINES also will work on all versions, right?
correct, INFORMATION_SCHEMA.ROUTINES for all versions
"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


@icohan
What are you talking about?

This question is about UDFs and Stored Procedures
Right - my bad...overlooked that and thought is ALL sql code objects.
Please disregard my answer.
thanks to both of you!