How can we help you today? How can we help you today?

Can't access history older than a month - any ideas why?

Had to do a reinstall to get rid of an root header xml error - and noticed even though i hid away my huge history file and reinstated it after the install - when i search for queries older than a month ago - it is coming back with nothing.

of course i notice this only now because i need to find some code in a hurry - but is there something i need to change to get at the data?
kalo
0

Comments

4 comments

  • JoshH
    Hi, can you tell me what version of Prompt you are using?

    Also, if you look at the SqlHistory.db file (I use SQLite DB Browser for an easy way) how far back does the file show data?
    JoshH
    0
  • JoshH
    Another thing to check is if you look at your SQL Prompt options, then check under queries for History, is the "Automatically remove queries older than X days" checked?


    JoshH
    0
  • kalo
    Thanks for your response Josh.

    As i had the root xml error i uninstalled and reinstalled the latest version (i'm on frequent updates so am generally on the most up to date version most of the time). 10.16.5

    having checked my options it is checked for 7 days like your image.

    Was worried for a minute there that this was a toggle for automatically deleting history but now that i have removed the toggle i can see older history.

    Many thanks!

    i've installed sqllite db - this might prove useful once i get to grips with how to use it , thanks.

    Although i can see Queries table - where is the field showing age ?





    kalo
    0
  • Ben Patel

    Hi Kalo,

    Do you mean the SQLHistory DB? If so then I'm not sure as we don't support directly querying the DB. 

    Also as an added thing, if you run into this issue again, you can try deleting the indexing data for the SQLHistory.DB in %localappdata%\Red Gate\SQL Prompt 10\SqlHistoryIndex folder, then when you re-open SSMS this will be rebuilt. 

    Ben Patel
    0

Add comment

Please sign in to leave a comment.