Educational Materials like Computer, engineering, software and Property , Entertainment: Search string in stored procedures of SQL
Custom Search

Subscribe Now: Feed Icon

February 11, 2012

Search string in stored procedures of SQL

A select statement that is running somewhere in our system and putting an extremely heavy load on the server. We would like to fix it, but we can't seem to locate it. We believe it is either hard coded into the reporting server, or somewhere in a stored procedure possibly

declare @SearchStr      varchar(100)
set @searchstr = 'String to search for'
SELECT DISTINCT USER_NAME(o.uid) + '.' + OBJECT_NAME(c.id) AS 'Object name'
FROM  syscomments c
      INNER JOIN
      sysobjects o
      ON c.id = o.id
WHERE c.text LIKE '%' + @SearchStr + '%'  and
      encrypted = 0

0 comments:

Post a Comment

Follow by Email

Video Bar

Loading...

Followers

Educational Materials like Computer, engineering, software and Property , Entertainment

Recent Visitors

Active Search Results
Wink Bingo | Slots Tips | Football manager 2010 | blackjack free | Poker Stars
Submitdomainname.com