Script
SELECT S.*, C.*, R.*,
MRS.dbid AS
DERNIERE_BD_REQUETE, MRS.text AS
DERNIERE_REQUETE,
Q.dbid AS BD_REQUETE, Q.text AS REQUETE,
P.query_plan AS
PLAN_REQUETE
FROM sys.dm_exec_sessions
AS S
LEFT OUTER JOIN sys.dm_exec_connections
AS C
ON S.session_id = C.session_id
OUTER APPLY
sys.dm_exec_sql_text(most_recent_sql_handle) AS MRS
LEFT OUTER JOIN sys.dm_exec_requests
AS R
ON S.session_id = R.session_id
OUTER APPLY
sys.dm_exec_sql_text(sql_handle) AS Q
OUTER APPLY
sys.dm_exec_query_plan(plan_handle) AS P;
Un exemple d'utilité de ce script : vous devez supprimer ("killer") un processus - il vous suffit juste de récupérer l'identifiant du processus dans la liste.
Aucun commentaire:
Enregistrer un commentaire