Unable to stop a job running "sql server analysis services command"

  • Hello,

    From time to time, a SQL Server job with a step type "sql server analysis services command" is running for ever.

    If I try to stop it, SQL Server returns "job stopped successfully" but the job is still shown as running and cannot be restarted (job already running). The only way to really stop it is to restart the SQL Server agent. Is there a way to really stop this Sql server analysis command ?

  • The solution is here : http://sqlmag.com/reporting/managing-analysis-services-activity-14-feb-2010

    To show running queries, execute this MDX query :

    SELECT * FROM $SYSTEM.DISCOVER_COMMANDS

    order by command_start_time

    GO

    SELECT * FROM $SYSTEM.DISCOVER_SESSIONS

    GO

    SELECT * FROM $SYSTEM.DISCOVER_CONNECTIONS

    GO

    Find the forever running query using command_start_time and COMMAND_TEXT.

    And then kill the query started by the SQL job using this XMLA query :

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

    <ConnectionID>xxxx</ConnectionID>

    </Cancel>

    Thanks a lot Derek !

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply