How to connect to remote Microsoft SQL DB with Windows Authentication using Doctrine DBAL


I’m using on Pimcore 5.7.3 version, and need to develop a connection to remote DB, MSSQL server, with Windows auth.

I’ve already installed pdo_sqlsrv and pdo_odbc drivers.

Point is that I need to use different config.yml files, for different environments to provide DB params and credentials for each env, necessary for connection.

I’m aware that there is a way to set up Pimcore env, which I found within the Pimcore documentation and I already set up that.

Is there a way to connect to MSSQL server with Windows auth, using the Doctrine DBAL PDO connection?

Any documentation or guide related to this or some other approach will be helpful.


Hi @nikolakoti
Maybe this post will help you:

Or this:

Hope that helps,