Unable to connect Linux SQL Server 2019

Thirunavukkarasu RM

After successful installation of SQL server 2019 on linux you may experience below error message while accessing SQL Server through SQLCMD

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2749

Workaround:

First you have to stop the SQL server using below command

sudo systemctl stop mssql-server 

Then use below command to edit the mssql service config to add the below parameters

Now add below lines and save the config on editor

[Service]
Environment=”LD_LIBRARY_PATH=/opt/mssql/lib”

Press ctrl + X to save the config.

Now start the SQL service using below command

sudo systemctl start mssql-server

Now validate the SQL connection, it may work fine

 

 

We run all kinds of database services that vow your success!!