0

I'm running SSMS 2008 and connecting to a database on a separate server.

I want to search through our stored procedures for specific strings of text. In Visual Studio 2010 this is simple, the quick find is able to look through the entire solution for the string. Not so in SSMS 2008.

In SQL Server it only searches through open queries. Meaning that I'd have to open the hundred or so queries and then run quick find. Does SQL Server not have the functionality to look through the stored procedures? I can't imagine that this is intentional.

When I try to search for anything without any queries open it gives me an error message:

Look in: A specified directory or file is not available or does not exist.
G3n0c1de
  • 139
  • 2
  • 14

1 Answers1

1

You mentioned you are are connecting to a database on a separate server. Do you have access to the .ssmssln solution file?

Otherwise, you can use this query to search stored procedure contents

c.f.: Search Text in Stored Procedure in SQL Server

SELECT name, definition
FROM sys.sql_modules m 
INNER JOIN sys.objects o ON m.object_id = o.object_id
WHERE m.definition Like '%search string%';
Community
  • 1
  • 1
SimplyInk
  • 5,832
  • 1
  • 18
  • 27