I am working on a old asp.net web application application which have a huge amount of pages. I am using stored procedures. Every page uses SqlDataSource's select, insert, update and delete option. Now, I want to log every select, insert, update and delete going from my application. Is there is a central way where I can inspect every SQL before and after execution?
Asked
Active
Viewed 19 times
0
-
If you are using stored procedures to do the operations, you can pass a user id and log the operation, the id and the date in log table – gotqn Nov 20 '13 at 12:19
-
I know, but there are 1000s SPs. I need a centerlize place – Imran Qadir Baksh - Baloch Nov 20 '13 at 12:20
-
The alternative is to use triggers to log when changes are made on the tables, but you will not be able to log the "select" operation. – gotqn Nov 20 '13 at 12:21
-
@gotqn, I am thinking how glimpse do this in a simple way, https://github.com/Glimpse/Glimpse/wiki/Sql-tab – Imran Qadir Baksh - Baloch Nov 20 '13 at 12:34
-
Yes, I get your point. I have try to find how to extract this information from the transaction log file - you can check this http://stackoverflow.com/questions/4507509/how-to-view-transaction-logs-in-sql-server-2008 but it seems to be undocumented and as there is no way to do this in the server. As I have read, there are some external programs that to that, but for older SQL Server versions only. – gotqn Nov 20 '13 at 13:20