We use the following SSAS architecture:
http://msdn.microsoft.com/en-us/library/cc966449.aspx
In short, 1 processing instance and 2 readonly query instances. The 2 query instances contain identical OLAP databases originating from the processing instance. Only 1 query instance is used at one time for executing queries. Each query instance has an MSMDPUMP IIS directory. When one of the query instances is being updated with the latest copy, we need to switch the users onto the other query instance without them knowing.
So, is there a way to silently change the serverUrl that the PivotGrid control is using? I've tried using $("#pivotGrid").igPivotGrid("option", "dataSource", newDataSource); but it causes a visible refresh and looses the current selections. Ideally we'd be able to specify a function for the serverUrl property of the datasource.
I've also tried changing the url that the msmdpump.dll is configured to use, but that requires an app pool restart.
Any other suggestions are welcome.
Thanks,
Paul
Hello Paul Clark!
You could use the beforeSend callback of the requestOptions object that is passed when initializing the igOlapXmlaDataSource:
var dataSource = new $.ig.OlapXmlaDataSource({ serverUrl: 'url', requestOptions: { beforeSend: function(jqXHR, settings) { $("#pivotgrid").igPivotGrid("option", "dataSource")._dataSource._sourceOptions._serverUrl = "[Your new server url]"; } } });
Hope this helps,
Philip
That looks great, thanks.
Is there an event i can hook into which would allow me to modify the _serverUrl "each time the data source prepares its request to the server"?
Hello Paul,
It's possible to achieve the behavior you want but I can say it's not much legal since you're going to modify some private fields but even that it should work. You can modify the value of _serverUrl used each time the data source prepares its request to the server:
$("#pivotgrid").igPivotGrid("option", "dataSource")._dataSource._sourceOptions._serverUrl = "[Your new server url]"
Keep in mind that the new server instance should expose the same metadata as the old one (dimensions, hierarchies, measures, etc.), otherwise the internal state of data source object won't be consistent to new server instance.
Best regards,Plamen