I have some C# code using the undocumented Microsoft.AnalysisServices.Xmla.dll
library which has been working fine for SQL 2016 SSAS. I generate the XMLA script, and then do:
XmlaClient clnt = new XmlaClient();
clnt.Connect(@"server\instance");
string out = clnt.Send(syncxml, null);
clnt.Disconnect();
where syncxml
is the XMLA script. This has been working fine for a long time. Now, with SQL 2017 SSAS instances, it throws an error "This database contains features that are not supported by the current edition of the server or the compatibility level of the database".
I upgraded the .dll to the latest version I could find (16.1.3.0) which certainly came out after SQL 2017.
I can sync the models without problem with SSMS 2017 and the script that the syncronise function in SSMS generates is identical to the syncxml
in the code which gives the error above.
I assume it must be to do with the .dll version but I can't make this work with these 2017 instances. Both are version 14.0.249.2, compat level 1200.
Update: it works if I run the same code from a simple console app, it has stopped working in the ASP.NET Core app. Mysterious.