[quoted text, click to view] "Khurram Iftikhar" <khurram_iftikhar@yahoo.com> wrote in message
news:6dc2172e.0407211034.2682ae2b@posting.google.com...
> I am in the process of cleaning up an existing database application.
> I know for sure that there are many unused tables and procedures
> contained in this application. I wanted to use the sysdepends table
> in SQL Server to find out what tables are used, but as many of you
> already know, the dependency information contained in this table can
> be inaccurate.
>
> Finally, the question - Is there another tool out there that has the
> capability of finding the dependencies correclty ?
>
> Thanks in advance.
>
> KI.
The short answer is no - if the dependency information is not stored
anywhere, then no tool can find it. There are some tools which parse the
text of procedures, views etc. and identify dependencies that way. However,
if you have SQL code which is embedded in a middle tier or client
application, or if you use dynamic SQL heavily, then that isn't completely
reliable either.
The closest you can get is probably to look at the information in both
sysdepends and syscomments, as well as searching through any other source
code for references to objects which you suspect are no longer used. After
that, you start dropping objects, and see if someone complains...
In the future, you may want to review how you maintain your code, as you can
address dependency issues using source control and automated build
processes - Erland's toolset might give you some useful ideas:
http://www.abaris.se/abaperls/ Simon