I am not able to connect with MS SQL server 2008 R2 by using pyodbc from anaconda environment. Here is the code which I am executing :
import pyodbc
conn=pyodbc.connect("Driver={SQL Server Native Client 11.0};"
"Server=server_name;"
"Database=db_name;"
"Trusted_Connection=yes;")
It gives me following error:
OperationalError: ('08001', '[08001] [Microsoft][SQL Server Native Client 11.0]Named Pipes Provider: Could not open a connection to SQL Server [53].
I tried Driver={SQL Server}, and getting the following error:
OperationalError: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17)
I can connect to the server and db manually. I have referred Unable to connect pyODBC with SQL Server 2008 Express R2