Connection to SQL database failed because of an error in initializing provider - sql

I am trying to connect to an internal SQL database which allows TLS 1.2 protocol only.
I am able to log-in to the database using the SQL Server Management studio.
I'd like to connect to that same database using Excel 2013 (for a more graphic report). I have read a lot on Excel having problems with TLS1.2 and the use of ODBC Driver instead since that is the only one which supports tls 1.2.
Sadly when entering the credentials and testing the connection we receive the following error:
TEST CONNECTION FAILED BECAUSE OF AN ERROR ININITIALIZING PROVIDER. UNSPECIFIED ERROR
Does anybody have experience with using Excel to connect to SQL Server using TLS1.2? Am I doing something wrong? I'm using the Data link: Microsoft OLE DB Provider for ODBC drivers. The normal SQL way of adding things doesn't work either but I believe that's because TLS1.2 isn't supported there.

If I recall correctly, Management Studio will connect on port 1433 by default and use the TDS protocol and really have nothing to do with TLS. So it is not surprising that it works in SSMS.
From https://blogs.msdn.microsoft.com/sql_pfe_blog/2017/09/27/microsoft-excel-tls-sql-server-important-considerations/
For all NEW workbooks, do not use that menu option. Instead use the
"From Data Connection Wizard" and select a compliant driver from the
list. A requirement is that you have the SQL Native Client (2008 or
2012) or ODBC drivers with appropriate patches per TLS 1.2 support for
Microsoft SQL Server below.
So it seems like just using ODBC will not work unless ODBC on your machine has been patched to handle TLS 1.2.
I believe the ODBC update you need is below.
https://www.microsoft.com/en-us/download/details.aspx?id=36434&751be11f-ede8-5a0c-058c-2ee190a24fa6=True

Related

Fail to add ODBC Data Source to a SQL Server

I use an online database which I am able to connect through altium or dbVisulizer. I want to add an instance to that database using ODBC Data source in windows, but it fails. The steps I followed are pictured below:
Any idea why is this happening?
Additional information:
Altium use the following information: ConnectionString = Provider=SQLNCLI11.1; User ID=alib_WFC5AKIMTQCL; Password="*********"; Initial Catalog=altium_library; Data Source=db.altiumlibrary.com,1433; Initial File Name=""; Server SPN=""
After connecting through dbVisulizer I have the following information: The server version is: Microsoft SQL Server 14.00.2027 Microsoft JDBC Driver 9.2 for SQL Server 9.2.1.0
I don't believe this is possible. However, in most cases, if you can connect to sql server via jdbc drivers, then you can connect to the same sql server with odbc.
Access does not support jdbc, and in most cases that driver is Java, and thus you would be talking about a java enabled client side software.
For example, I have a instance of SQL server. I direct connect from Access over the network to SQL server - using ODBC drivers.
However, my android phone? Well, I use jdbc type 4 drivers, and thus my android phone can also direct connect to that same instance of sql server on the network.
However, there is no support for Access to connect to SQL server using jdbc drivers, but then again, if that is SQL server in question, then both jdbc, and odbc should be able to connect to that running instance of SQL server.
Now, you might be able to setup and run what is called a jdbc "bridge" connection. This would require that you install + setup a bridge on your computer. (and that bridge runs like a mini web server - it is NOT just a driver, but a web like "service"/"server" that you have to have running. In fact, it quite much the reverse that such a bridge is for. So, for example, if you running that bridge, then it would be possible for jdbc drivers to in fact connect to the access database (this would be a type 2 (or 3???) jdbc driver/connection.
So, to be clear, a jdbc type 4 connection is NOT possible to Access, since they require a so called "socket" (tc/ip) connection. Access is file based, so you don't ever connect to a access database, but you OPEN IT as a file. However, as noted, you are talking about Access connecting to the server anyway.
However, Access does not support, nor use nor have any means to use and consume a jdbc driver. But then again, it stands to reason that any database from MySQL, Oracle, PostgrSQL, SQL server, and more ALL HAVE ODBC drivers.
So it begs the question, why a ODBC driver would not be used here?
But, as noted, since Access supports ODBC drivers, and not jdbc drivers, then the answer is no - Access cannot use such drivers.

SQL Server ODBC Connect to Database Fails With "SSL Security Error"

I have been digging for answers for this issue and have not been able to solve it. I believe it is a TLS issue but nothing I've tried fixes it. Setup ...
The reporting application server trying to connect to the database server via ODBC SQL Server is using the SQLSRV32.DLL version 6. (I know the driver is old and updating would probably fix the issue but that is not so easy to do). I have confirmed on both hosts that TLS 1.0 is not enabled. I did this by checking the registry under "SCHANNEL->Protocols" and using "Internet Options -> Advanced Tab". Both only have TLS 1.1 and TLS 1.2 checked. The error is "Error 772; Connection Failed; SSL Security Error". I found a host with an updated ODBC driver (v10) and it can connect to the database.
I have another DB and reporting server with what appears to be identical configurations, using the same old SQL driver, but they are not having the issue. Trying to connect from this reporting server to the other database fails too.
I believe this is an issue with the database server, possibly SQL Server, but am stuck on what to look for.
Any guidance on what else to look at would be appreciated.

What is the difference between Microsoft SQL Server Connection and Generic DB connection provided in DB connector from Mule 4.3?

In the current project we are already using generic db connection and now we found that there is Sql Serve connection available but we have never used that so want to explore that option.
Is it going to give better performance than generic connection?
One observation from my experience is Generic Connection is working for Windows Authentication where as SqlServer Connection is not working for the same and working for Sql Account.
The Microsoft SQL Server Connection provides some database specific configurations to simplify the configuration of the connection. For example an instance name. With the Generic Connection you can only use generic JDBC configurations. There should not be a difference in performance. Depending on how did you configure Windows Authentication in the generic connection it may or not be possible to replicate it in the Microsoft SQL Server Connection. If you are happy with your current connection configuration there is no need to change it.

Unable to send data using SQL adapter in BizTalk

We are unable to send the data to SQL database using SQL adapter in BizTalk.
The error we are facing is:
error in initializing provider [DBNETLIB]ConnectionOpen(SECCreateCredentials()]SSL Security error
We have recently enabled TLS 1.2 and disabled lower versions on both BizTalk and SQL servers.
We checked that SQL server native client version 11 was also installed in both servers.
We have tried creating ODBC connection using SQL serve native client 11 and that also didn't work.
Can you please suggest what is causing the issue and any other changes needs to be implemented.

SQL Server connection on smart device

I wanted to know if it’s possible to use a SQL Server database connection on a smart device? On the internet I found some solutions to use it but I also found people saying that you need to use SQL Server CE connection.
Source: "Can't find PInvoke DLL 'dbnetlib.dll'." error in Smart Device Application
Here it looks like someone is using a normal database connection and got it fixed
But here: http://www.vbforums.com/showthread.php?681717-dbnetlib-dll-error
Someone is saying that you can only use SQL Server CE database connection.
So my question is can you use a SQL Server connection on a smart device or do you need to use SQL Server CE connection?