Share via


SSAS: How to Kill specific SPID, connection or session

                                                            https://msdnshared.blob.core.windows.net/media/2016/05/0640_NinjaAwardTinyGold.pngaward March 2018

                 

Problem statement

When administering an SSAS instance or cube it's killing a particular connection, SPID or Session.

If you are an administrator, then you can issue the SSAS Cancel command on any level shown above by supplying the ID for that particular connection, session or SPID. In order to identify these IDs, you could look into the following SSAS Dynamic Management Views:

SELECT * FROM $SYSTEM.DISCOVER_COMMANDS

Solution:

The XMLA for killing a command looks like this:

<Cancel xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">

  <ConnectionID>[CID]</ConnectionID>

  <SessionID>[SID]</SessionID>

  <SPID>[SPID]</SPID>

  <CancelAssociated>[true/false]</CancelAssociated>

</Cancel>

Troubleshooting tips

SPID is not properly kept in syntax.

Tag missing in SPID. Refer to the following screenshot.

SPID is missing or after killing session. It is not found.

Reference: