Вот скрипт:

use master
go
declare @p smallint
declare sysprocesses_cursor cursor for select spid from sysprocesses where dbid=6
open sysprocesses_cursor
fetch next from sysprocesses_cursor into @p
while @@fetch_status=0
begin
kill @p
fetch next from sysprocesses_cursor into @p
end
close sysprocesses_cursor
deallocate sysprocesses_cursor

Когда запускаю его в Query Analyzer выдается ошибка:

Server: Msg 170, Level 15, State 1, Line 9
Line 9: Incorrect syntax near '@p'.

Вобщем на оператор kill ругается.
Помогите разобраться, что тут не так?
Зараннее спасибо.