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.
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.
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.
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.
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
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<
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With