Tuesday, January 26, 2010

Suppress Auto Update of MDX Parameter Datasets in Reporting Services 2008

With the MDX Query Designer in SSRS 2008 Report Designer and Report Builder 2.0, changing the main dataset overwrites the parameter datasets, which will kill any manual adjustments you’ve made. Bummer.
The hack to fix is to add a SuppressAutoUpdate =true to the parameter dataset. Right click the report and choose View Code. Find the dataset, and in the relevant node pertaining to your dataset, modify it. Then Save.

<Query>


<DataSourceName>DataSource1</DataSourceName>


<CommandText> …


<rd:SuppressAutoUpdate>true</rd:SuppressAutoUpdate>


<rd:Hidden>false</rd:Hidden>


</Query>




I found this solution here:
Suppress Auto Update of MDX Parameter Datasets in Reporting Services 2008

Thursday, January 21, 2010

Changing all-name in dimension

When working with cubes and dimensions and you have a dimension with time for example, you have the value "All" default added. "All"means that you select all occurrences in the time dimension, selecting the measures over all time.

When you create reports using cubes, this all-value is default added to the report as well. So when you create a parameter, "All" is included in the dropdownbox:






To support your users, "all" is not the best discription that can be added. A better option would be "all time", or "last 5 year" (depending on the horizon of your dimension).

To change this default behavour, go to your cubedesgin and go to the properties of your dimension. Then change the field AttributeAllMemberName to the disired name:






Leaving it blank will default add "all". Changing the property will add your given name as all-value.

Executing jobs with SQL

When you work with a scheduling tool outside MS SQL, it can be handy to execute jobs using this external tool. If its a trigger or a scheduled time, it's always important keeping your processes together in one place to maintain overview. So if you need to execute jobs you can use the following:

CREATE PROCEDURE refresh_cubes AS
EXEC msdb.dbo.sp_start_job @job_name = 'refresh_cubes'
GO

http://www.dbforums.com/microsoft-sql-server/927352-how-start-dts-job.html

Wednesday, January 20, 2010

How to automatic process SSAS Cubes

After building a cube in SSAS and its released for production, its time to automate the processing. Unless you like pushed the same button every monday ;)

To create an automatic scheduling, you have two options:
  • Using SSIS
  • Using XML script

SSIS
Using the integrated services methode, we first need to create an integrated services project. After that, we need to create a connection to our AS database.





















Then add an analysis services processing task. This a default task to process your cubes and dimensions.







Now pay attention: Process your dimensions first, else you could end up with key conflicts. The task doesn't process automaticly the dimensions first and then the cube. It does this in random order.

This means you have to add a second analysis services processing task. The first one only for the dimensions, and the secondone for the cube:











Now build the project and add it to your sql agent as a job.

XML scripts
The script method is pretty easy, but less flexible. Go to the database you want processed. Rightclick and select process. Then in the topleftcorner you see an option script to clipboard.















Then create a job in the agent and add a step SSAS command. Add your ssas servername and paste the xml script into the editbox.

Schedule and save the step and your done.