还原SQL server失败导致单个用户
https://jingyan.baidu.com/article/20095761ca8343cb0721b4fb.html
还原SQL server失败导致单个用户问题:
1 DECLARE @SQL VARCHAR(MAX); 2 SET @SQL='' 3 SELECT @SQL=@SQL+'; KILL '+RTRIM(SPID) 4 FROM master..sysprocesses 5 WHERE dbid=DB_ID('DEV_SMM_LB'); 6 EXEC(@SQL); 7 ALTER DATABASE DEV_SMM_LB SET MULTI_USER