Last post Jul 12, 2012 09:36 PM by Decker Dong - MSFT
Jul 11, 2012 12:52 PM|Apocolyptica|LINK
Hello. I have many web applications containing inline queries that get passed to a SqlCommand object, then through a SqlDataReader it populates a datatable. I have been asked to document all these queries, so that for each application we can know what tables
are in use and what field name from each of these tables are being used. Anyone have any ideas how through the normal operation of the application I could log all of this information? It's so time consuming to do this manually.
Jul 11, 2012 12:57 PM|santa_1975|LINK
You can use SQL Server Profiler to monitor the queries executed against a particular database. The events are saved in a trace file that can later be analyzed. Refer to the link below.
Hope this helps.
Jul 11, 2012 01:31 PM|Apocolyptica|LINK
Thanks but that captures just the queries. I am looking for a way to ultimately log this information in an Excel sheet where colum A has the table names and column b contain all the fields used from each table. I guess I am hoping there is some kind of database
object that will parse all that from the queries for me so I can just write it out to file.
Jul 12, 2012 09:36 PM|Decker Dong - MSFT|LINK
Do you want to do logging for all the table names included by a certain database？