﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss content posted by ashokjanjani / Article Discussions / Article Discussions by Author  / Kill All User Sessions / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 19 Jun 2013 14:30:25 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Kill All User Sessions</title><link>http://www.sqlservercentral.com/Forums/Topic401541-458-1.aspx</link><description>DECLARE @SQL VARCHAR(8000)SELECT  @SQL	=	COALESCE(@SQL, '') + 'KILL ' + CAST(SPID AS VARCHAR(10)) + '; 'FROM SYS.SYSPROCESSESSELECT @SQLEXEC(@SQL)</description><pubDate>Mon, 07 Dec 2009 01:00:33 GMT</pubDate><dc:creator>rajdaksha</dc:creator></item><item><title>RE: Kill All User Sessions</title><link>http://www.sqlservercentral.com/Forums/Topic401541-458-1.aspx</link><description>I used a modifed version to block users from my database. Instead of using a cursor you can use... declare @out nVarchar(4000)    SELECT @out = COALESCE (RTRIM(@out)+' Kill  ' ,'')+  cast(spid as varchar(10))      from master..sysprocesses  where db_name(dbid) = 'myDatabase' AND NT_USERNAME like @uidset @out= 'kill ' + @outexecute sp_executesql  @out</description><pubDate>Sun, 16 Dec 2007 21:40:08 GMT</pubDate><dc:creator>JOn-323586</dc:creator></item><item><title>Kill All User Sessions</title><link>http://www.sqlservercentral.com/Forums/Topic401541-458-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/Miscellaneous/30838/"&gt;Kill All User Sessions&lt;/A&gt;[/B]</description><pubDate>Sun, 23 Sep 2007 02:33:59 GMT</pubDate><dc:creator>ashokjanjani</dc:creator></item></channel></rss>