Detach
25/05/2005
0
Ola pessoal.
Como faço para derrubar usuarios via comando no sql server 2000?
Obrigado!
Ricardo Gavira
DigithoBrasil
Como faço para derrubar usuarios via comando no sql server 2000?
Obrigado!
Ricardo Gavira
DigithoBrasil
By_gandalf
Curtir tópico
+ 0
Responder
Posts
27/05/2005
Marcus.magalhaes
Bom dia.
Utilize o comando kill
Ex.:
Declare @var_spid Int,
@var_command VarChar(255)
Declare cur_CONEXAO Cursor For Select spid From master..sysprocesses (NoLock) Where spid <> @@spid
Open cur_CONEXAO
Fetch Next From cur_CONEXAO Into @var_spid
While (@@fetch_status = 0)
Begin
Set @var_command = ´kill ´ + Convert(VarChar, @var_spid)
Exec (@var_command)
Fetch Next From cur_CONEXAO Into @var_spid
End
Close cur_CONEXAO
Deallocate cur_CONEXAO
GO
Utilize o comando kill
Ex.:
Declare @var_spid Int,
@var_command VarChar(255)
Declare cur_CONEXAO Cursor For Select spid From master..sysprocesses (NoLock) Where spid <> @@spid
Open cur_CONEXAO
Fetch Next From cur_CONEXAO Into @var_spid
While (@@fetch_status = 0)
Begin
Set @var_command = ´kill ´ + Convert(VarChar, @var_spid)
Exec (@var_command)
Fetch Next From cur_CONEXAO Into @var_spid
End
Close cur_CONEXAO
Deallocate cur_CONEXAO
GO
Responder
Clique aqui para fazer login e interagir na Comunidade :)