How/Can I specify the version of the SQL Server Native Client OLE DB (SQLNCLI) in the connection string - sql-server-2016

I know that using the OLEDB Driver (MSOLEDBSQL) I can specify this with the Driver keyword as documented here.
Can this be done with the SQLNCLI driver?
MY ISSUE:
I see on the target machine that both version 10 and 11 are installed and we are getting the following error, that I suspect is due an disabling of tls1.1.
System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

It looks like you can't.
I had the v10 version of the SQLNCLI driver uninstalled and everything seems to be working.

Related

Getting Error on Windows 11: (provider: SSL Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

we have bought some new devices with Windows 11 pro and want to connect to our old voip server. He has a Microsoft SQL Server 2008R2 installed and we get this error on our self programme that trys a connection.
(provider: SSL Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
But we don´t know why, because all other devices with Windows 10 have no problems at all. It is only on Windows 11. Now the funny part, we have installed a vm on our server with windows 11 (tweak needet for no tpm2.0 and CPU Support) but it runs. In this installation we have no problem to connect to the SQL Server.
So we have deactivated on the notebooks TPM. But that didn´t help.
Have anyone a hint?

SSL Error in Big Query using Simba ODBC Driver C#

I am using Simba ODBC driver (32-bit) to query data from Google Big Query using C#. I keep getting the below error one or two times per week. Please help as I am not sure how to resolve this error.
ERROR [HY000] [Simba][DriverSupport] (1160) Cannot enable SSL for the
connection when connecting to a server that has not enabled SSL. If
the server has SSL enabled, please check if it has been configured to
use a SSL protocol version that is lower than what is allowed for the
connection. The minimum SSL protocol version allowed for the
connection is: TLS 1.1.

SQL Server: A connection was successfully established with the server, but then an error occurred during the login process

Our application sometimes throws out this error:
System.Data.SqlClient.SqlException (0x80131904): A connection was
successfully established with the server, but then an error occurred
during the login process. (provider: SSL Provider, error: 0 - An
existing connection was forcibly closed by the remote host.) --->
System.ComponentModel.Win32Exception (10054): An existing connection
was forcibly closed by the remote host.
The application runs perfectly fine for some time, but just sometimes throws the exception above. Until now it is pretty hard to find the cause of this. Some say that it has to do with the amount of connections, but we have it set at zero and therefor it should be maximized at around 32k connections which we think we do not use.
EDIT: Seen the SSL provider is used and the client OS version is lower than the SQL server OS version I am thinking about the TLS version or cipher suite. I still cannot figure out why the same client is sometimes using a different/incompatible cipher suite or TLS version.
I had the same experience when my source os version was windows server 2016 and destination os was windows 2012, after windows update it happened, check windows recent updates.

Troubleshoot Connecting to the SQL Server Database Engine

I'm trying to connect to SQL Server from my .NET application.
I tried it on my pc and one other pc with already installed sql server.
I needed to test my app and I started virtual machines (windows 7 and 8.1).
I am constantly getting error:
"A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL
Server)"
I tried everything that i found on internet that might help.
Nothing works for me.
Im using VirtualBox for virtual machines.
Is there might problem with that or even problem is because I'm trying to do it on VM. How can I resolve this?
Check this is this helps go to run -> sql server configuration manager then check sql server service are running and then client protocol enabled

Informix 11.50 Connection Error ERROR [08001] [IBM] SQL30081N using Informix client sdk 3.5

I have a Windows server 2008 R2 64 bit with a VMware instance of Informix Dynmic Server 11.50 virtual appliance 32bit running.
Using the default database server provided in the virtual appliance i have created a database and a table inside it.
I installed the Informix Client SDK 3.5 and the informix data server provider Drivers on the windows server.
I setup the server connection on the windows server using setnet tool.
I tested the connection with the connect test demo tool of the SDK and the query executed successfully.
Now when I am testing the .Net provider driver by running the testconn.40_32.exe with the following connection String:
testconn40_32.exe -dtc "Database=safdata; Server=192.168.154.128:9088; User ID=root; Password=root"
I get following error:
Unable to open socket to server:
ERROR [08001] [IBM] SQL30081N A communication error has been detected. Communic
ation protocol being used: "TCP/IP". Communication API being used: "SOCKETS".
Location where the error was detected: "192.168.154.128". Communication functio
n detecting the error: "recv". Protocol specific error code(s): "", "", "0".
SQLSTATE=08001
Have you tried both tests from the same machine? If not then maybe you cannot go through firewall or other network device.
If you run tests on the same machine the server works then instead of 192.168.154.128 use localhost or 127.0.0.1. You can also check if Informix listens on port 9088 using netstat command or tool like TCView or ProcessExplorer.
I uninstalled the client SDK and all other drivers.. re-installed only the client SDK and it worked. The client drivers were conflicting with other versions of the driver I had installed.