Cómo ver la lista de ejecuciones de consultas remotas en SQL Server

I am using the latest version of SQL Server Express. I have installed it in one machine, and am executing queries on it from a remote machine diagrammatically. In the machine where SQL Server Express is installed, I ran this query to see what remote queries were executed :

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

this is from this post : Ver la lista de todas las consultas SQL ejecutadas en el servidor

But it seems to list only the locally-executed queries. How do I see the list of all the queries (including those that I executed in this DB from the remote machine). Or, is it that, because some of my remote queries failed to execute (they returned sql server error code 102 severity 15), will they not be listed here? If yes, then how do I see what queries were 'attempted to be executed'? (so that I can see what error was there in the remote query even if failed to execute)

preguntado el 05 de mayo de 13 a las 18:05

Those queries won't be shown as they didn't even compile. Have you access to SQL Profiler? -

Are you using ADO.NET to execute the queries? -

Actually you said "diagramatically". Not sure what that means, though. My mind read it "programatically". -

Sorry marceln, it is 'programmatically'. @MartinSmith, nope, since it is the Express version, it doesn't have a profiler. Anjlabs seemed to have a free profiler, but now it's not free. Any free profiler? or Any other way to list the queries ? -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.