We have a Classic ASP application hosted on server Win 2008 R2, Database - SQL server 2008 R2. The application was working fine until we disabled TLS 1.0 and enabled TLS 1.2 in app server. TLS 1.2 is enabled on Database server. We have installed SSMS on app server and are able to connect to DB. Created a system DSN and tested using ODBC drivers which is only successful when tried "ODBC driver 11 for SQL Server" driver. Performed UDL test in app server and the test connection failed while using both DSN and connection string with errors "Invalid Connection String Attribute" and "Data source name not found and no default driver specified" respectively. Instead of OLEDB we have tried SQLNCLI10
which also didn't work.
Tried all the drivers and the respective connection-strings, though able to establish connection using "ODBC driver 11 for SQL Server". Hence also tried the connection strings
SQL Server Native Client
Driver={SQL Server Native Client 11.0};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
SQL Server for ODBC
DRIVER={ODBC Driver 11 for SQL Server};SERVER=test;DATABASE=test;UID=user;PWD=password
DSN
DSN=myDsn;Uid=myUsername;Pwd=;
But unable to establish connection to database. Please suggest.
Provider=SQLNCLI11;Server=yourServerAddress;Database=yourDataBase;Uid=yourUsername; Pwd=yourPassword;
. The Native Client driver is bundled with SQL Server, there's an OLEDB driver which is included with Windows, so it's usually a good fallback option. The syntax isProvider=SQLOLEDB;Data Source=yourServerAddress;Initial Catalog=yourDataBase; User Id=yourUsername;Password=yourPassword;"
. Note the use of "Data Source" and "Initial Catalog" in place of "Server" and "Database" – John Feb 8 '17 at 18:40