Wednesday, June 12, 2013

How to Kill Hung SSAS Queries

Sometime in your SSAS career you will hit a bad query that will proc your SSAS server. Restarting the service will resolve the issue temporarily but depending on how often that query hits the server, you might not have enough time to run a trace or diagnose the issue. So to keep the process down, you can run the following commands to find the bad query and kill it so you have more time to fix the actual problem.
  1. In the cube that you're experience issues with, open up a MDX session and run the following query:
    select * from $system.discover_sessions
    where session_status = 1
  2. That will give you a list of the sessions that are currently running active queries.
  3. Open up a XMLA session in the cube you are working on and run the following command:
    <Cancel xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
    <SPID>insert the SPID from step 1 here</SPID>
    </Cancel>
  4. Monitor the CPU drop in your SSAS box and enjoy!

Thursday, February 28, 2013

SSIS Catalog Validation Anonymous Logon Bug

For some reason when I changed the connection string parameters on my SSIS Catalog project I started getting a weird bug where the project fails connecting to the SAME server via a different with login failed error code. After some digging it looks like the project is trying to connect to the new IP via 'NT Authority\ANONYMOUS LOGIN' credentials instead of using the SQL Agent credential in the agent job. If I revert the connection string parameter back to the original IP (same server) there is no issues.

Well apparently this is a known bug:
https://connect.microsoft.com/SQLServer/feedback/details/727219/login-failure-message-during-ssis-2012-package-validation

And sadly it has not been fixed even with SQL 2012 SP1. Currently the easiest work around is scripting out the SSIS catalog job call and have EXECUTE AS LOGIN = 'domain\db service account' execute prior to the rest of the script.

Stupid issue but at least there is a work around. Hope this information can help someone else who is experiencing the same issues.