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

Viewed 2302

I have installed MSSSQL on Centos 7. Installation is completed but when I am a connection to the SQL via sqlcmd It is giving the following error.

[root@S*03****k ~]# sqlcmd -S 127.0.0.1 -U sa -P H*****3
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..

root@S*****k ~]# netstat -ntpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      699/sshd            
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      793/master          
tcp6       0      0 :::80                   :::*                    LISTEN      704/httpd           
tcp6       0      0 :::22                   :::*                    LISTEN      699/sshd    

Can anyone help?

1 Answers

After wasting so many days i have come to know that this happens due to Stopped SQL Service. I have tried to start but some how this is not get up. Every time i checked the MSSQL service is failing i have over 5 GB memory on my virtual server.

r*****k:~# sudo systemctl status mssql-server

ā— mssql-server.service - Microsoft SQL Server Database Engine Loaded: loaded (/lib/systemd/system/mssql-server.service; enabled; vendor preset: enabled) Active: inactive (dead) (Result: exit-code) since Fri 2017-11-17 15:39:39 UTC; 1min 37s ago

Process: 4906 ExecStart=/opt/mssql/bin/sqlservr (code=exited, status=255)
Main PID: 4906 (code=exited, status=255)

Nov 17 15:39:39 SV0*****com systemd[1]: mssql-server.service: Unit entered failed state.

Nov 17 15:39:39 SV0*****com systemd[1]: mssql-server.service: Failed with result 'exit-code'.

Nov 17 15:39:39 SV0*****.com systemd[1]: mssql-server.service: Service hold-off time over, scheduling restart.

Nov 17 15:39:39 SV0*****.com systemd[1]: Stopped Microsoft SQL Server Database Engine.

Nov 17 15:39:39 SV0*****.com systemd[1]: mssql-server.service: Start request repeated too quickly.

Nov 17 15:39:39 SV0*****.com systemd[1]: Failed to start Microsoft SQL Server Database Engine.

Finally, i have created a new virtual machine and SQL Service is working fine. SQL Databases are working as expected.

Related