Unable to migrate django database using django-mssql

985 views Asked by At

I am trying to migrate my django database to MS SQL Server 10.50.2500 using django-mssql. When I try to run python manage.py migrate I get this error:

django.db.utils.OperationalError: (com_error(-2147352567, 'Exception occurred.', (0, 'ADODB.Connection', 'Provider canno
t be found. It may not be properly installed.', 'C:\\Windows\\HELP\\ADO270.CHM', 1240655, -2146824582), None), 'Error op
ening connection: DATA SOURCE=10.1.4.100;Initial Catalog=(REMOVED);UID=(REMOVED);PWD=******;PROVIDER=sqlncli10;DataT
ypeCompatibility=80;MARS Connection=True')

The documentation for django-mssql says to install SQL Server Management Studio first, which I have done (version 2012). What am I missing? Should I be using SSMS version 2008, given that's the version of the server? Do I need to separately install sqlncli10?

In settings.py, I have also tried entering the alphanumeric server name, the IP address alone, and the IP address and the port, all to no avail.

Thanks for the help

1

There are 1 answers

2
jayadeepk On

Your error log shows there is an error connecting to 10.1.4.100. It can mean that your mssql server isn't running or you do not have access to it.

You have mentioned that you have installed SQL Server management studio but haven't mentioned whether you have started an instance of SQL server. If you haven't yet, you can do that using SQL server configuration manager for Windows. This topic from Microsoft Technet will guide you through starting an instance.

To start the default instance of SQL Server

  1. On the Start menu, point to All Programs, point to Microsoft SQL Server 2008 R2, point to Configuration Tools, and then click SQL Server Configuration Manager.
  2. In SQL Server Configuration Manager, in the left pane, click SQL Server Services.
  3. In the details pane, right-click SQL Server (MSSQLServer), and then click Start. A green arrow on the icon next to the server name and on the toolbar indicates that the server started successfully.
  4. Click OK to close SQL Server Configuration Manager.