Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine which SSAS Cube is processing now?

There is a problem when several users can process the same cube simultaniously and as a result processing of cube fails. So I need to check if certain cube is processing at current moment.

like image 246
Alekzander Avatar asked Aug 10 '12 09:08

Alekzander


People also ask

How can I check my SSAS cube processing status?

You can use one of two query methods to obtain the needed information for our cube status report. One method is to use the SSAS DMVs. Alternatively you can use the Analysis Services Stored Procedure Project, which has a dll that must be separately installed.

How do I know if Analysis Services are running?

When you're in SQL Server Management Studio, click on the Connect button in the Object Explorer. If you see "Analysis Services..." in the list, then you have Analysis Services. Also, when you launch Management Studio and get the Connect to Server dialog, look in the "Server type" dropdown list.

How do you check data cube?

After you deploy a cube, the cube data is viewable on the Browser tab in Cube Designer, and the dimension data is viewable on the Browser tab in Dimension Designer. Browsing cube and dimension data is way to check your work incrementally.


2 Answers

I dont think you can prevent a cube from being processed if someone else is already processing it. What you can do to "help" is run a MDX query to check the last time the cube was processed:

SELECT CUBE_NAME, LAST_DATA_UPDATE FROM $System.MDSCHEMA_CUBES

or check the sys.process table on the realted sql server instance to see if it is running:

select spid, ecid, blocked, cmd, loginame, db_name(dbid) Db, nt_username, net_library, hostname, physical_io, 
       login_time, last_batch, cpu, status, open_tran, program_name
from master.dbo.sysprocesses
where spid > 50
  and loginame <> 'sa'
  and program_name like '%Analysis%'
order by physical_io desc
go
like image 125
Diego Avatar answered Sep 28 '22 00:09

Diego


use this code to select running processes: (execute this in OLAP)

    select *

from $system.discover_Sessions

where session_Status = 1

And this code to cancel running prossesess ! Please change PID to running SESSISONS_SPID like in example:

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

  <SPID>92436</SPID>

  <CancelAssociated>1</CancelAssociated>

</Cancel<
like image 26
Evgeny Budnik Avatar answered Sep 28 '22 01:09

Evgeny Budnik