遇到的原因:用户在post General Journal时候,电脑死机,重启后如下图
转到SQL服务器,查看SQLCLIENTSESSIONS表以查看所有用户会话。
确切删除该用户的带有USERID和SESSIONID的行。
栏位SPID对应数据库的
会话ID是对应AX的
Another way to find this is by running this script to find the SPid # and AOS server name. Then go into that particular AOS to AX > administration > online users to match the SPid# to identify which user is causing the initial blocking session. Once identified, You can then kill that users session in sql. All other user sessions that are blocked will quickly end themselves after that. This works for multiple "Ending-Blocked" issues.
SELECT spid ,status ,loginame = SUBSTRING(loginame, 1, 12) ,hostname = SUBSTRING(hostname, 1, 12) ,blk = CONVERT(char(3), blocked) ,open_tran ,dbname = SUBSTRING(DB_NAME(dbid),1,10) ,cmd ,waittype ,waittime ,last_batch FROM master.dbo.sysprocesses WHERE spid IN (SELECT blocked FROM master.dbo.sysprocesses) AND blocked = 0 --When you find the spid#
Kill <spid#>
留言评论
暂无留言