SQL Server Support - Does it Exist

1,952 views
Skip to first unread message

Python_Junkie

unread,
Jul 14, 2011, 5:15:32 PM7/14/11
to Django users
I have searched for the drivers to use the syncdb utility with MS SQL
Server but have been unsuccessful.

Has anyone implemented SQL server.

If you have could you point me to the links for driver downloads and
the settings.py parameters.

Thanks

bruno desthuilliers

unread,
Jul 14, 2011, 6:03:42 PM7/14/11
to Django users


On 14 juil, 23:15, Python_Junkie <software.buy.des...@gmail.com>
wrote:
> I have searched for the drivers to use the syncdb utility with MS SQL
> Server but have been unsuccessful.

https://docs.djangoproject.com/en/1.3/ref/databases/

Django doesn't support MS SQL.

David Graves

unread,
Jul 14, 2011, 8:42:52 PM7/14/11
to django...@googlegroups.com
https://docs.djangoproject.com/en/1.3/ref/databases/#using-a-3rd-party-database-backend mentions django-mssql

http://stackoverflow.com/questions/842831/using-sql-server-with-django-in-production

I personally have used django-pyodbc in conjunction with pyodbc.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.


Russell Keith-Magee

unread,
Jul 14, 2011, 9:07:23 PM7/14/11
to django...@googlegroups.com

Django doesn't provide *official* support MSSQL. However, we do have a
supported backend API, and there are several third-party projects that
implement MS SQL support [1]. I can't comment on their completeness or
stability, but the projects exist.

[1] https://docs.djangoproject.com/en/1.3/ref/databases/#using-a-3rd-party-database-backend

Yours,
Russ Magee %-)

Python_Junkie

unread,
Jul 14, 2011, 10:21:38 PM7/14/11
to Django users
I have installed django-mssql and still seem to be stuck.

What are the correct attributes that need to be set in the settings.py
file?

I am getting an error

This is how I have configured my settings.py file
********************
DATABASE

S = {
'default': {
'NAME': 'notes',
'ENGINE': 'django.db.backends.sqlserver_ado',
'HOST': ' ', #blank for local host
'USER': '', #blank for active directory authentication
'PASSWORD': '',
'OPTIONS' : {
'provider': 'SQLOLEDB',
'use_mars': True,
},
}
}



I am getting the following error when I attempt to syncdb

*****************************
django.core.exceptions.ImproperlyConfigured: 'sqlserver_ado' isn't an
available
database backend.
Try using django.db.backends.XXX, where XXX is one of:
'dummy', 'mysql', 'oracle', 'postgresql', 'postgresql_psycopg2',
'sqlite3'
Error was: No module named sqlserver_ado.base
***********************************
I have MYSQL up and running, just trying to use a different database


Thanks for any assistance that you can provide


On Jul 14, 9:07 pm, Russell Keith-Magee <russ...@keith-magee.com>
wrote:
> On Fri, Jul 15, 2011 at 6:03 AM, bruno desthuilliers
>
> <bruno.desthuilli...@gmail.com> wrote:
>
> > On 14 juil, 23:15, Python_Junkie <software.buy.des...@gmail.com>
> > wrote:
> >> I have searched for the drivers to use the syncdb utility with MS SQL
> >> Server but have been unsuccessful.
>
> >https://docs.djangoproject.com/en/1.3/ref/databases/
>
> > Django doesn't support MS SQL.
>
> Django doesn't provide *official* support MSSQL. However, we do have a
> supported backend API, and there are several third-party projects that
> implement MS SQL support [1]. I can't comment on their completeness or
> stability, but the projects exist.
>
> [1]https://docs.djangoproject.com/en/1.3/ref/databases/#using-a-3rd-part...
>
> Yours,
> Russ Magee %-)

Python_Junkie

unread,
Jul 14, 2011, 10:28:25 PM7/14/11
to Django users
I have tried django-mssql without any luck.

Could you send me the link for django-pyodbc.

I was only able to find 2 downloads that say they have been
deprecated.

By the way I have been using the (sql) pyodbc for my native (MySQL)
sql connections to retrieve data. I would rather use sql rather than
the ORM.

So, presently the syncdb is a nice to have which allows me to utilize
the admin functionality as well as the built in Forms.py
functionality. Otherwise I could use sql server to make my calls to
the database to populate web pages and or insert or update.

Any other calls to the database I can accomplish to sql server through
pyodbc and sql.



On Jul 14, 8:42 pm, David Graves <johosaph...@gmail.com> wrote:
> https://docs.djangoproject.com/en/1.3/ref/databases/#using-a-3rd-part...
> django-mssql
>
> http://stackoverflow.com/questions/842831/using-sql-server-with-djang...

Wei guangjing

unread,
Jul 14, 2011, 11:02:30 PM7/14/11
to django...@googlegroups.com
2011/7/15 Python_Junkie <software....@gmail.com>:

> I have tried django-mssql without any luck.
>
> Could you send me the link for django-pyodbc.

Please use svn checkout the source code, and do setup.py install.

svn checkout http://django-pyodbc.googlecode.com/svn/trunk/ django-pyodbc

--
Wei guangjing

Tom Evans

unread,
Jul 18, 2011, 6:45:05 AM7/18/11
to django...@googlegroups.com
On Fri, Jul 15, 2011 at 3:21 AM, Python_Junkie
<software....@gmail.com> wrote:
> I have installed django-mssql and still seem to be stuck.
>
> What are the correct attributes that need to be set in the settings.py
> file?
>
> I am getting an error
>
> This is how I have configured my settings.py file
> ********************
> DATABASE
>
> S = {
>    'default': {
>        'NAME': 'notes',
>        'ENGINE': 'django.db.backends.sqlserver_ado',


Compare and contrast what you have for ENGINE, and what the example
docs for django-mssql say.

http://code.google.com/p/django-mssql/wiki/Settings

Hint: 3rd party dB backends don't live in django.db.backends.

Cheers

Tom

Michael Manfre

unread,
Mar 24, 2013, 10:14:55 AM3/24/13
to django...@googlegroups.com
Although there is no official support for SQL Server, there are two available backends to choose from; django-mssql and django-pyodbc. There has also been some recent discussion on the django-developers mailing list about SQL Server's support and the idea of having officially recognized extensions (see [1]).


I'm the maintainer of django-mssql and have been using it on http://www.src.org since Django 1.1 and has upgrade to the Django stable version shortly after each release. We're currently on Django 1.4.x and plan on upgrading to Django 1.5 in the next few months. Django-mssql requires pywin32 and must be run on a Windows server. During the ~1.5 years between your post and the previous one in this topic, the django-mssql project has made a lot of improvements, including better documentation [2].

[2] http://django-mssql.readthedocs.org/en/latest/

If your web servers are non-windows, then you can use django-pyodbc. The google code hosted project [3] is a bit out of date, but there is a slightly newer fork available on GitHub [4].

Michael Manfre

On Saturday, March 23, 2013 12:35:08 AM UTC-4, Liang wrote:
Sadly, django doesn't support sql server officially is the only stopper for me to adopt django. 

Alex-droid AD

unread,
Apr 29, 2015, 6:11:51 AM4/29/15
to django...@googlegroups.com
We try to use django-pyodbc on CentOS (python 2.7 + Django 1.8, connection to MS SQL Server 2012)
While running 'migrare' I get the same error as mentioned above:
'django_pyodbc' isn't an available database backend

Can't understand what has been done wrong...
Reply all
Reply to author
Forward
0 new messages