I’m new to Django and trying to set up a DB Connection with SQL server db.
Earlier we had mysql which was working fine, I’m having trouble connecting to sql server
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'NAME': 'AAAAA',
'USER': 'AAAAA',
'PASSWORD': 'AAAAA',
'HOST': 'AAAAA',
'PORT': '1433',
}
}
Error: django.core.exceptions.ImproperlyConfigured: ‘sql_server.pyodbc’ isn’t an available database backend or couldn’t be imported. Check the above exception. To use one of the built-in backends, use ‘django.db.backends.XXX’, where XXX is one of:
‘mysql’, ‘oracle’, ‘postgresql’, ‘sqlite3’
Tried https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/install-microsoft-odbc-driver-sql-server-macos?view=sql-server-ver16
doesn’t work.
Also, I have 2 question
Is it a good idea to use third party library/drivers for SQL server? will it affect the performance compared to Mysql?