473,395 Members | 1,335 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,395 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 1983
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.