Cannot Upgrade SQL Server 2017 Eval - sql-server

I was running SQL Server 2017 CTP on my local Win10 box and I woke up today and it said my eval has expired. So I downloaded SQL Server Standard from MSDN.
Fix attempt #1: I downloaded SQL Server Standard from MSDN and on SQL Server Installation Center I chose the Maintenance option.
It asked my which instance I want to upgrade and I chose the instance that had expired. I followed all the instructions and it says it was successful but when I try to start the instance, the event log shows the same error
SQL Server evaluation period has expired
Fix attempt #2: I download SQL Server 2017 Enterprise and from the SQL Server Installation Center I chose "Upgrade from a previous version of SQL Server".
I got through the install steps until I got to the Feature Rules check where it bombed on SQL Server Service Health Check with this error:
A connection was successfully established with the server, but then an error occurred during the pre-login handshake (provider: SSL Provider, error: 0 - The message received was unexpected or badly formatted).
Do I have to uninstall?
Is the only way to upgrade an eval SQL Server instance by wiping it out? If so, what's the safest way to remove it?

I had this answer in production trying to upgrade to enterprise, whereas in test it was just fine. It failed at the same spot but I believe the issue was that apps were continuously writing to the DB. So I had to actually remove the external IP address and reboot and at that point it was fine.

Related

TLS_RSA_WITH_AES_128_GCM_SHA256 cipher and SQL server

Is there any relation between TLS_RSA_WITH_AES_128_GCM_SHA256 cipher and SQL Server?
When TLS_RSA_WITH_AES_128_GCM_SHA256 is disabled, ASP.NET application cannot connect to SQL Server. Although SQL Server is still running, SQL Server Management Studio also cannot connect to database. The following error is shown in SSMS.
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - No process is on the other end of the pipe.) (.Net SqlClient Data Provider)
Read TLS 1.2 support for Microsoft SQL Server, identify the SQL Server version you use, download and apply the relevant components from the article linked, try again:
Use the following table to determine whether your current version of SQL Server already has support for TLS 1.2 or whether you have to download an update to enable TLS 1.2 support. Use the download links in the table to obtain the server updates that are applicable to your environment.
As a result of TLS 1.0 being phased out, we're starting to implement additional security on our servers. Primarily, explicitly disabling TLS 1.0 client and server (and SSL 1/2/3), and explicitly enabling TLS 1.2 and 1.1. In addition, we're restricting the ciphers available for use when connecting over TLS 1.2/1.1.
We followed the article Remus posted to the letter (https://support.microsoft.com/en-us/help/3135244/tls-1-2-support-for-microsoft-sql-server), and used additional resources to ensure we weren't missing anything (this was a good one: https: //blogs.sentryone.com/aaronbertrand/tls-1-2-support-read-first/). We also forced .NET Framework to use TLS 1.2->1.1->1.0 search order by adding the SchUseStrongCrypto registry keys on our servers (https://technet.microsoft.com/en-us/library/security/2960358.aspx).
Despite the above, we were unable to connect to SQL 2014 or SQL 2016 instances on a Windows Server 2016 environment when attempting to connect from a Windows Server 2012 R2 environment. We had a SharePoint installation in Windows 2012 R2 that was unable to connect to its database, and we were unable to connect to the instances with SSMS on this same server. Connecting via SSMS from a Windows 10 or another Server 2016 installation worked. Here's the error we were getting:
sql server Error Number: 10054 Severity: 20 State: 0
A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 – An existing connection was forcibly closed by the remote host.)
Once we allowed a TLS_RSA cipher for use on both servers, we were able to connect (didn't matter which cipher we used, we used the first one in this list):
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA
I'm unable to find any resource which explicitly states which ciphers are required for communication to SQL Server, I'm assuming the above list isn't comprehensive. I'd like a definitive resource of some sort, but wanted to post this in case it helps someone.

SQL Server Express 2012 Error: Cannot connect to Local DB

I have installed Sql Express 2012 version. I installed Local Db separately. i can see its installed when I click on "Installed Sql Server discovery report". However, I cannot connect to it using Sql Server Management Studio or Microsoft Visual Studio 2012 Professional Edition. I get the error:
"The attempt to attach to the database failed with the following
information: 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: SQL Network Interfaces, error: 50 - Local Database Runtime
error occurred. Cannot create an automatic instance. See the Windows
Application event log for error details."
In Windows Event viewer I see several of following errors with different regsistry keys each time:
"The DataDirectory registry value is missing in the LocalDb instance registry key:{-----}"
I checked in regsitry values for local db in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MicrosoftSQL Server Local DB and there's only one entry "Installed Version".
I have gone through several posts which state solution for the above error and have done almost everything they have suggested but still can't get localDb to work.
I'd appreciate any help that one can provide in order to solve this issue.
UPDATE:
Using Command Line Interface I verified that localDb v11.0 is installed. However, the command sqlLocalDb info v11.0 gives error:"The automatic instance "v11.0" is not created. If I try to create one it gives another error:"Unexpected error occured inside a localDb instance API method call."
You may try to use SQL Server Authentication. Also make sure that your SQL service is running.
Also you may try to delete the following registry:
HKEY_USERS\.DEFAULT\Software\Microsoft\Microsoft SQL Server\UserInstances\[GUID_FROM_EVENT_LOG]
You may also check Getting Started with SQL Server 2012 Express LocalDB
You need to start the SQL service for the local system.
Start Button
Write "SQL Server Configuration Manager" and click on it
After opening "SQL Server Configuration Manager" you need to start the local system services which are may be stopped in it that why your local Database not connected.
After starting local services you just connect the local system database. It should connected successfully.

A connection was successfully established with the server, but then an error occurred during the pre-login handshake in SQL Server 2012

Today I could not log into my local SQL Server 2012 instance with the following error message
A connection was successfully established with the server, but then an error occurred during the pre-login handshake.
provider: SSL Provider, error: 0 - An internal error occurred.
(Microsoft SQL Server, Error: -2146893792)
I found many similar questions here and on the forums, but nothing helped. Please notice that in my case it just says
0 - An internal error occurred
There are no errors in Event Viewer;
I don't use Encrypted Connections;
In SQL Server Configuration Manager, Force Protocol Entryption is set to False, Trust Server Certificate is set to Yes (Originally it was No, but in both cases it didn't work);
I CAN connect to SQL Server using UDL;
I tried to re-install SQL Server with all related components;
Tried to uninstall .NET 4.5;
In SQL Management Studio, in connection properties, Encrypt Connection is unchecked.
It worked fine yesterday, I have not installed any software since then.
check that TCP/IP protocol is not enabled for clients. Without TCP/IP protocol you can not access the sql server from other clients. Following is the method to enable the protocol.
Go to the: Start-->Programs-->SQL Server--> Configuration Tools-->SQL Configuration Manager.
Expand the SQL Network Configuration and click on the PROTOCOLS node
Right click on TCP/IP and open up the PROPERTIES panel
Select the IP ADDRESS tab
http://sqlanddotnetdevelopment.blogspot.in/2013/07/a-connection-was-successfully.html
In our case it was the problem with the SSL/TLS. We just disabled tls 1.0 to make sure we were compliant with PCI DSS but it stopped SQL Server. Then we had to install one update from Microsoft and then did the disable thing using IISCrypto instead of using the registry. Here's the steps we followed:
https://www.itechtics.com/connection-successfully-established-error-occured-pre-login-handshake/
I got this error connecting to localhost with the newest version of Microsoft.Data.SqlClient.
Turns out that Microsoft really wants you to encrypt your database, for security.
This can be fixed client side by changing the connection string, by adding an Encrypt=False parameter, eg:
SERVER=.\SQLEXPRESS;DATABASE=MyDatabase;Integrated Security=True;Encrypt=False;
See Rick strah's blog post on the subject
In our case same error occurred due to spn not set.Try checking if spn is set. As others suggested in comments you can see ring buffer entries which holds more info .if you are able to repro more often try running netmon or wireshark in parallel
None of this stuff worked for me.. in the end I had to install the cumulative update for SQL Server 2014 SP1
SQL Server Cumulative Updates
In my case the error was fixed by adding "Encrypt=False" like this:
Server=localhost\\SQLEXPRESS;Database=*YOUR_DATABASE*;Trusted_Connection=True;Encrypt=False
Disable TLS 1.2 protocol and enabled 1.0 /1.1 . Re-installed SQL server post restarting the server

Remote SQL Servers unavailable after installing Visual Studio 2012

I just built a new machine after my old one crashed a few days ago. I'm running Windows 7. I installed SQL Server 2012 Express as well as SQL Server Development Edition with Tools.
After installing, I made sure I could connect to both the Express version, local Dev server as well as multiple remote servers. Everything was great.
This morning, I installed Visual Studio 2012. Since doing this, I can still connect to my Local servers (Express and Dev), but I can't connect to the remote servers. The error I get is this:
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.) (.Net SqlClient Data Provider)
I've searched for issues, and while I've found some similar to this, not many mention Visual Studio, and none offer a solution.
UPDATE
I found I can connect using Named Pipes. The problem then is that not all my servers are configured to allow Named Pipes.
Visual Studion Connection Related Error:
netsh winsock reset
Run this command in command prompt. That will Fix Connection Related Error in Visual studio 2012
I think you'll need to look in your SQL server configuration manager and make sure TCP/IP is enabled for the database instances your interested in.
It isn't by default if I remember rightly.
If you're ok locally, have you read this post?
An error occured during the pre-login handshake
As other users are experiencing this problem, I thought I would add the solution I found.
The utility lspfix.exe found a break in the Layered Service Provider (LSP) chain. I applied the recommended fix and I was up and running again.
The fix was recommended by the lspfix.exe application. It's a very simple tool to use and it found the problem quickly. Here is the url to the tool.
http://www.cexx.org/lspfix.htm

Unable to connect to SQL Azure with SSMS, LinqPad; SQLCMD works fine

I have been using SSMS and LinqPad both for months to connect to SQL Azure instances without issue. Suddenly this week, linqpad stopped connecting, consistently timing out and displaying this error message: "A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - the wait operation timed out.)"
At first, it was just LinqPad. But soon after I started experiencing the same issue with SSMS 2012. It showed the exact same error message (slightly different dialog).
I've confirmed that this isn't a firewall rule issue. My IP has been allowed through the SQL firewall for months, and I can still connect using the same credentials using SQLCMD and I can run queries.
Any ideas? Why would SSMS and LinqPad both take a big dump while SQLCMD still works?
I finally found the solution to this (I think I may have found it via https://stackoverflow.com/questions/13420770/pre-login-handshake-error-connecting-directly-to-sql-azure). I installed some completely unrelated software about the time that things stopped working. As it happens, said software also installs - silently - some bundled software that leaves you with custom Winsock LSPs in place, which means the system is then afflicted by an issue reported to Microsoft and addressed in KB 2568167. Fortunately, I didn't have to manually remove the LSPs because I was able to uninstall the unwelcome software (Sendori!).
Did you look at the connectivity troubleshooting guide for SQL Azure?
http://social.technet.microsoft.com/wiki/contents/articles/1719.windows-azure-sql-database-connectivity-troubleshooting-guide.aspx
Have you also installed .NET 4.5 recently/in that week time frame? Have you checked your SQL Connection to make sure that SSL encryption is off?

Resources