Search code examples
phpsql-serverlaravelssasoledb

Querying into a Cube from View SQL Server using Laravel 6


I'm trying to access data to an SSAS CUBE server using SQL Server and Laravel (v.6), the problem is, using SQL Server interface when I called the view table it's working and no message error appears, when I try to call the same view table, I get the following error :

SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Unable to initialize OLE DB provider data source object "MSOLAP" from the linked server "(null)"

The result in SQL Server shows no problem :

enter image description here

The Model from Laravel :

enter image description here

The controller call :

enter image description here

The error that I get from Laravel :

enter image description here

The View using OpenRawSet that contains the LinkedServer :

enter image description here

Thanks for your help.


Solution

  • it's worked after changing the connection from SQL Auth to Windows Authentification into Laravel, by removing the username and password from .env file.

    enter image description here

    Thanks David Browne for the light.