Última consulta mSqlSever

Última sentencia ejecutada en msqlserver

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

Path donde guarda los archivos .mdf

select * from sys.database_files
Posted in Uncategorized