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

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.

Related

Connecting SQL Server To Cognos Free Trial Version

I had subscribed for free trial for IBM Cognos. In that I have to connect my SQL server with it. I had tried all alternatives but none is working. According to the error, I had even given access of firewall through my system with port defined, also in sql server configuration manager. But still facing the same error when Testing the connection through ibm cognos.By default, we can only connect through jdbc.
Error
Connection In cognos
SQL Server configuration manager
Port Setting Inbound Firewall
The MSSQL database you are connecting to would not be local to the on demand server, so a host of localhost is likely not correct.
If the MSSQL is not publicly accessible you will need to use a secure gateway connection. https://www.ibm.com/docs/kk/cognos-analytics/11.1.0?topic=demand-secure-gateway-only
Additionally, public or private you will also need to add the following to the JDBC connection URL TrustServerCertificate=true

Intermittent connection error after March 2020 security updates

I am facing below error while connecting to the SQL Server on another server from a .NET application.
An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using SqlAzureExecutionStrategy. The underlying provider failed on Open. 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.)
SQL Server is running on Windows Server 2016 and the application is on Windows Server 2012.
Everything was fine before those security updates but after updates were installed and servers were restarted, I started getting those errors.
Any suggestions on how to resolve this?
You might want look to look at the following article at Microsoft: Applications experience "forcibly closed" TLS connection errors when connecting SQL Servers in Windows
I am running into the same issue and I applied the work around, I am still waiting for the results to confirm the solution. It started happening recently in our production environment, as this happens very randomly while connecting to hundreds of servers it is difficult to spot the issue. First we were reviewing network side for lost packets as we work between different data centers. As nothing strange came back from this investigation I stumbled upon the above article.
Update
I applied the workaround, the Group Policy on the local computer, basically followed the instructions of this Group Policy, enabled the policy, copied all cipher suits, removed the TLS_DHE* and applied it. After that restarted the server. The issue has been resolved.

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

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

SQL Server connection failure (name pipes error 40)

I am having an issue at work that is driving me mad. I am new to SQL, and am finding my legs as a system administrator (trial by fire). We have a production server that runs a SQL database and I am trying to mimic the production server in a stand-alone (test) environment. My stand-alone server is of the exact hardware and I have ghosted the production server drives on to the test server (stand-alone) as well. Everything is identical. The only difference is my test server is not in a domain. Its only in a workgroup. My setup consists of one client machine (Windows 7) and the test server running Server 2008r2(SP2)+ SQL Server 2008r2.
We have applications that connect to the database and when I run the applications (connect to the database?), I get the following 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) (Microsoft SQL Server, Error: 5)
I have been researching this error for about 3 months now. I am at my wits end. I have tried all the solutions I could find. Most of the solutions I found here at this site. Enable remote connections-DONE, Firewall execptions-not necessary as I can disable the firewall since I'm on a standalone network, but I have been down that road before and it did not help. I don't think this is a network issue as I am using just a switch with the server and one client connected. I can ping back and forth between the systems.
I've tried so many other solutions that I cant even remember them all. Changed so many settings I've lost count. Thank goodness I can re-image the server back to normal if I feel I've gone to far and changed too many settings to where I can't remember what I've done.
As you can tell, I probably only make things worse the more I try to fix the error, but I have no choice. Everyone is looking at me to fix this and get the test server working, but I need some help. A huge thank you in advance to anyone that can help me solve this. It would be greatly appreciated!

Lost connection to MySQL server in Windows XP while adding Data Source - ODBC

When I am trying to connect to the localhost, there is no problem. But when I am connecting to my server, I am getting this error.
[08S01][MySQL][ODBC 5.1 Driver] Lost connection to MySQL server at ‘reading initial communication packet’, system error: 2
Please tell me how to work around this.
I have tried with MySQL ODBC Drivers, both 3.51 and 5.1 drivers.
An ODBC connection to MySQL cannot be made through HTTP (or PHPMyAdmin).
How are you trying to connect?
Edit: time-out may also be an issue. Change the connect_timeout global variable to 30
seconds (or some other 'long' time) and see whether that helps.