当前位置:网站首页>解决SQL Server数据库独占的问题
解决SQL Server数据库独占的问题
2022-07-28 16:20:00 【mojocube】
use master
go
declare @dbname varchar(20)
set @dbname='OA' ---这是数据库名称
declare @sql nvarchar(500)
declare @spid int--SPID 值是当用户进行连接时指派给该连接的一个唯一的整数
set @sql='declare getspid cursor for
select spid from sysprocesses where dbid=db_id('''[email protected]+''')'
exec (@sql)
open getspid
fetch next from getspid into @spid
while @@fetch_status<>-1--如果FETCH 语句没有执行失败或此行不在结果集中。
begin
exec('kill '[email protected])--终止正常连接
fetch next from getspid into @spid
end
close getspid
deallocate getspid
边栏推荐
- Unity shader global fog effect
- 传英伟达已与软银展开会谈,将出价超过320亿美元收购Arm
- Add differential pairs and connections in Ad
- Codeforces round 768 (Div. 2) e.paint the middle (greedy / interval relationship processing)
- 浏览器解码过程分析
- SUSE Storage6 环境搭建详细步骤 – Win10 + VMware WorkStation
- 综合设计一个OPPE主页--页面的售后服务
- Applet: scroll view slides to the bottom by default
- Ugui learning notes (III) summary of the use of each control
- 微服务架构-服务注册中心和服务网关(6.8) (转载)
猜你喜欢

The maximum recommended number of rows for MySQL is 2000W. Is it reliable?

MySQL installation tutorial

DGL Chapter 1 (official tutorial) personal notes

22年多校第三场(F的证明

Applet: scroll view slides to the bottom by default

RE14: reading paper illsi interpretable low resource legal decision making
![[deep learning]: day 9 of pytorch introduction to project practice: dropout implementation (including source code)](/img/19/18d6e94a1e0fa4a75b66cf8cd99595.png)
[deep learning]: day 9 of pytorch introduction to project practice: dropout implementation (including source code)
![[deep learning]: day 6 of pytorch introduction to project practice: multi-layer perceptron (including code)](/img/19/18d6e94a1e0fa4a75b66cf8cd99595.png)
[deep learning]: day 6 of pytorch introduction to project practice: multi-layer perceptron (including code)

Source code of voice live broadcast app

The 16th program design competition of Dalian University of Technology (Problem Solver)
随机推荐
[deep learning]: the second day of pytorch introduction to project practice: realize linear regression from zero (including detailed code)
Ugui learning notes (V) togglegroup makes multiple choice radio boxes
火了 2 年的服务网格究竟给微服务带来了什么?(转载)
Semtech推出物联网地理定位解决方案LoRa Edge,首款芯片LR1110现已上市
Unity3d simple implementation of water surface shader
Function接口之andThen
Re10: are we really making much progress? Revisiting, benchmarking, and refining heterogeneous gr
[deep learning]: day 6 of pytorch introduction to project practice: multi-layer perceptron (including code)
Re12: read these3 semantic self segmentation for abstract summary of long legal documents in low
Alibaba cloud - Wulin headlines - site building expert competition
MD5 encryption verification
Unity shader realizes water wave effect with noise texture
Re13: read the paper gender and racial stereotype detection in legal opinion word embeddings
It is said that NVIDIA has held talks with Softbank and will offer more than US $32billion to acquire arm
System clock failure of database fault tolerance
Games101-assignment05 ray tracing - rays intersect triangles
Time complexity
Go language slow entry - process control statement
Record the processing process of CEPH two RBDS that cannot be deleted
Algorithm learning: leetcode interview question 09. implement queue with two stacks