Remote connection to MS SQL – Error using pyodbc vs success using SQL Server Management Studio

Try specifying the port: import pyodbc server = r”xxxER\xxxSQLSERV” db = “xxxDB” user = “xxx” password = “xxxx” port = “1433” conn = pyodbc.connect(‘DRIVER={SQL Server};SERVER=’ + server + ‘;PORT=’ + port + ‘;DATABASE=’ + db +’;UID=’ + user + ‘;PWD=’ + password) If you’re still having issues, try using the IP or FQDN of the … Read more

SQL Server 2008 can’t login with newly created user

SQL Server was not configured to allow mixed authentication. Here are steps to fix: Right-click on SQL Server instance at root of Object Explorer, click on Properties Select Security from the left pane. Select the SQL Server and Windows Authentication mode radio button, and click OK. Right-click on the SQL Server instance, select Restart (alternatively, … Read more