Question: I have a Django Project and want to connect to SQL Server 2019. But I have a problem when doing migration. Here is the error message:

> 
> django.db.utils.NotSupportedError: SQL Server v15 is not supported.
> 
> 
> 

I'm using `Django 2.1.15` and `SQL Server Microsoft SQL Server 2019 (RTM) - 15.0.2000.5`.

Does it mean this Django version cannot using SQL Server 2019?

Answer: 
Resolved. Thanks to another forum

Installed 2019 version: Django backend for Microsoft SQL Server and Azure SQL Database using pyodbc, compatible with SQL Server 2019

```
pip install django-pyodbc-azure-2019

```

System check identified no issues (0 silenced).
September 19, 2020 - 18:52:09
Django version 2.1.15, using settings 'mdm.settings'
Starting development server at <http://127.0.0.1:8000/>
Quit the server with CONTROL-C.

I'll create a new venv and share the procedure since the current one is a mess right now:

```
(venvAzure) luca@webserver:~/app/MDM_SQLServer$ pip freeze
certifi==2020.6.20
cffi==1.14.2
chardet==3.0.4
cryptography==3.1
Django==2.1.15
django-azure-sql-backend==2.1.1.1
django-mssql-backend==2.8.1
django-pyodbc==1.1.3
django-pyodbc-azure-2019==2.1.0.0
idna==2.10
msal==1.5.0
pycparser==2.20
PyJWT==1.7.1
pyodbc==4.0.30
pytz==2020.1
requests==2.24.0
six==1.15.0
urllib3==1.25.10

```

Thanks
By adding the code below to **"settings.py"**, you can check which **ODBC Driver Version** to use. \*In my case, it's **"ODBC Driver 17 for SQL Server"**:

```py
# "settings.py"

import pyodbc
print("This is " + pyodbc.drivers()[-1]) # ODBC Driver 17 for SQL Server

```

So for example, I use [**mssql-django**](https://i.stack.imgur.com/Qkjqf.png) to connect **Django** to **MSSQL(SQL Server)** with **SQL Server Authentication**. \*I use **SQL Server 2019 Express**.

So, set the code below with **"ODBC Driver 17 for SQL Server"** in **"OPTIONS"** to **"settings.py"**:

```py
# "settings.py"

DATABASES = {
    'default':{
        'ENGINE':'mssql',  
        'NAME':'test',           
        'USER':'john',                      
        'PASSWORD':'johnpw',                
        'HOST':'DESKTOP-QVRCPTA\SQLEXPRESS',
        'PORT':'',                           
        'OPTIONS': { # Here
            'driver': 'ODBC Driver 17 for SQL Server', 
        },
    }
}

```