I need to find all SPs, which are used in particular page. Problem, that they aren’t called directly from page, but from other assemblies in other projects. So, I need to analyse all code to find them. I just think maybe some other method exists? Just run this page in application and catch all moments when SQL server is calling? Using VS 2010, MSSQL 2008, C#, web forms.
Share
I got the idea about using Profiler to get list of SPs on some specific pages in application, which I develop from two people, who left comments. Here I just wabt to share details how I used Profiler:
Actually it’s enough only DatabaseName and HostName. HostName as my computer name, because I run application locally from VS.
Running the following query:
SELECT DISTINCT ObjectName FROM SPTableName
and getting list of SPs for this page.
DISTINCT allows you to eliminate repeating SPs, because on each page SPs run many times.
Repeat 9 – 12 for each page.