Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
fuzzzrite
Starting Member
1 Post |
Posted - 2010-08-24 : 05:50:47
|
I have a very strange and complicated situation. I have data being erased from one of my SQL Server tables, and I am not sure by what application. I would like to be able to track this.As I am sure you are wondering how I could find myself in this situation, here is some background. We have 2 servers, Web and Database running IIS6 and SQL Server 2005 respectively. They were setup by the previous developer who left the company without giving me any sort of introduction to the system so I am left "hunting" for everything.. I have been able to figure out most of the system on my own except for this, which remains a mystery. All I know for sure is this:Data is being erased at a set time every day (I have setup a TRIGGER to capture this)It is not a SQL Server Agent JobIt is not a Windows Scheduled TaskIt is not a Windows ServiceAll database logins are done with the 'sa' user so login history cannot help me... (again, I didn't set this up)How the heck do I debug something like this? If anything, I want to know if this is coming from something running on the database server, or from a request from an outside source. Please help Steve KissCode Monkeydevelopment@stevekiss.com |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2010-08-24 : 06:34:36
|
You can run a trace to capture this with SQL Profiler. Add all of the data columns that you think will be helpful to capture this. Probably add RPC:Completed and SQL:StmtCompleted to the trace. You may need other events, just make sure you don't add too many or performance will suffer.Configure the trace to save to a file to prevent performance problems. Each day restart the trace until you've captured the data you need. You can save the trace data from the file into a table using SQL Profiler or via INSERT/SELECT using this method: http://support.microsoft.com/kb/325197Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
|
|
|
|
|