473,414 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Map Stored Procedure dependencies from ASP pages through methods to stored procedures

Our organization has implemented an ASP.net application with an
n-tiered architecture, made up of a business/data layer that calls
T-SQL Stored procedures. We are attempting to better manage the many
stored procedures we have written over the life of the application. To
do this, we would like to determine which sprocs are being called from
which asp.net page. As all Sproc calls are made through the business
layer, we really want to map class-method dependencies on stored
procedures, as asp.net page dependencies on class-methods in our
business layer. (In reality multiple applications rely on the business
layer, some are not ASP.Net applications, thus the need to map the
class-methods.) Ultimately we would like generate a database (or
documentation) of all asp.net pages, business layer classes and
methods, and the stored procedures they depend on whenever we wish.
I have done some searching for a tool that maps or documents the
dependencies in this way, but have not found anything. I have found
lots of documenting tools, and have used architect tools such as
Rational XDE and Visual studio architect. I have a few ideas on how to
implement this manually but it seems troublesome and labor intensive
and would require to modify a lot of existing code (example:
debug.writeline every time a sproc call is made).
Does anyone have any suggestions either on out of the box solutions or
a good way to do this with code? Thanks,

David

Jul 21 '05 #1
6 1986
David,

If you have an n-tier architecture, why don't you just pass in the
this.GetType().ToString() to each s.proc call, and log those through a
logging service in the data layer?
Second option is the do a stack walk in the datalayer and identify the
callers of this code and log that info there.

- Sahil Malik
http://codebetter.com/blogs/sahil.malik/
<dw*******@newportgroup.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Our organization has implemented an ASP.net application with an
n-tiered architecture, made up of a business/data layer that calls
T-SQL Stored procedures. We are attempting to better manage the many
stored procedures we have written over the life of the application. To
do this, we would like to determine which sprocs are being called from
which asp.net page. As all Sproc calls are made through the business
layer, we really want to map class-method dependencies on stored
procedures, as asp.net page dependencies on class-methods in our
business layer. (In reality multiple applications rely on the business
layer, some are not ASP.Net applications, thus the need to map the
class-methods.) Ultimately we would like generate a database (or
documentation) of all asp.net pages, business layer classes and
methods, and the stored procedures they depend on whenever we wish.
I have done some searching for a tool that maps or documents the
dependencies in this way, but have not found anything. I have found
lots of documenting tools, and have used architect tools such as
Rational XDE and Visual studio architect. I have a few ideas on how to
implement this manually but it seems troublesome and labor intensive
and would require to modify a lot of existing code (example:
debug.writeline every time a sproc call is made).
Does anyone have any suggestions either on out of the box solutions or
a good way to do this with code? Thanks,

David

Jul 21 '05 #2
I don't have a tool that does that but I'm sure there is something out
there that uses reflection. I do have a tool that generates and object
map of the sql server database including it's procedures in an OOP
fashion.

http://www.eggheadcafe.com/articles/..._generator.asp

--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net/home/listings.aspx

<dw*******@newportgroup.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Our organization has implemented an ASP.net application with an
n-tiered architecture, made up of a business/data layer that calls
T-SQL Stored procedures. We are attempting to better manage the many
stored procedures we have written over the life of the application. To
do this, we would like to determine which sprocs are being called from
which asp.net page. As all Sproc calls are made through the business
layer, we really want to map class-method dependencies on stored
procedures, as asp.net page dependencies on class-methods in our
business layer. (In reality multiple applications rely on the business
layer, some are not ASP.Net applications, thus the need to map the
class-methods.) Ultimately we would like generate a database (or
documentation) of all asp.net pages, business layer classes and
methods, and the stored procedures they depend on whenever we wish.
I have done some searching for a tool that maps or documents the
dependencies in this way, but have not found anything. I have found
lots of documenting tools, and have used architect tools such as
Rational XDE and Visual studio architect. I have a few ideas on how to
implement this manually but it seems troublesome and labor intensive
and would require to modify a lot of existing code (example:
debug.writeline every time a sproc call is made).
Does anyone have any suggestions either on out of the box solutions or
a good way to do this with code? Thanks,

David

Jul 21 '05 #3
Sahil,
Good sugesstions, but unfortunetly our buisness layer only
partially uses a Data Layer. We started implementing the MS Data
Access Layer about half way through the development of the buisness
layer. This means we would have to change any code that does not use
the DAAB. :( Actually updateing this code is not a bad option in the
long run, but may not be a good quick solution.
Stack walk? Also sounds like a good idea. Can you give me some
direction on how to do this? What classes would I use to view the
stack? Thanks,
David

Jul 21 '05 #4
Stack walks .. well .. even that solution depends upon the fact that you
have one common entry point class that talks to your database. (Or atleast a
group of classes comprising of a clean data layer).

What;s the next recourse .. Sql Profiler? And it ain't exactly what u need.

- Sahil Malik
http://codebetter.com/blogs/sahil.malik/


<dw*******@newportgroup.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Sahil,
Good sugesstions, but unfortunetly our buisness layer only
partially uses a Data Layer. We started implementing the MS Data
Access Layer about half way through the development of the buisness
layer. This means we would have to change any code that does not use
the DAAB. :( Actually updateing this code is not a bad option in the
long run, but may not be a good quick solution.
Stack walk? Also sounds like a good idea. Can you give me some
direction on how to do this? What classes would I use to view the
stack? Thanks,
David

Jul 21 '05 #5
Assume we did update the middle tier to always use the data access
layer This needs to be done at somepoint anyhow. What would be
involved in walking the stack? I see a lot of examples trough google
related to security. I am having trouble finding an few lines of code
that will expose a calling stack. Thanks,
D

Jul 21 '05 #6
Off the top of my head, I think it is System.Diagnostics.StackTrace and
StackFrame.

- Sahil Malik
http://codebetter.com/blogs/sahil.malik/
<dw*******@newportgroup.com> wrote in message
news:11*********************@l41g2000cwc.googlegro ups.com...
Assume we did update the middle tier to always use the data access
layer This needs to be done at somepoint anyhow. What would be
involved in walking the stack? I see a lot of examples trough google
related to security. I am having trouble finding an few lines of code
that will expose a calling stack. Thanks,
D

Jul 21 '05 #7

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

Similar topics

4
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...
2
by: scott | last post by:
Hi, Just wondering what sort of problems and advantages people have found using stored procedures. I have an app developed in VB6 & VB.NET and our developers are starting to re-write some of the...
8
by: Wonderinguy | last post by:
Hi everybody , I have been trying to execute a simple DB2 stored Procedure from perl. But it doesn't work. Could anybody please help me find out why this is happening : here is my perl script...
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
6
by: dwilliams | last post by:
Our organization has implemented an ASP.net application with an n-tiered architecture, made up of a business/data layer that calls T-SQL Stored procedures. We are attempting to better manage the...
28
by: mooreit | last post by:
The purpose for my questions is accessing these technologies from applications. I develop both applications and databases. Working with Microsoft C#.NET and Microsoft SQL Server 2000 Production and...
3
by: Tod Birdsall | last post by:
Hi, My boss has asked me to create a tool that can give us a list of stored procedure names that are being called from each of our app's web pages. This is an ASP.NET application that is rather...
2
by: Jon.Hakkinen | last post by:
Hi all, I'm running db2 9 on windows. I'm looking for a query to find dependencies between stored procedures. For instance if I have a procedure P that calls p1 and p2, I'd like to know that....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.