How to restore my data in SavedTabs.db ?

I'm running SQL Prompt in SSMS 18.10, and I'm using the "restore tabs when SSMS starts" function (with the no limit and reconnect settings).
Today, SSMS hanged from user input because of a modal window (it telled me so when I tried to kill the process). So I tried to locate the window but couldn't find any, so I had no other choice then to kill ssms.exe.
When I started ssms again, SQL prompt started to restore my tabs (maybe around 20 tabs), but the problem was that it never stopped. It looped over and over again and never stopped to open tabs. It feelt like a loop since I could see that the tab names was repeated. During this restore loop, I noticed that the file size of  the "AppData\Local\Red Gate\SQL Prompt 10\SavedTabs.db" file slowly increased.
This happened every time I tried to start ssms.
I solved it by renaming SavedTabs.db before starting ssms, but now I have lost all my Tab History :(

Is there anyway to restore the data from my old SavedTabs.db file?
Many Thanks,
Best Regards John


  • Options
    Hi @MrJonez

    I'm very sorry you are seeing this issue in SQL Prompt! Thanks for reaching out to us regarding this.

    We have very recently identified an issue with duplicate tabs being open by Tab History in the latest version of SQL Prompt (v,10.10.2). I wonder, did you only start to see this issue since updating to this version of SQL Prompt. Also, if you were to downgrade to v.10.10.1 (which can be downloaded here: https://download.red-gate.com/checkforupdates/SQLPrompt/SQLPrompt_10.10.1.25407.exe) do you continue to see this problem?

    Regarding restoring your saved tabs, when you renamed the SavedTabs.db file back to it's correct name, do you still not see your Tab History?
    Kind regards

    Dan Jary | Redgate Software
    Have you visited our Help Center?
  • Options
    MrJonezMrJonez Posts: 11 Bronze 1
    That was the first time I noticed this bug. After I started on a new SavedTabs.db, I noticed that it reopened duplicates when I restarted SSMS (but only 2 of each tab). I have now upgraded to Sql Prompt 10.10.3 and I cannot recreate that bug anymore.
    I also tried to start SSMS with my old crashed SavedTabs.db. It didn't work so well in the begining, SSMS crashed after a while during the tab restore.

    Application: Ssms.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.OutOfMemoryException
       at System.Drawing.Graphics.FromHdcInternal(IntPtr)
       at System.Windows.Forms.ToolStrip.OnPaint(System.Windows.Forms.PaintEventArgs)
       at System.Windows.Forms.Control.PaintWithErrorHandling(System.Windows.Forms.PaintEventArgs, Int16)
       at System.Windows.Forms.Control.WmPaint(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.ToolStrip.WndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.StatusStrip.WndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr)

    Faulting application name: Ssms.exe, version: 2019.150.18390.0, time stamp: 0x615720fe
    Faulting module name: KERNELBASE.dll, version: 10.0.19041.1415, time stamp: 0x2791d798
    Exception code: 0xe0434352
    Fault offset: 0x0012b522
    Faulting process id: 0xe560
    Faulting application start time: 0x01d803d112824034
    Faulting application path: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe
    Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
    Report Id: 170d3dd9-92a3-46cd-b39b-438d0685b905
    Faulting package full name: 
    Faulting package-relative application ID: 

    But the second time I started SSMS it managed to start without crashing. I had a terrible big amount of duplicate tabs but the history is intact :)

    So thank you very much. Have a nice weekend!
    BR John
  • Options

    Thanks for your response on this!

    I'm glad to hear that the latest version of SQL Prompt has resolved this issue for you! It appears this version does indeed contain a fix for this.

    Kind regards

    Dan Jary | Redgate Software
    Have you visited our Help Center?
Sign In or Register to comment.