Quantcast
Channel: SQL Archives - SQL Authority with Pinal Dave
Viewing all articles
Browse latest Browse all 594

SQL SERVER – SQL Server Management Studio Crash While Using Backup to URL or Connecting to Storage

$
0
0

Recently, as a part of my on-demand consulting, I was helping a client who was into a disaster situation and there was an urgent need to restore the backup of a database which was taken in Azure Blob Storage. In this blog, we will learn about how to fix the crash of SQL server Management studio while using a backup to URL or connecting to storage.

As explained earlier, the client was trying to restore the database backup which was stored in Azure blob storage. They were going to “Restore Database” menu option in SSMS, choosing the device as URL. As soon as they click on the add button, SQL Server Management Studio was crashing. Here is a screenshot.

SQL SERVER - SQL Server Management Studio Crash While Using Backup to URL or Connecting to Storage ssms-crash-url-01

Here are the details which you could see by clicking on “view problem details” button.

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: Ssms.exe
Problem Signature 02: 2014.120.5571.0
Problem Signature 03: 5a56a398
Problem Signature 04: Microsoft.SqlServer.RegSvrEnum
Problem Signature 05: 12.0.5000.0
Problem Signature 06: 5764ad48
Problem Signature 07: 7
Problem Signature 08: da
Problem Signature 09: System.Exception
OS Version: 6.3.9600.2.0.0.400.8
Locale ID: 1033
Additional Information 1: e01e
Additional Information 2: e01e71249cad1577f3cd863e8d1ab175
Additional Information 3: 1edb
Additional Information 4: 1edbb4ca04145d7b8df23b25a086703c

Above information could not help in finding the cause but I have shared here so that someone can search and reach to this blog.

Then I tested the same steps on my SQL Server Management Studio and it was asking to connect to a storage account from where the backup can be picked for restore purpose. So, I asked my client to connect to storage directly by using SQL server Management studio using the below option.

SQL SERVER - SQL Server Management Studio Crash While Using Backup to URL or Connecting to Storage ssms-crash-url-02

Strangely, we could see the same crash of SQL Server Management studio there as well. This test confirmed that there is some issue with the information stored by SQL Server Management Studio about the storage account. My client has been using the same SSMS and in the past, he was able to connect to Azure storage.

WORKAROUND/SOLUTION

I have asked my client to use some different machine and try to connect to the Azure storage from that machine. Interestingly, it worked, and it confirmed our theory.

Now we need to figure out, how to clean up the information stored about storage account in the cache of SSMS. I was not able to figure out the way to clean up only Azure storage-related information from the user profile. So, I ended up in removing complete saved settings of SSMS by deleting a sqlstudio.bin file from %appdata% user profile. This file “sqlstudio.bin” is located under below location. (Go to Start > Run and paste the below path)

%AppData%\Microsoft\SQL Server Management Studio

Once the folder is opened on your server, you might see a folder like below.

SQL SERVER - SQL Server Management Studio Crash While Using Backup to URL or Connecting to Storage ssms-crash-url-03

Based on the SSMS version, go inside the folder and delete “sqlstudio.bin” file. (You can also rename the file and SSMS would create a new one).

Number SQL Server Management Studio (SSMS) Version
11.0 SQL Server 2012
12.0 SQL Server 2014
13.0 SQL Server 2016
14.0 SQL Server 2017
18.0 SSMS 18.0 (separated from SQL Server)

Please keep in mind that, this is not smartest solutions available as it would delete all saved information in SSMS (like username password, server names list, any settings which you have changed etc.)

Reference: Pinal Dave (https://blog.sqlauthority.com)

First appeared on SQL SERVER – SQL Server Management Studio Crash While Using Backup to URL or Connecting to Storage


Viewing all articles
Browse latest Browse all 594

Trending Articles