How to determine which SSAS Cube is processing now?

前端 未结 4 2229
长情又很酷
长情又很酷 2021-02-15 03:56

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 curr

相关标签:
4条回答
  • 2021-02-15 04:27

    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
    
    0 讨论(0)
  • 2021-02-15 04:35

    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<
    
    0 讨论(0)
  • 2021-02-15 04:46

    Probably a better approach to the ones already listed would be to use SQL Server Profiler to watch activity on the Analysis Server. As stated already, the current popular answer has two flaws, the first option only shows the LAST time the cube had been processed. And the second option only shows if something is running. But it doesn't tell you what is running and what if your cube was not processing from a SQL server but a different data source?

    Utilizing SQL Server Profiler will tell you not only if something is processing but also details of what is processing. Most of the Events you can filter out. Watch Progress Report Current events if you want real time information... It's usually too much of a fire-hose of data to get real info out of it, but you'll know well that at least a process is going on. Watch Progress Report Begin and End events only to get better information like what is currently being processed, even down to the partition levels. Other events with good information include Command Begin/End and Query Begin/End.

    0 讨论(0)
  • 2021-02-15 04:48

    You will see a job running in Task Manager called "MSDARCH" if a cube is processing. Not sure how you can tell which one though.

    0 讨论(0)
提交回复
热议问题