p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Expert SQL Server 2005 Integration Services ISBN: 978-0-470-13411-5 (http://p2p.wrox.com/forumdisplay.php?f=333)
-   -   usp_killusers (http://p2p.wrox.com/showthread.php?t=59585)

ccote_1 June 29th, 2007 07:43 AM

usp_killusers
 
HI, on page 231 of the book, it is wtritten that a script called usp_killusers can be found on www.wrox.com. Whne I seach in downloads on wrox.com, I do not find it. Where can I find this script?

Thank you,
Ccote

dakaratekid June 29th, 2007 11:05 AM

You can just roll your own:

create proc usp_killusers
@dbname varchar(30)
as
declare @sql varchar(60)
declare kill_cur cursor fast_forward for
select 'kill ' + cast(spid as varchar) from master.dbo.sysprocesses where dbid = db_id(@dbname)

open kill_cur
fetch next from kill_cur into @sql
while @@fetch_status = 0
begin
   exec(@sql)
   fetch next from kill_cur into @sql
end
close kill_cur
deallocate kill_cur
go

hth, dKK


ccote_1 July 1st, 2007 08:56 AM

Quote:

quote:Originally posted by dakaratekid
 You can just roll your own:

create proc usp_killusers
@dbname varchar(30)
as
declare @sql varchar(60)
declare kill_cur cursor fast_forward for
select 'kill ' + cast(spid as varchar) from master.dbo.sysprocesses where dbid = db_id(@dbname)

open kill_cur
fetch next from kill_cur into @sql
while @@fetch_status = 0
begin
exec(@sql)
fetch next from kill_cur into @sql
end
close kill_cur
deallocate kill_cur
go

hth, dKK


HI, Thanks for your help! But the book should not tell readers something that seems to be not exact. If the usp_killusers exists, it should be available here. But waht you gave me will do the job.

Thanks again!


All times are GMT -4. The time now is 03:19 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.