Re: Q: Stored procedures and table dependency
Posted in 1998
In article <34BC7F8D.51C6@mcmail.com>,
watson@mcmail.com wrote:
>
> william_riedy@fac.com wrote:
> >
> >
> > How can I programatically (via SQL preferably) determine the tables
> > and/or views that a stored procedure references. From memory MS SQL and
> > Oracle both track dependencies in the database catalog in somewhat human
> > readable format. Informix does store the information but it appears to be
> > encoded or compiled.
> >
> > I know that I can reverse engineer all sp's via the dbschema command but
> > then I would have to write a wicked parser in C or another tool to
> > determine that stored procedure "S" needs table "T" and view "V".
>
> Personally I use a script but there again I like scripting 'cos I'm sad.
> It's straightforward, get each procedure and look for any SQL and
> retrieve the tables etc.
>
Thanks Paul, *but* if you notice you state "look for any SQL". I want to
take human eyes out of the loop. I need to do it programatically. I
guess I will need to write my "wicked parser" to do what I want.
William Riedy
First Albany Corporation
== all opinions expressed are my own ===
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet