Is it possible to use MS SQL 2008 as the Django database engine?

1,084 views
Skip to first unread message

Petr Přikryl

unread,
Dec 3, 2011, 9:10:39 AM12/3/11
to django-users

Hi,

Do you have any experience with using Microsort SQL Server 2008 as the Django database engine? I understand that it is not supported directly. However, is it possible to add some kind of module that implements the Django database interface for the MS SQL?

Thanks for your time and experience,
Petr

David Fischer

unread,
Dec 3, 2011, 4:23:15 PM12/3/11
to django...@googlegroups.com
It is possible. The two major projects that I know of are django-pyodbc which I have used quite a bit and django-mssql which I have not used. 

Django-mssql only works on Windows and I have no experience with it. As far as I know, it uses the Microsoft drivers underneath so it probably works fairly well.

Django-pyodbc works on Linux or Windows but if you were building for Windows, you would probably just use django-mssql. On Linux, you will need either unixODBC or iODBC as well as FreeTDS. On Ubuntu or CentOS, these are available from the package manager. Getting everything working is not entirely trivial due to different authentication schemes with SQL Server and some other intricacies. The code is not as seamless as the Django supported backends and deciding to use django-pyodbc will probably mean you'll have to learn the code line and submit a few patches. I use it primarily to connect to a read-only legacy database and for that purpose it works well. 

Petr Přikryl

unread,
Dec 8, 2011, 3:12:24 AM12/8/11
to django...@googlegroups.com

Thanks, David, for the information.
Have a good time,
Petr

______________________________________________________________
> Od: "David Fischer"
> Komu: <django...@googlegroups.com>
> Datum: 03.12.2011 22:23
> Předmět: Re: Is it possible to use MS SQL 2008 as the Django database engine?
>
>It is possible. The two major projects that I know of are django-pyodbc<http://code.google.com/p/django-pyodbc/>which I have used quite a bit and
>django-mssql <http://code.google.com/p/django-mssql/> which I have not

>used.
>
>Django-mssql only works on Windows and I have no experience with it. As far
>as I know, it uses the Microsoft drivers underneath so it probably works
>fairly well.
>
>Django-pyodbc works on Linux or Windows but if you were building for
>Windows, you would probably just use django-mssql. On Linux, you will need
>either unixODBC or iODBC as well as FreeTDS. On Ubuntu or CentOS, these are
>available from the package manager. Getting everything working is not
>entirely trivial due to different authentication schemes with SQL Server
>and some other intricacies. The code is not as seamless as the Django
>supported backends and deciding to use django-pyodbc will probably mean
>you'll have to learn the code line and submit a few patches. I use it
>primarily to connect to a read-only legacy database and for that purpose it
>works well.
>

>--
>You received this message because you are subscribed to the Google Groups "Django users" group.
>To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/p9T8-gkZp0kJ.
>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.
>
>

Reply all
Reply to author
Forward
0 new messages