Is there a free tool which can help visualize the logic of a stored procedure in SQL Server 2008 R2?
Posted
by
Hamish Grubijan
on Stack Overflow
See other posts from Stack Overflow
or by Hamish Grubijan
Published on 2010-12-14T22:54:31Z
Indexed on
2010/12/26
23:54 UTC
Read the original article
Hit count: 169
I would like to be able to plot a call graph of a stored procedure. I am not interested in every detail, and I am not concerned with dynamic SQL (although it would be cool to detect it and skip it maybe or mark it as such.)
I would like the tool to generate a tree for me, given the server name, db name, stored proc name, a "call tree", which includes:
- Parent stored procedure.
- Every other stored procedure that is being called as a child of the caller.
- Every table that is being modified (updated or deleted from) as a child of the stored proc which does it.
Hopefully it is clear what I am after; if not - please do ask. If there is not a tool that can do this, then I would like to try to write one myself. Python 2.6 is my language of choice, and I would like to use standard libraries as much as possible. Any suggestions?
EDIT: For the purposes of bounty Warning: SQL syntax is COMPLEX. I need something that can parse all kinds of SQL 2008, even if it looks stupid. No corner cases barred :)
EDIT2: I would be OK if all I am missing is graphics.
© Stack Overflow or respective owner