SQL Server connection string
I am unable to connect SQL Server database from my Julia Language code web server; I suspect I am not able to figure out proper connection string.
I have 2 SQL Server ODBC drivers installed on this windows machine, "SQL Server" and "Microsoft ODBC Driver 17 for SQL Server"
I am able to create DSN manually and at the end DSN setup I am able to connect successfully with these credentials.
I have tried many different connection string, most relevant are following (first line is connection string, second error/exception returned:
Server=my.server.net; User ID=loginname; Password=myPassword; driver={SQL Server}; Database=myDB;
ErrorException("HY000: [Microsoft][ODBC SQL Server Driver][SQL Server]Windows logins are not supported in this version of SQL Server.01S00: [Microsoft][ODBC SQL Server Driver]Invalid connection string attribute")
Server=my.server.net; User ID=loginname; Password=myPassword; driver={ODBC Driver 17 for SQL Server}; Database=myDB;
ErrorException("28000: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user ''.01S00: [Microsoft][ODBC Driver 17 for SQL Server]Invalid connection string attribute")
Server=my.server.net; UserID=loginname; Password=myPassword; driver={ODBC Driver 17 for SQL Server}; Database=myDB;
ErrorException("28000: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user ''.01S00: [Microsoft][ODBC Driver 17 for SQL Server]Invalid connection string attribute")
Server=my.server.net; User Id=loginname; Password=myPassword; driver={ODBC Driver 17 for SQL Server}; Database=myDB;
ErrorException("28000: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user ''.01S00: [Microsoft][ODBC Driver 17 for SQL Server]Invalid connection string attribute")
Server=my.server.net; User Id=loginname; Password=myPassword; driver={ODBC Driver 17 for SQL Server}; Trusted_Connection=False; Database=myDB;
ErrorException("08001: [Microsoft][ODBC Driver 17 for SQL Server]Invalid value specified for connection string attribute 'Trusted_Connection'")
Server=my.server.net; User Id=loginname; Password=myPassword; driver={ODBC Driver 17 for SQL Server}; Trusted_Connection=No; Database=myDB;
ErrorException("28000: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user ''.01S00: [Microsoft][ODBC Driver 17 for SQL Server]Invalid connection string attribute")
Server=my.server.net; User Id=loginname; Password=myPassword; driver={ODBC Driver 17 for SQL Server}; Trusted_Connection=Yes; Database=myDB;
ErrorException("FA004: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Failed to authenticate the user '' in Active Directory (Authentication option is 'WindowsIntegrated').\r\nError code 0x534; state 10\r\nNo mapping between account names and security IDs was done.01S00: [Microsoft][ODBC Driver 17 for SQL Server]Invalid connection string attribute")
Server=my.server.net; User Id=loginname; Password=myPassword; driver={ODBC Driver 17 for SQL Server}; Trusted_Connection=Yes; Authentication=Server; Database=myDB;
ErrorException("08001: [Microsoft][ODBC Driver 17 for SQL Server]Invalid value specified for connection string attribute 'Authentication'")
Server=my.server.net; User Id=loginname; Password=myPassword; driver={ODBC Driver 17 for SQL Server}; Trusted_Connection=Yes; Authentication=SQLServer; Database=myDB;
ErrorException("08001: [Microsoft][ODBC Driver 17 for SQL Server]Invalid value specified for connection string attribute 'Authentication'")
Any suggestions?