Cancel Query in remote ssms from ssms in my pc
Step 1:  Get query session id using below query

SELECT sqltext.TEXT,
req.session_id,----- SPID
req.status,
req.command,
req.cpu_time,
req.total_elapsed_time,req.start_time,db_name(database_id) DatabaseName
FROM sys.dm_exec_requests req
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext
where [status] &lt;&gt; 'background'
and command&lt;&gt; 'TASK MANAGER'




Step 2: use kill command to kill the process execution

Kill(53) -- KIll (SPID)