Wiki

Clone wiki

django-pytds / Settings

HOST

MSSQL server name or address, optionally including instance e.g. myserver/myinstance

NAME

name of the database

USER

user name

PASSWORD

user's password

COMMAND_TIMEOUT

Number of seconds to wait for command to complete before timing out, default id 30

OPTIONS

use_mars

Boolean, default is False (http://msdn.microsoft.com/en-us/library/ms131686.aspx)

autocommit

Boolean, default is False, if True enables auto-commit mode for connection

load_balancer

can be instance of SimpleLoadBalancer class

Example

from pytds import SimpleLoadBalancer
DATABASES = {
     'default': {
         'ENGINE': 'django_pytds',
         'HOST': 'DATABASEHOST',
         'NAME': 'DatabaseName',
         'USER': 'dbuser',
         'PASSWORD': '*******',
         'OPTIONS': {'autocommit': False,
                     'use_mars': True,
                     'load_balancer': SimpleLoadBalancer([
                         'DATABASEHOST1',
                         'DATABASEHOST2'])
                     },
         },
}

Updated