I found the following query on Google:
DECLARE @SQL varchar(max)
SELECT @SQL = COALESCE(@SQL,'') + 'Kill ' + Convert(varchar, SPId) + ';'
WHERE DBId = DB_ID(<databasename>) AND SPId <> @@SPId
Fairly straightforward however when I run it doesn't work, but the execution window says query run successfully.
How would I go about debugging this? I am running SQL Server 2008 R2
Any assistance is appreciated.