Can adomd .net core connect to an SSAS endpoint from Linux?

Richard Oakham 6 Reputation points
2021-01-17T23:46:51.343+00:00

Hi, I've a C# .Net Core 3.1 application, using the latest adomd .net core client, that successfully connects to an SSAS server and retrieves data when run on a Windows (Win10) platform. I've compiled it as portable, specific with libraries, and specific single file, and no option is able to connect from Linux, indicating in an error message that the connection is only available from Windows. The Linux box has the 3.1 and 5.0 asp.net runtimes, and the .net core runtimes the same. I've looked for documentation on this, no luck so far, to see if it is possible or not. The connection string is providing a username and password, as this will generally not be the user that the machine is running as. Does anyone have a definitive answer as to if we can connect to SSAS and run MDX queries from a Linux machine currently? Many thanks Richard

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,344 questions
0 comments No comments
{count} vote

11 answers

Sort by: Most helpful
  1. Lukas Yu -MSFT 5,826 Reputation points
    2021-01-18T07:48:29.913+00:00

    Hi,
    Could you share the error screenshot ? What is your authentication method in this connection ?
    There is some article about connecting to SSAS using Python in Linux in this.


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    What can I do if my transaction log is full?--- Hot issues November
    How to convert Profiler trace into a SQL Server table -- Hot issues November

    0 comments No comments

  2. Richard Oakham 6 Reputation points
    2021-01-19T21:38:26.27+00:00

    Hi

    Thanks for the response.

    I'd actually trialled the cdata connector method, but wasn't able to get it to connect, I'm uncertain as to if the SQL datasource permits the connect method they were trying. Even ODBC from Windows didn't want to connect, so there is a good chance I'd missed something I guess.

    That said, the error I get when trying to connect from Linux is:

    Building connection to SSAS server ...

    Trying {correct server name}\DSS_PRD

    Unhandled exception. System.NotSupportedException: This feature is supported for a .NET Core client only on Windows systems.

    at Microsoft.AnalysisServices.AdomdClient.XmlaClient.OpenConnectionAndCheckIfSessionTokenNeeded(ConnectionInfo connectionInfo)

    at Microsoft.AnalysisServices.AdomdClient.XmlaClient.<>c__DisplayClass92_0.<OpenConnection>b__0()

    at Microsoft.AnalysisServices.Platform.Security.TransparentUserContext.ExecuteInUserContextImplTResult

    at Microsoft.AnalysisServices.Platform.Security.UserContext.ExecuteInUserContextTResult

    at Microsoft.AnalysisServices.AdomdClient.XmlaClient.OpenConnection(ConnectionInfo connectionInfo, Boolean& isSessionTokenNeeded)

    at Microsoft.AnalysisServices.AdomdClient.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)

    at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Connect()

    at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.AdomdConnection.IXmlaClientProviderEx.ConnectXmla()

    at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.ConnectToXMLA(Boolean createSession, Boolean isHTTP)

    at Microsoft.AnalysisServices.AdomdClient.AdomdConnection.Open()

    at ssaslink.Program.DoPeriod(String period) in C:\Users\oakhamr\source\ssaslink\ssaslink\Program.cs:line 47

    at ssaslink.Program.Main(String[] args) in C:\Users\oakhamr\source\ssaslink\ssaslink\Program.cs:line 14

    Aborted

    I understand the error message says that the method I'm trying is only on Windows (although couldn't find what specifically is not available in Linux to connect), but some online links appear to have Linux connecting and I don't see how.

    The connection string (working from Win10) is
    $"Data Sources={server};Initial Catalog={catalog};UID={Username};PWD={password}"

    I have a feeling this just isn't possible yet :( or I'm missing something obvious!

    Many thanks

    Richard

    0 comments No comments

  3. Darren Gosbell 2,376 Reputation points
    2021-01-20T23:43:44.947+00:00

    although couldn't find what specifically is not available in Linux to connect

    So when you are connecting to an on-prem SSAS server using <servername>\<instancename> it requires Windows authentication - which is not available on Linux. If you are connecting to Azure AS or Power BI Premium XMLA endpoints it uses OAuth2 which is supported on linux.

    You could maybe try configuring HTTP Access on your server and connecting via that. I have not tried this via linux but it may work.


  4. Lukas Yu -MSFT 5,826 Reputation points
    2021-01-25T03:38:12.133+00:00

    Have you made any progress with HTTP access ? Any updates on this ?

    0 comments No comments

  5. Sibi Narayanaswamy 41 Reputation points
    2021-02-22T03:54:18.763+00:00

    Hi,

    Is it resolved? Curious to know if there is a solution available for this...

    I am also trying a similar scenario but not successful in getting this (adomd .net core connect to an SSAS endpoint from Linux) to work.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.