I started to evaluate the use of linked dimension across different database on the same server.
I encountered the first issue after a few minutes: when you link a dimension, VS editor create a dimension file that copies the structure of the dimension, without details on binding to data source (which are useless in this case). If I add an attribute to the original dimension, I am unable to use the linked dimension: the worst part is that I need to remove and to recreate the linked dimension on the project, losing all references to the dimension in all measure groups. At this point I need to recreate dimensions in cubes and dimension relationships for all measure groups.
It would really useful a “refresh” function that do automatically what I do to workaround the problem (I use the Customer dimension as an example):
- Preparation. Create the dimension Customer on database A (solution A)
- Deploy and process database A
- Create the linked dimension Customer on database B (that points to A.Customer) (solution B)
- Create a cube on B that use Customer
- Deploy and process database B
- Create a copy of solution B and name it database C (and solution C) – we will use it as a tool without deploying it to SSAS
- Change the original dimension. Add an attribute (for example Country) to the dimension Customer on database A (solution A)
- Deploy and process database A
- Make the change on linked dimension. Delete dimension Customer from database C
- Recreate linked dimension Customer on solution C that points to database A
- Open Customer.dim on solution C with the View Code function, Select All and Copy to Clipboard
- Open Customer.dim on solution B with the View Code function, Select All and Paste from Clipboard
- (as an alternative to 11 and 12, you can copy the Customer.dim file from solution C to solution B)
- Deploy and process database B
This workaround works if you only changed attributes that are not directly referred in the cube file: it happens when you use an attribute as a reference to another dimension or to a measure group. Most of the time dimension modifications does not touch those attributes and this workaround allows you to avoid the tedious and error-prone work of recreating dimension references to measure groups in the cube.
I would like to get feedback from people that already user linked dimension in a working (and changing!) environment.