{"id":44755,"library":"django-mssql-backend","title":"django-mssql-backend","description":"A Django database backend for Microsoft SQL Server. Version 2.8.1 is the latest stable release. Provides support for SQL Server connections using pyodbc. Maintenance mode but still actively used.","status":"active","version":"2.8.1","language":"python","source_language":"en","source_url":"https://github.com/ESSolutions/django-mssql-backend","tags":["django","mssql","sql-server","pyodbc"],"install":[{"cmd":"pip install django-mssql-backend","lang":"bash","label":"Standard install"}],"dependencies":[{"reason":"Required; check compatibility with Django version.","package":"django","optional":false},{"reason":"Required for connecting to SQL Server.","package":"pyodbc","optional":false},{"reason":"Alternative backend; may conflict if both installed.","package":"mssql-django","optional":true}],"imports":[{"wrong":"from django.db.backends import BaseDatabaseWrapper","symbol":"DatabaseWrapper","correct":"from sql_server.pyodbc.base import DatabaseWrapper"}],"quickstart":{"code":"# settings.py\nDATABASES = {\n    'default': {\n        'ENGINE': 'mssql',\n        'NAME': os.environ.get('DB_NAME', ''),\n        'USER': os.environ.get('DB_USER', ''),\n        'PASSWORD': os.environ.get('DB_PASS', ''),\n        'HOST': os.environ.get('DB_HOST', ''),\n        'PORT': os.environ.get('DB_PORT', '1433'),\n        'OPTIONS': {\n            'driver': 'ODBC Driver 17 for SQL Server',\n        },\n    }\n}","lang":"python","description":"Configure Django to use the mssql backend. Ensure ODBC driver is installed."},"warnings":[{"fix":"Use ENGINE: 'mssql' in DATABASES setting.","message":"Django 3.2+ requires using 'mssql' engine string; older 'sql_server.pyodbc' is deprecated.","severity":"breaking","affected_versions":">=2.8.0"},{"fix":"Use Python 3.6+ and Django 2.2+.","message":"Python 2 support dropped. Django 2.2 is minimum.","severity":"deprecated","affected_versions":">=2.8.0"},{"fix":"Install Microsoft ODBC Driver for SQL Server from Microsoft website.","message":"ODBC driver must be installed separately; not included with pip install.","severity":"gotcha","affected_versions":"all"},{"fix":"Uninstall one to avoid import errors.","message":"Conflicts with 'mssql-django' backend if both are installed.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2.8.1':14 'activ':32 'backend':4,8 'connect':25 'databas':7 'django':2,6,34 'django-mssql-backend':1 'latest':17 'mainten':28 'microsoft':10 'mode':29 'mssql':3,35 'provid':20 'pyodbc':27,39 'releas':19 'server':12,24,38 'sql':11,23,37 'sql-server':36 'stabl':18 'still':31 'support':21 'use':26,33 'version':13","created_at":"2026-06-07T12:51:41.005146+00:00","updated_at":"2026-06-07T12:51:41.005146+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmppbjki7ua/venv/lib/python3.12/site-packages/sql_server/pyodbc/__init__.py\", line 1, in <module>\n    import sql_server.pyodbc.functions  # noqa\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/tmp/tmppbjki7ua/venv"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/ESSolutions/django-mssql-backend","github":"https://github.com/ESSolutions/django-mssql-backend","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}