SSMS Tools Pack: It is the best free Sql Server Management Studio(SSMS)’s add-in having lots of features like Execution Plan Analyzer, SQL Snippets, Execution History, Search Table, View or Database Data, Search Results in Grid Mode, Generate Insert statements from result sets, tables or database, Regions and Debug sections, CRUD stored procedure generation, New query template.etc.
I have just installed SSMS tools pack from http://www.ssmstoolspack.com everything seems to work except I cant view queries from my .net application. If I run a query through management studion SSMS correctly displays the query. but when running my application no queries are shown in the local history window.
There is mention of enabling logging in the connection string but I can find no reference to this anywhere, the closest I got was
QueryLog_On='yes'
but I get an exception when I try to use it Unrecognized attribute 'QueryLog_On'
.Has anyone used SSMS and knows how to set up query logging for a .net application?
DeveloperChrisDeveloperChris
2 Answers
SSMS Toolpack isn't a general purpose query logger, it is a plug-in that caches a query history for the application into which it is 'plugged' (SSMS in this case).
If this is a .NET application that you wrote, you will need to have the application to cache its own query history - maybe something as simple as a text box to which you append each query before you send it to the database server.
Even though the SSMS Toolkit won't do what you'd like, you can list recently executed queries from the dynamic management views, with the caveat that it will only list queries that haven't yet been flushed from the cache. Here is a sample that lists the last 100 queries that are still in cache - based on a query by Michelle Ufford:
KenJKenJ
anjlab's sql profiler sqlprofiler.googlepages.com does what I need. its quite powerful with good filtering so you can limit by user database etc
DeveloperChrisDeveloperChris