Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 How to kill SQL server user from Remote computer

Author  Topic 

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2010-06-24 : 08:13:28
Hi

I need to kill all users which are connected to SQL server from remote computer command promt pls help me

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-06-24 : 11:06:43
Use sys.dm_exec_sessions to get the Session_ids for each, then use the KILL statement for each one

--
Gail Shaw
SQL Server MVP
Go to Top of Page

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2010-06-25 : 05:19:46
Hi,

I am not able to login to SQL server to use SSMS to query with sys.dm_exec_sessions to get the Session_ids for each..without login to the server i need to kill the SPID.

Please help me if any one experienced this before.

Thanks,
Gangadhar
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-06-25 : 08:11:08
You can't kill connections without logging into SQL. Unless you restart the SQL Server.

why can't you log in?

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -