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

推荐订阅源

T
The Blog of Author Tim Ferriss
S
Securelist
D
Docker
The Register - Security
The Register - Security
GbyAI
GbyAI
Recorded Future
Recorded Future
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
罗磊的独立博客
博客园 - 【当耐特】
F
Full Disclosure
WordPress大学
WordPress大学
腾讯CDC
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
SecWiki News
SecWiki News
L
Lohrmann on Cybersecurity
I
InfoQ
MyScale Blog
MyScale Blog
量子位
Cyberwarzone
Cyberwarzone
博客园 - 三生石上(FineUI控件)
The Hacker News
The Hacker News
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
博客园_首页
H
Help Net Security
K
Kaspersky official blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Webroot Blog
Webroot Blog
Blog — PlanetScale
Blog — PlanetScale
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
The Cloudflare Blog
P
Proofpoint News Feed
V
Visual Studio Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tailwind CSS Blog
爱范儿
爱范儿
P
Privacy International News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog RSS Feed

博客园 - IT-民工

Linked Server Dependencies C# PDF添加水印 Excel Vlookup多条件查询 , 列转行 C# 编写ActiveX Microsoft.Office.Interop.Excel error: 80070005 C# Linq 分页查询模板 SQLServer 查询 Excel ISO 纸张尺寸定义 检测SQLSERVER 连接 刷新SQLserver 视图 Sql Server 邮件日志 操作 常用连接 导出Excel Asp.net 多国语言-注意点 SqlServer 行列互转 SqlServer 备份数据库语法 SqlServer To SqlServer 建立 链接服务器 Linked Server sqlserver 根据内容,查询表和列名字 Sqlserver 2005 修改数据库默认排序
Sqlsever Kill locked process
IT-民工 · 2015-03-26 · via 博客园 - IT-民工
SET QUOTED_IDENTIFIER ON
SET ANSI_NULLS ON
GO


-- =============================================
-- Author:        <machao>
-- Create date: <2014-04-16>
-- Description:    <kill all lock in db>
-- =============================================
CREATE PROCEDURE [dbo].UP_Lock_Kill
AS
BEGIN
    DECLARE @sql VARCHAR(100) 
    WHILE 1 = 1 
        BEGIN 
            SELECT TOP 1
                    @sql = 'kill ' + CAST(spid AS VARCHAR(3))
            FROM    master..sysprocesses
            WHERE   spid > 50
                    AND spid <> @@spid 
            IF @@rowcount = 0 
                BREAK 
            EXEC(@sql) 
        END
END


GO

posted @ 2015-03-26 14:16  IT-民工  阅读(206)  评论()    收藏  举报