I'am trying to combine SQL and MDX data on SQL Server Reporting Services.
I found a solution about the sp_addlinkedserver
.
Exec sp_addlinkserver
@server = 'localhost'
@srvproduct = ''
@provider = 'MSOLAP'
@datasrc = 'localhost\instancename'
@catalog = 'Databasename'
My problem in the above code was that the value of @server, @datasrc
and @catalog
is dynamic. Sometimes, SQL Server database and Olap cube are on a different machines and different instance names based on the choice of a customer how it will be deployed.
I want to create an SSRS report where it can pass the parameter for the @server, @datasrc
and @catalog
based on the "SSRS datasource" it is using. This parameters will be forwarded on the SQL Server stored procedure which will somewhat look like the code below
Exec sp_addlinkserver
@server = @servername_of_the_olap_database
@srvproduct = ''
@provider = 'MSOLAP'
@datasrc = @datasource_of_the_olap_database
@catalog = @olap_database
Thanks in advance.
` tags, either! – marc_s Oct 12 '12 at 12:22