473,748 Members | 2,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Search for a table/string within job steps, dts, database, stored procedures etc

Hi All :

A couple of tables have been identified to be deleted. My job is to
find if it is at all used.
On searching the web, i found a proc to search for a string within all
databases in a server.
using system sproc : sp_msforeachdb

it searches for a string in
views, sprocs, functions, check constraints, defaults, foreign key,
scalar function, inlined tablefunction, primary key, 'Replication
filter stored procedure, System table, Table function, Trigger, 'User
table, 'UNIQUE constraint''Ext ended stored procedure'

So it is pretty extensive. But i dont think it is covering the code
within execsqltasks in DTS, and tsql code within JOB STEPS. Those are
the two more places where code exists in my server.

If any of you have done so in the past, do let me know if there is a
system stored proc or code that you have written, to do the same

thanks
RS

Link to the above procedure

http://www.sql-server-performance.co...se_objects.asp

May 16 '07 #1
1 3873
(rs*********@gm ail.com) writes:
A couple of tables have been identified to be deleted. My job is to
find if it is at all used.
On searching the web, i found a proc to search for a string within all
databases in a server.
using system sproc : sp_msforeachdb

it searches for a string in
views, sprocs, functions, check constraints, defaults, foreign key,
scalar function, inlined tablefunction, primary key, 'Replication
filter stored procedure, System table, Table function, Trigger, 'User
table, 'UNIQUE constraint''Ext ended stored procedure'

So it is pretty extensive. But i dont think it is covering the code
within execsqltasks in DTS, and tsql code within JOB STEPS. Those are
the two more places where code exists in my server.

If any of you have done so in the past, do let me know if there is a
system stored proc or code that you have written, to do the same
If you don't have all your code under version control, this is about
an impossible task. Keep in mind that in SQL 2000, the code in syscomments
is chopped up in pieces of 4000 characters, and the table name may be
split in two parts.

One strategy may be to rename the tables, and then see how much explodes.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
May 16 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3663
by: todd | last post by:
here is a search tool SP I wrote. How many times have you wanted to search all your Stored procs or views (in a database) for a keyword but couldn't!? Well now you can! THis can makes life a lot easier for developers. Would you email me and let me know which part of the world my code is running in?
2
1565
by: E.Keller | last post by:
Hello! We are developping a project using MS-SQLServer 7 and we need a process for the synchronization of 3 tables together. Inserts and updates in the table A should immediately and automatically occur on table C, and updates on table C should also automatically occur on table B. We think that the solution using triggers and stored procedures is the right choice. Could someone with knowledge on stored procedures help us?
2
4303
by: J.Beaulieu | last post by:
Hi I'll have probably to use sql server soon but prior to that I have a question concerning priviledges and security. Is it possible for someone to do like in access, ie creating a db/table that is locked with a password? My guess is that it will be yes but in cas of... Now is it possible for someone to make a db/table read only rather than to lock it totally? Also can the guy who has an administrator priviledge on the server determine...
17
2208
by: serge | last post by:
How can i delete all user stored procedures and all table triggers very fast in a single database? Thank you
4
4966
by: Robin Tucker | last post by:
Hi, I'm trying to determine with my program whether or not a given database supports a given feature set. To do this I'm querying for certain stored procedures in the sysobjects table and if they are present, making the assumption the database will support the given feature. The problem is I can't find a certain stored procedure in the sysobjects table, even though I know it exists and can see other similar procedures using: select...
4
9675
by: Axel | last post by:
Is it possible to write a Stored Procedure that takes a string of search keywords as argument and returns the recordset? At the mo I am passing the WHERE String as argument. I got this technique from an Extreme Ultradev tutorial by Rick Curtis it looked quite ok: http://www.princeton.edu/~rcurtis/ultradev/tutorial12.html I have to admit, one of the main reason for passing the WHERE string is that I do not know how to do the string...
7
2205
by: David Lozzi | last post by:
I need to support multiple keyword search, not boolean searchs, just simple searches, i.e. "marhsall ma". How is this done? Do I send the entire search string to the Proc? How do I deal with it there? I'm thinking I need to build the WHERE clause in the code behind and send it to the proc. What do you think? Thanks, David Lozzi
14
4597
by: jehugaleahsa | last post by:
Hello: I am working with Oracle .NET Stored Procedures. I would like to know how to return the results of a SELECT statement. I have tried returning a OracleRefCursor and a DataTable, but nothing seems to work. What data type must I return for this to be accepted as .NET stored procedure?
2
4054
by: COHENMARVIN | last post by:
I found that I'm making an error in my 'case' statements, and now I want to go through a database full of many stored procedures to find that error in some of them and to fix it. Is there any way to do a search through multiple stored procedures at once? I don't see one in my version of Sql Server Management Studio? Thanks, Marv
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9386
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.