Question

  Asked: May 7 2008   3:49 PM GMT
  Asked by: SQL Server Ask the Experts


Is there a query to search text of all SQL Server database objects that reference a specific table/instance?


Query, SQL Server migration, Database objects

We want to migrate to SQL Server 2005. We need to find all database objects such as Stored Procedures, Views, Triggers, User Defined Functions accessed specific tables, DTS packages that reference a specific table/instance. Is there a query that will allow me search the text of all?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



You can search the syscomments table within each database on the SQL 2000 server for the text you are looking for. This will search all procedures, views, triggers and UDFs. However the DTS packages are stored in a binary format, and the easiest method to use it to use is to open then up and manually check them.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Development, SQL Server and Database.

Looking for relevant Development Whitepapers? Visit the SearchSQLServer.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Mrdenny  |   May 7 2008  6:26PM GMT

Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.