sql – get running queries

Use the following snippet to get running queries on an Microsoft SQL Server. To stop a running query, take the session_id and write KILL 12 if 12 corresponds to the session_id