Skip to content
Advertisement

Remote connection to MS SQL – Error using pyodbc vs success using SQL Server Management Studio

I have a MS SQL database in the same network but in other computer. Using the SQL Server Management Studio (SSMS) Express, I can find the database and connect without problems.

But when I use pyodbc to connect to the same server using:

I get following error:

OBS: I guess that the server string should be right, since if I change it I get always the following error:

Here the image showing success while using SQL Server Studio Express to connect remotely.

enter image description here

Advertisement

Answer

Try specifying the port:

If you’re still having issues, try using the IP or FQDN of the server.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement