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

推荐订阅源

博客园_首页
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
G
Google Developers Blog
B
Blog
Engineering at Meta
Engineering at Meta
阮一峰的网络日志
阮一峰的网络日志
The Register - Security
The Register - Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 叶小钗
The Cloudflare Blog
The Hacker News
The Hacker News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
雷峰网
雷峰网
F
Fortinet All Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
A
About on SuperTechFans
量子位
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
H
Help Net Security
Help Net Security
Help Net Security
P
Palo Alto Networks Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Troy Hunt's Blog
W
WeLiveSecurity
V
Vulnerabilities – Threatpost
T
The Exploit Database - CXSecurity.com
Know Your Adversary
Know Your Adversary
Apple Machine Learning Research
Apple Machine Learning Research
Scott Helme
Scott Helme
N
News | PayPal Newsroom
AWS News Blog
AWS News Blog
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
腾讯CDC
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
TaoSecurity Blog
TaoSecurity Blog
GbyAI
GbyAI
Y
Y Combinator Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
D
Docker

博客园 - 东国先生

MongoDB - 安装及相关资料 8种Nosql数据库系统对比 Apache 服务器安装和配置相关资料 ffmpeg: error while loading shared libraries: libavdevice.so.53 亚马逊S3 - The difference between the request time and the current time is too large. Imagick setFont() 不能设置字体问题 当Linux中glibc被无意删除后…… vim终端下中文乱码问题 解决Linux中文乱码 Linux下PHP文件操作提示无权限 zen-cart开发教程 - 通知者/观察者模式 zen-cart开发教程 - 开发Sidebox插件 修改zen-cart下单和付款流程以防止漏单 利用反射设置对象的属性(Property) 【转载】Paypal 标准变量列表 C#中的委托 zen-cart开发教程 - 概述 PHP文件操作函数 2009年终总结
还原sql server数据库时,无法获得对数据库的独占访问权
东国先生 · 2010-08-31 · via 博客园 - 东国先生

declare @dbname   varchar(20)
set @dbname='56fc'
declare   @sql   nvarchar(500)
declare   @spid   int--SPID   值是当用户进行连接时指派给该连接的一个唯一的整数
set   @sql= 'declare   getspid   cursor   for   select   spid   from   sysprocesses   where   dbid=db_id('''+@dbname+''') '
--sysprocesses   包含有关   SQL   Server   进程的信息。
exec   (@sql)
open   getspid
fetch   next   from   getspid   into   @spid
while   @@fetch_status <> -1--如果FETCH   语句没有执行失败或此行不在结果集中。
begin
exec( 'kill   '+@spid)--终止正常连接
fetch   next   from   getspid   into   @spid
end
close   getspid
deallocate   getspid

posted on 2010-08-31 14:16  东国先生  阅读(990)  评论()    收藏  举报