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 |
|
alanlambert
Starting Member
26 Posts |
Posted - 2010-01-10 : 12:36:09
|
| I have been asked to look at a CMS running behind several production websites that's using a sql 2005 database. For some reason every now and again the information for a website's home page is being lost.The code for the CMS (ASP.NET) is pretty terrible with all data access being done from inline sql distributed all over the pages and no centralised data handling code. It is therefore very difficult trying to find exactly what is happening to cause this problem.I was wondering if there is a way to automatically record every sql statement executed against a database so I can start to try to understand what's happening. Is there a way to do this or can you recommend a better approach? I'm really tearing my hair out over this so am incredibly greatful for any help you can give.Alan |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
alanlambert
Starting Member
26 Posts |
Posted - 2010-01-11 : 02:39:21
|
| TaraThanks very much for the advice. I've had a look at Profiler and, as you suggest, it gives me exactly what I need.On other quick question though - what affect is logging every sql statement to a database table going to have on the performance of the main database?Thanks againAlan |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
alanlambert
Starting Member
26 Posts |
Posted - 2010-01-12 : 03:18:07
|
| TaraThank you again for your helpAlan |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2010-01-12 : 04:25:34
|
If you struggle to Filter your Performance Monitor Profiler data mountain :) enough to make it easy to find the row you are looking for you could consider putting a trigger on the CMS table and insert an entry into a LOG table (with Date/Time/UserID) when the row in the CMS table relating to your Home Pages changes (that in turn could alert you I suppose). That would give you Date/Time to look for in your Performance Monitor Profiler data.Alternatively ServersAlive (freebie for up to 10 monitor locations I think) could alert you the moment that some text disappears from the Home Page - that would give you a timestamp too.Edit: Sorry, dyslexic-brain-fade |
 |
|
|
|
|
|