Dynamics ax Online users: Ending - Blocked

遇到的原因:用户在post General Journal时候,电脑死机,重启后如下图

2.png

转到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#>

http://maryd.cn/?id=154

    Danzel
    Danzel管理员

    • 声明:本文由Danzel于2021-02-05转载(优化),转载须经原站同意并注明出处。
    • 本文地址:http://maryd.cn/?id=155
    上一篇:SqlServer数据库查看被锁表以及解锁Kill杀死进程
    下一篇:IDEA 2019.2.4破解

    留言评论

    暂无留言
    取消
    扫码支持