当前位置:网站首页>SQLSERVER database restore stored procedure script
SQLSERVER database restore stored procedure script
2022-06-23 02:27:00 【FHAdmin】
Stored procedures must be created in the master in
#from fhadmin.cn
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('''[email protected]+''')'
exec (@sql)
open getspid
fetch next from getspid into @spid
while @@fetch_status <> -1
begin
exec('kill '[email protected])
fetch next from getspid into @spid
end
close getspid
deallocate getspid
end 边栏推荐
- 5g access network and base station evolution
- Analysis of ThreadLocal
- Understand GB, gbdt and xgboost step by step
- //1.17 printf function
- //1.16 getchar function
- Deep learning environment configuration (I) installation of CUDA and cudnn
- 【CodeWars】 Pete, the baker
- For Xiaobai who just learned to crawl, you can understand it after reading it
- Arm assembly syntax
- Exercise analysis summary
猜你喜欢
![Buuctf misc-[bjdctf2020] Nani](/img/4e/ac6bf2f64cb68136581814da73db66.jpg)
Buuctf misc-[bjdctf2020] Nani

Digital circuit logic design

Application and challenge of ten billion level map data in Kwai security intelligence

Xgboost principle

Analog Electronic Technology

JS advanced part

Performance testing -- Interpretation and practice of 16 enterprise level project framework

Arm assembly syntax

Cmake configuration error, error configuration process, Preject files may be invalid

Quick sorting C language code + auxiliary diagram + Notes
随机推荐
[target tracking] open source | polytrack: use boundary polygons to quickly track and segment multiple targets, instead of bounding box and mask tracking
//1.15 putchar function
1. Mx6u bare metal program (2) - Lighting master (imitating 32 register version)
JS to realize the rotation chart (riding light). Pictures can be switched left and right. Moving the mouse will stop the rotation
The difference between script in head and body
Why is BeanUtils not recommended?
Nfv and SDN
Problem thinking and analysis process
Three methods for solving Fibonacci sequence feibonacci (seeking rabbit) - program design
Phpexcel export with picture Excel
Stop automatically after MySQL starts (unable to start)
[CodeWars] Convert Decimal Degrees to Degrees, Minutes, Seconds
Information theory and coding
How to set up an H5 demo of easyplayer locally to play h265 video streams?
Digital integrated circuit design process
Li Mu's notes on machine learning -1.2
OVS port traffic statistics practice
3. install and deploy Mgr cluster | explain Mgr in simple terms
//1.8 char character variable assignment integer
Pychart installation instructions