Forum Discussion
Query Microsoft Fabrics Warehouse using PHP / Doctrine DBAL
- 1 year ago
Hey again.
After several weeks of discussion with Microsoft, it appear that this is because Warehouse doesn't support Multiple Active Result Sets (MARS). Setting MultipleActiveResultSets=0 in option resolve the problem.
so, the final method for me was :
$connectionParams = ['dbname' => 'my_DBname','password' => 'mypassword','host' => 'xxxxxxxxxxxxxx.datawarehouse.fabric.microsoft.com','driver' => 'pdo_sqlsrv','port' => 1433,'driverOptions' => ['Authentication' => 'ActiveDirectoryPassword','MultipleActiveResultSets' => 0,'Encrypt' => 1,'TrustServerCertificate' => true]];$this->conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams);
Hi yulione can you please consult these 2 MS docs pages and see if the PHP / Doctrine DBAL process supports the currenyl methods for connecting to Fabric Warehouse:
Connectivity to data warehousing - Microsoft Fabric | Microsoft Learn
Microsoft Entra Authentication in Fabric Data Warehouse - Microsoft Fabric | Microsoft Learn
- yulione1 year agoFrequent Visitor
HI AndyDDC
Thank you for your help ^^
There is nothing specifically written in Doctrine documentation about support of MFA method. However, doctrine supports ODBC connexion through 2 PHP drivers : sqlsrv and pdo_sqlsrv (doc here) and we are using them for a while now. As ODBC connexion is supported by fabrics, I assumed (maybe I'm wrong) that it should work too.
Microsoft doc says that we should use ODBC 18 or greater and sqlsrv and pdo_sqlsrv 5.11 or greater, which I have. (PHP is 8.3 and i'm using 64-bit php_sqlsrv_83_ts.dll and 64-bit php_pdo_sqlsrv_83_ts.dll found from Microsoft dedicated page)
With this in mind, a classic PDO connexion (not using doctrine) gives the same results and same issue.
As for SSMS, maybe there is some instruction to give to the driver to says this is a entra MFA connexion ? I haven't seen anything related to that in driver doc.
I've spent the last 2-3 month to try to figure it out... What I don't understant though is there is absolutly no error anywhere, even in system logs or anywhere else...
- lbendlin1 year ago
Super User
If you have a Pro license you can open a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi
Otherwise you can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues . - v-saisrao-msft1 year ago
Community Support
Hi yulione,
Thank you for reaching out to the Microsoft Forum Community.Sorry for the inconvenience caused. As suggested by lbendlin, please raise a support ticket. To create a support ticket for Fabric and Power BI, refer to the steps outlined in the following guide:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
Thank you.
- yulione1 year agoFrequent Visitor
Thank you all for your time and support.
As suggested I will open a ticket.
If possible I will try to post solution in this topic.