new feature SQL History is more or less useless


I am the only one, who has a bad experience using the new feature SQL History in SQL Prompt in SSMS.

1. Opening SQL History takes 1-2 minutes and SSMS is completely frozen while opening the SQL History tab
2. Searching for keywords etc. in SQL History freezes SSMS and often crashes SSMS, forcing you kill the SSMS process and opening SSMS again.

Come on Redgate, You should be able to do better..

Henrik Munch


  • Options
    Hi Henrik,

    Thank you for reaching out and I apologize that you are running into issues with SQL Prompt.

    When SSMS crashes, is there an error message accompanied with it?
    In addition, are there any errors within the SQL Prompt log files?

    Thank you!
    David K.
    Product Support Engineer
  • Options
    HenrikMHenrikM Posts: 7 Bronze 1
    When I say crashes SSMS I mean that SSMS becomes unresponsive and I have to kill the SSMS process.. 
    Sometimes maybe if I wait several minutes (3+ minutes) SSMS will become responsive again.

    I have checked the logs and in the sqlprompt-sqlhistory*.logs found this Exception

    2022-12-05 12:45:10.003 +01:00 [Information] Logging level set to 'Information'
    2022-12-05 12:45:10.195 +01:00 [Information] Started successfully with identifier '*****************************'
    2022-12-05 12:45:10.266 +01:00 [Error] Error processing operation
    System.NullReferenceException: Object reference not set to an instance of an object.
       at RedGate.SqlPrompt.SqlHistory.Storage.StoreInitializer.Create()
       at RedGate.SqlPrompt.SqlHistory.Storage.Commands.CommandStore.AddContentsRevision(Guid queryIdentity, String name, String path, String contents, SqlHistoryConnection connection, SaveReason saveReason)
       at RedGate.SqlPrompt.SqlHistory.Server.Commands.CommandProcessor.StoreContentsRevision(RevisionMessage message)
       at RedGate.SqlPrompt.SqlHistory.Server.Commands.CommandProcessor.ProcessCommand(CommandOperationType commandOperationType, ICommandMessage message)
       at RedGate.SqlPrompt.SqlHistory.Server.OperationQueue.ProcessQueue(Object sender, DoWorkEventArgs e)
    2022-12-05 12:45:14.020 +01:00 [Information] [Startup status] Size on disk (bytes) = 377958400, Number of queries = 46308, Number of revisions = 50798, Highest revisions per query = 102, Longest contents (characters) = 4781898

  • Options
    Hi Henrik,

    Thank you for sharing the logs.

    It appears that this is a known issue by the development team and they are actively looking into a fix.
    I can update you once a fix is released.

    Kind Regards,
    David K.
    Product Support Engineer
  • Options
    TJSmithTJSmith Posts: 2 New member
    Mine doesn't crash, but it's certainly much slower (some seconds vs instantaneous) to open than the old tab history. I came here to see what others were saying about the feature, since the old tab history was one of my favorite tools.

    I'd be less bent out of shape about my cheese being moved/changed if it didn't feel like Bringing Out the Big Guns whenever I want to break out one of my most frequently used features.
  • Options
    jeppejeppe Posts: 5 Bronze 1
    My Tab History was actually starting to throw exceptions left and right. It was becoming unusable.

    SQL History seems to be working pretty well. It is not instantaneous in its search, but it is reasonably fast considering how much it is indexing.
  • Options
    alphonsegalphonseg Posts: 34 Silver 1
    I'm seeing the same issues of SSMS freezing and tab history slow.
  • Options
    PaulKahlPaulKahl Posts: 5 Bronze 2
    This is still a problem as of 2023-06-29. SQL History takes incredibly long to load as a whole, and each file you click on takes longer to load, in addition to searches taking even longer. And all of these things lock SQL while loading.

    File this under "Not fixed".
Sign In or Register to comment.