Se usi OpenRowset
invece di OpenQuery
, puoi specificare i parametri di connessione in modo dinamico come una stringa:
select *
from OpenRowset('MSOLAP',
'Data Source=localhost;Initial Catalog=xxxx;Provider=MSOLAP.4;Integrated Security=SSPI;Format=Tabular;',
'WITH MEMBER measures.X AS dimensions.count
SELECT Measures.X ON 0 FROM MyCube')