Logging ALL Queries on a SQL Server 2008 Express Database?

前端 未结 7 1589
说谎
说谎 2020-11-28 05:23

Is there a way to tell SQL Server 2008 Express to log every query (including each and every SELECT Query!) into a file?

It\'s a Development machine, so the negative

7条回答
  •  被撕碎了的回忆
    2020-11-28 05:41

    Just for the record, I'm including the hints to use DataWizard's SQL Performance Profiler as a separate answer since it's really the opposite to the answer pointing at SQL Server Profiler.

    There is a free trial for 14 days, but even if you need to buy it, it's only $20 for 3 servers (at the moment of writing, 2012-06-28). This seems more than fair to me considering the thousands everybody using SQL Server Express edition has saved.

    I've only used the trial so far and it offers exactly what the OP was looking for: a way to trace all queries coming in to a specific database. It also offers to export a trace to an XML file. The paid version offers some more features but I haven't tried them yet.

    Disclaimer: I'm just another developer messing with DBs from time to time and I'm in no way affiliated with DataWizard. I just so happened to like their tool and wanted to let people know it existed as it's helped me out with profiling my SQL Server Express installation.

提交回复
热议问题