Hi Sahan,
"the target machine actively refused it” - in TCP parlance, that means that there’s nothing listening on that port, aka “connection refused”. The server you are trying to connect to isn’t there (or there is a firewall similar blocking the connection - but doubt it).
IIRC by default SQL Server runs each instance on its own port, and uses a broker (aka “browser service”) to determine which instance you are connecting to (on port 1434?). See this link for more info:
Again, from memory (which may not be accurate), each instance may have a “dynamic port” allocated but will consistently expose itself on the same port each time it is started. So locking in a particular port in Django is normally ok. You just need to determine what port that is. :-)
The db connector in Django knows or understands the dynamic connection strategy that SQL Server uses, but needs the port number directly assigned to the instance..
HTH,
/d
------ Original Message ------
Date 2/11/2023 3:48:49 AM
Subject Facing Issue with ODBC Driver 17 for SQL Server