Skip to content

Magento 2 connection with SQL server

I’m using the ODBC driver, which is connected to MS SQL Server. But when I’m passing this information in the Magento 2 env.php file,. I’m getting this:

SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for ODBC_Data_Source failed: Name or service not known

ODBC_Data_Source is my DSN name, which I’m using for host.