Reputation: 4767
In SequelPro there is a nice feature that will give a log of any statements that the application runs (same with Navicat I believe). For example:
Is there anything similar in SSMS where it can show the queries that the application produces behind the scenes, for example, if I do a "rename table" that it would log something like ALTER TABLE table...
?
Upvotes: 1
Views: 244
Reputation: 16411
Please try the query below, it works in Azure SQL databse:
SELECT deqs.last_execution_time AS [Time], dest.TEXT AS [Query]
FROM sys.dm_exec_query_stats AS deqs
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
ORDER BY deqs.last_execution_time DESC
It can view all the executed SQL queries in SSMS. It still has some limits but it's the closest answer:
Upvotes: 2