Change sqlite database to sql server

418 views
Skip to first unread message

Rakhee Menon

unread,
Oct 7, 2018, 3:46:48 AM10/7/18
to Django users
Hi everyone,
I have a developed project in which I am trying to use sqlserver instead of the default sqlite database.
While I do the changes I get the following error

django.db.utils.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')

Please help if anyone knows how to solve this issue or change default database to sqlserver

Thanks in Advance

Jason

unread,
Oct 7, 2018, 8:10:35 AM10/7/18
to Django users
You might have some trouble with SQL Server


but sounds to me you haven't installed the driver or anything else for django to talk to SQL server.  have you insalled https://bitbucket.org/Manfre/django-mssql or any of the equivalents?

Vishvajit Pathak

unread,
Oct 7, 2018, 2:16:54 PM10/7/18
to Django users
Hi Rakhee,

Two possible reasons for this error : 
      A) ODBC driver is not installed 
      B) The driver requires a Data Source Name to be configured

You can refer these links for more explanation : 

Rakhee Menon

unread,
Oct 9, 2018, 6:46:46 AM10/9/18
to Django users

Hey Thanks!!! but now I get this error ,
Actually I am trying it on my localhost machine not able to figure out what exactly is the issue.

TCP Provider: No connection could be made because the target machine actively refused it.\r\n (10061) (SQLDriverConnect); [08001] [Microsoft][ODBC Driver 11 for SQL Server]Login timeout expired (0); [08001] [Microsoft][ODBC Driver 11 for SQL Server]Invalid connection string attribute (0); [08001] [Microsoft][ODBC Driver 11 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

Jason

unread,
Oct 9, 2018, 10:14:35 AM10/9/18
to Django users
the error is saying your remote server doesn't allow external connections, so look at the docs for how to enable that
Reply all
Reply to author
Forward
0 new messages