Как посмотреть активных пользователей?

Sasha09
Дата: 14.10.2003 17:00:26
Подсакажите люди добрые, как на SQL Server 2000 посмотреть активных пользователей?
pkarklin
Дата: 14.10.2003 17:03:55
sp_who
Sasha09
Дата: 14.10.2003 17:07:32
А можно ли выкидывать людей выборочно?
pkarklin
Дата: 14.10.2003 17:10:33
А можно ли выкидывать людей выборочно?

Куда ты их бедолаг то выкидывать собрался? :-) KILL не подойдет?
Sasha09
Дата: 14.10.2003 17:12:24
Мне нужно знать как выкинуть, а куда я уж сам придумаю =)))))))))
Sasha09
Дата: 14.10.2003 17:21:25
Люди??? Ау.
Ну дак ка же закрыть соединение пользователя с базой?
pkarklin
Дата: 14.10.2003 17:24:58
Люди??? Ау.

...мать, ...мать, ...мать по привычке ответило эхо.

Ладно, попробуем тщательнее.

KILL

Terminates a user process based on the system process ID (SPID) or unit of work (UOW). If the specified SPID or UOW has a lot of work to undo, the KILL command may take some time to complete, particularly when it involves rolling back a long transaction.

In Microsoft® SQL Server™ 2000, KILL can be used to terminate a normal connection, which internally terminates the transactions associated with the given SPID. In addition, the command can also be used to terminate all orphaned distributed transactions when Microsoft Distributed Transaction Coordinator (MS DTC) is in use. A distributed transaction is orphaned when it is not associated with any current SPID.

Syntax
KILL {spid | UOW} [WITH STATUSONLY]
Sasha09
Дата: 14.10.2003 17:43:23
thanks