Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sql Server Management Studio closes immediately after startup

Sql Server Management Studio closes in about five seconds after startup. No messages are being displayed (even in a console) and no logs occur in a Windows Event Viewer. I have tried to install different SSMS versions , i.e. 16.X, 17.Y, but it have not helped. I have also tried to repair VS 2017 and SSMS.

This problem occured for the first time, when I unistalled Visual Studio 2015 and its related components, like SSMS, and installed VS 2017 and newer version of SSMS (16.X).

What can I do to make SSMS not closing immediately after startup?

like image 379
Darko Avatar asked Mar 14 '18 13:03

Darko


People also ask

How do I reinstall SQL Management Studio?

Note: If you do not have SQL Server 2012 installed on your machine, select ENU\x64\SQLEXPRWT_x64_ENU.exe (or ENU\x86\SQLEXPRWT_x86_ENU.exe for 32-bit) to download and install both SQL Server 2012 and Management Studio in a bundle. After the download is completed, run the .exe file as Administrator.

Why SQL Server is not starting automatically?

This issue happens because the SQL Server lost the logon id credentials or used an account without rights to start services. For starting your services automatically, SQL Server needs an account with rights to start services during operating system start up.

Why SSMS is not installing?

Run the Microsoft Installation Cleanup Utility to remove the rogue client tools still existing on the server, which are not listed in Add or Remove Programs. Reinstall the client components again. This time, the installer should perform a proper install of the Management Tools, including SQL Server Management Studio.


Video Answer


4 Answers

This solution worked!

Step1:

C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\CommonExtensions\Platform\Microsoft.VisualStudio.MinShell.Interop.pkgdef

Rename and make sure this file does not have the .pkgdef extension anymore. Or remove the file.

Step2:

Remove the following Registry Key (which is created at SSMS 18 Startup using the .pkgdef file mentioned above):

HKEY_CURRENT_USER\SOFTWARE\Microsoft\SQL Server Management Studio\18.0_IsoShell_Config\RuntimeConfiguration\dependentAssembly\bindingRedirection\{8BC7AF31-B6DA-4B97-8B36-F0500DECB147}

From now on SSMS 18 will start.

Source: SQL Server Management Studio 18 GA (15.0.18118.0) not compatible with .NET Framework 4.8🕗 {toggle_previous_statuses}

like image 79
user11445865 Avatar answered Oct 11 '22 14:10

user11445865


I had this same problem running SQL Server 2017 on Windows Server 2012 R2.

• After installing SSMS 18.0 General Availability release (GA), when started, it always closed immediately.

• So I installed Visual Studio 2019 Community Edition with the Data storage and Processing workload and somehow SSMS 18.0 (GA) ran fine without closing, but just once. The next times I tried to start SSMS 18.0 (GA) again, it always closed immediately.

• Having lost my trust on this GA release, I decided to uninstall it and try with a previous release.

• Using the Chocolatey package manager for Windows https://chocolatey.org/packages/sql-server-management-studio I installed SSMS v17.8.1 and everything is working fine now.

like image 3
heroesch Avatar answered Oct 11 '22 15:10

heroesch


Can't believe, that the only solution was to install VS 2015 again. So I use VS 2017 in everyday work, but I must have VS 2015 installed as well, just to make SSMS work...

like image 2
Darko Avatar answered Oct 11 '22 16:10

Darko


I took a look at this. Problem seems to be with SMSS installing Microsoft Visual C++ 2017 Redistributable. When that happens, Microsoft Visual C++ 2015 gets uninstalled. However, if you look at the System Requirements at this page:

Microsoft Visual Studio Tools for Applications 2017

you'll see that Microsoft Visual Studio Tools for Applications 2017, which is also installed by SMSS v18.0, requires Microsoft Visual C++ 2015 Redistributable.

So, it seems the crash is caused by Microsoft Visual Studio Tools for Applications 2017 when it tries to find Microsoft Visual C++ 2015 Redistributable and can't since Visual C++ 2017 Redistributable removed it.

Don't bother trying to install Microsoft Visual C++ 2015 Redistributable if 2017 is already there. Installer for 2015 won't do the install if it sees 2017 is already there. Uninstalling 2017 so 2015 will install works, but then, when you reinstall 2017, 2015 is removed.

I guess stay on SMSS v17.9.1 for now.

like image 1
breusshe Avatar answered Oct 11 '22 14:10

breusshe