You are working on a BI project that involves SSAS Tabular model. As you cannot process the model manually you need to develop a solution to process the model automatically. There are two scenarios here:
- You have an up and running SQL Server Integration Services (SSIS) instance: In this case you can build a SSIS package to process the Tabular Model.
- You do not have an SSIS instance ready on the server: So you need to create a SQL Server Agent Job.
In this post I’m expressing easy ways to solve the problem based on the above scenarios.
Using SQL Server Integration Services to Process SSAS Tabular Model
Follow the steps below:
- Create a new SSIS project using (SQL Server Data Tools) SSDT
- Right click on the “Connection Managers” area and select “New Analysis Services Connection”
- Click “Edit”
- Enter the SSAS Tabular server
- Leave “Location ” BLANK! You might face the following error: “A connection cannot be made. Ensure that the server is running.”
- Click “Use Windows NT Integrated Security”
- Select your SSAS Tabular catalog from the list. In my case it is Adventure Works
- Click OK
- Put a “Analysis Services Processing Task” on Control Flow and double click on the task
- Go to Processing Settings
- Select the Analysis Services Connection
- Click “Add”
- Tick the database and click OK
- You should see something like the image below in the “Analysis Services Processing Task Editor” window. Note that the object type is “Database”.
- Click OK
Now you can run the package by pressing F5 and your SSAS Tabular model will be processed.
Now you need to deploy the SSIS project to SSIS Catalog and then create a SQL Server Agent Job to run the SSIS package overnight.
Setup a SQL Server job agent to process the Tabular Model
In this case you need to use SSMS to generate the XMLA scripts for processing the Tabular model. To do so follow the below instructions:
- Open SSMS and connect to a Tabular Analysis Services server and expand “Databases”
- Right click on a desired database and select “Process Database”
- In “Process Database” window select the processing mode from the dropdown list
- Click on the small rectangle of the “Script” button and select “Script Action to New Query Window”
- If you do NOT need to process the database now click on “Cancel” button
- The needed XMLA scripts is generated in SSMS
- Copy the generated XMLA code
- In SSMS connect to the SQL Server instance that you want to define a new SQL Server Agent job for processing the Tabular database
- Create a new job by right clicking on “SQL Server Agent” and selecting “New” and then “Job”
- Type a descriptive name for the new job and go to steps and click New to create a new step
- Type a name for the step
- In Type section select “SQL Server Analysis Services Command” from the dropdown list
- Type in the Tabular model server address in the “Server” section
- Now paste the XMLA script that you’ve copied before and then OK
All done!
Now you can run the job and your Tabular model will be processed.
NOTE: Do not forget to define a schedule for running the job frequently. As defining a new job is out of scope I didn’t explain it in detail.
Discover more from BI Insight
Subscribe to get the latest posts sent to your email.
does only work when you run SSAS en SQLSERVER on the same machine.
Hi Michel,
Welcome to BIInsight.com.
This method is well-known and widely used to process SSAS Tabular Models.
It works perfectly regardless of the location of SSAS Tabular instance.
There are many things, however, that you can check to ensure everything is sorted.
I would ensure the SSAS instance is accessible and there is no local or corporate firewall blocking the connection.
You may also want to look at Proxy servers and Kerberos (if any).
You also want to ensure that the user that runs the packages after they are deployed has sufficient rights on SSAS.
Hopefully that helps.
Good luck!