select request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableNamefrom sys.dm_tran_locks where resource_type=’OBJECT’spid 锁表进程tableNa ...
分类:
数据库 时间:
2019-01-26 17:58:38
阅读次数:
196
##阻塞 use masterdeclare @spid int,@bl intDECLARE s_cur CURSOR FOR select 0 ,blockedfrom (select * from sysprocesses where blocked>0 ) a where not exist ...
分类:
数据库 时间:
2019-01-25 19:21:41
阅读次数:
203
问题描述: sqlserver在删除登录名的时候提示删除失败 解决方法: 这是因为这个登录名还有人正在使用登录的状态连接着 1.首先执行:EXEC sp_who 查出登录名对应的进程的spid 2.执行kill spid来杀掉进程 例如查到loginname是spid为10:就执行kill 10 3 ...
分类:
数据库 时间:
2019-01-22 10:51:06
阅读次数:
760
declare @i int declare cur cursor for select spid from sysprocesses where db_name(dbid)= '数据库名' open cur fetch next from cur into @i while @@fetch_sta ...
分类:
数据库 时间:
2019-01-19 20:01:19
阅读次数:
195
select request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName from sys.dm_tran_locks where resource_type='OBJECT' declare @spid ...
分类:
数据库 时间:
2019-01-14 20:23:22
阅读次数:
481
select 'kill ',s.spid, sd.name, * from sys.sysprocesses sinner join sys.sysdatabases sd on s.dbid=sd.dbid where spid>50and sd.name='SmartOperation' sp ...
分类:
数据库 时间:
2018-12-27 15:35:20
阅读次数:
187
SELECT * FROM( SELECT [SPID] ,[PH1] ,[PH1_Code] ,[ProjectName] ,ROW_NUMBER() OVER(PARTITION BY [SPID] ORDER BY [SPID]) RowNum FROM( SELECT a.[SPID] ,b ...
分类:
数据库 时间:
2018-12-18 14:42:04
阅读次数:
2118
CrawlSpider 创建工程scrapy startproject crawlSpiderPro cd crawlSpiderPro 创建爬虫文件 scrapy genspider -t crawl chouti dig.chouti.com 基于scrapySpider爬虫文件的和基于spid ...
分类:
其他好文 时间:
2018-12-10 14:12:51
阅读次数:
171
USE master; GO DECLARE @SQL VARCHAR(MAX); SET @SQL='' SELECT @SQL=@SQL+'; KILL '+RTRIM(SPID) FROM master..sysprocesses WHERE dbid=DB_ID('数据库名'); EXEC( ...
分类:
数据库 时间:
2018-11-30 20:21:29
阅读次数:
215
查看被锁表: 解除锁: 查看被锁表: spid 锁表进程 tableName 被锁表名 解锁: ...
分类:
数据库 时间:
2018-11-24 11:39:39
阅读次数:
203