April 12, 2013 at 11:42 am
We have a website that has thousands of asp and asp.net pages. One of the pages has been written to do a deletion of records on a specific table. We know the table the records are being deleted from, the stored procedure that is doing the deletion, but don't know the asp page calling the stored procedure.
Is there a way of doing a trace or change tracking (for the specific table) or delete trigger that captures the asp page name that is calling the deletion?
April 12, 2013 at 11:57 am
Why not just search the website directories for the name of the stored proc? Unless you have done something to the connection string, or pass a value to a stored proc, there is no way sql will be able to tell one page from another. The pages will all use the same connection.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
April 12, 2013 at 12:33 pm
Sean Lange (4/12/2013)
Why not just search the website directories for the name of the stored proc? Unless you have done something to the connection string, or pass a value to a stored proc, there is no way sql will be able to tell one page from another. The pages will all use the same connection.
agreed; every page would need to be modified just to be sure to send information to SQL server so SQL could see which page it was...so it's much easier to look at the source of the problem (search the web pages)
That which page did it kind of info does not exist at all on the SQL server side.
Lowell
April 12, 2013 at 12:52 pm
Ok. Thank you. I was hoping for some cool way at the database level to do it. The text search of webpages takes a long time to complete as there are so many. It looks like that's the way to do it though.
April 12, 2013 at 1:00 pm
hmbmeister (4/12/2013)
Ok. Thank you. I was hoping for some cool way at the database level to do it. The text search of webpages takes a long time to complete as there are so many. It looks like that's the way to do it though.
It really is the only way you can do this type of thing. It can take some time if you have tons of files which it sounds like you do. You might need to either copy all the files somewhere or do your search at an off time so you don't kill your server and subsequently your site while the search is happening.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply