Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automatically refresh sql server olap cube

I have built a cube in visual studio and deployed to SSAS. How can I get the data refreshed using a nightly sql batch job or some other means? TIA

like image 451
Graeme Avatar asked Jan 25 '10 08:01

Graeme


People also ask

How do I refresh OLAP cube data?

Refresh using the Service Manager consoleIn the Service Manager console, click Data Warehouse, expand it, and then click Cubes. In the Cubes pane, select a cube name, and then under Tasks, click Process Cube. Click OK to close the Process Cube dialog box.

How do you automate a database refresh in SQL Server?

To refresh the SQL database on destination database server, we will generate a copy-only backup of the SQL database on source database server. I have created a network share directory. Both the source and destination server have the read-write permission on it. The backup file will be copied on a shared directory.

What is cube refresh?

Refreshes the Planning application cube. Typically, you refresh the cube after importing metadata into the application.


2 Answers

A few options:

  1. Put a Process Analysis Services task in an SSIS package, and schedule the package with SQL Agent (great if you already have an etl package).
  2. Using SSMS, go to the Process dialog box but hit "Script" at the start to get the XMLA command. Then put this in a SQL Agent job.
like image 121
Rob Farley Avatar answered Sep 29 '22 17:09

Rob Farley


<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
  <Parallel>
    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200">
      <Object>
        <DatabaseID>CUBEOLAP</DatabaseID>
      </Object>
      <Type>ProcessFull</Type>
      <WriteBackTableCreation>UseExisting</WriteBackTableCreation>
    </Process>
  </Parallel>
</Batch>
like image 42
brutus Avatar answered Sep 29 '22 17:09

brutus