View Full Version : Script mapping help


lessthanme5
09-26-2008, 05:50 AM
Hi,

I have been given the task to map all links in and out of a number of SQL databases. (from what to what).

I am fairly new at SQL, so I do not know if there is a quicker way than going through each script and stored procedure and manually reading through them looking for link references...

Does anyone know how to help?

FYI, there is a lot of stored procedures!!!

Thank you.

lessthanme5

georgedwilkinson
09-26-2008, 05:55 AM
Toad for SQL Server has a "Uses" and "Used By" tab which could help. Try www.toadsoft.com (http://www.toadsoft.com).

lessthanme5
09-26-2008, 06:04 AM
thanks George, but I have been told my budget for this is the grand total of £0... so is there a quicker and less expensive way? possibly a visual script that will do it?

georgedwilkinson
09-26-2008, 06:52 AM
No, the download takes a couple of minutes, the install takes a couple of minutes, the setup/connection takes a couple of minutes, and the software is shareware with this feature enabled. Not sure how to get it cheaper (than 0) or faster (less than an hour, I would think).

WayneRyan
09-26-2008, 08:09 PM
LessThanMe,

I can sympathize with your budget.

I think that you can use sp_helptext and suck all of those Stored Procedures
into an Access table. I did that to search for references; which procedures
access a certain table, or contain a certain string.

It was pretty easy to use, but my only sample code is at work. The system
SP does return the entire text and it was quite easy to implement.

Oh, and it works for Triggers also.

hth,
Wayne

lessthanme5
09-29-2008, 01:23 AM
thank you.

SQL_Hell
09-29-2008, 03:25 AM
Hi there

If I were looking for a reference to a table called 'customers'. This is how you do it:



select *
from sys.sysobjects so
inner join sys.syscomments sc
on sc.id = so.id
where text like '%customers%'