惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
B
Blog
M
MIT News - Artificial intelligence
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Proofpoint News Feed
C
Check Point Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
博客园 - 叶小钗
S
SegmentFault 最新的问题
Last Week in AI
Last Week in AI
T
The Blog of Author Tim Ferriss
Microsoft Security Blog
Microsoft Security Blog
小众软件
小众软件
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 【当耐特】
腾讯CDC
博客园 - Franky
博客园 - 聂微东
V
Visual Studio Blog
GbyAI
GbyAI
Martin Fowler
Martin Fowler
罗磊的独立博客
Y
Y Combinator Blog

博客园 - standas

获取元素的绝对位置 Tomcat 支持中文和不区分大小写 - standas - 博客园 安装 Realtek HD Audio Driver 失败 CSS工具列表 Meta标签详解 changimg - standas - 博客园 网页中调用本地exe程序 - standas - 博客园 Microsoft JET Database Engine 错误 '80040e09' FCKeditor 在上传中文文件时文件名出现乱码 ASP.NET访问Oracle数据库的方法(转) oracle_net.msi下载地址 oracle常用函数 oracle连接字符串 网站被挂木马,中毒了 电脑出现怪问题 全球15个顶级技术类博客 十个未来发展趋势 java课程资源 Java环境搭建
用于asp.net还原与恢复sqlserver数据库的killspid存储过程
standas · 2007-11-08 · via 博客园 - standas

create proc killspid (@dbname varchar(20))
as
begin
declare @sql nvarchar(500)
declare @spid int
set @sql='declare getspid cursor for
select spid from sysprocesses where dbid=db_id('''+@dbname+''')'
exec (@sql)
open getspid
fetch next from getspid into @spid
while @@fetch_status<>-1
begin
exec('kill '+@spid)
fetch next from getspid into @spid
end
close getspid
deallocate getspid
end
GO

posted on 2007-11-08 12:17  standas  阅读(777)  评论(0)    收藏  举报