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

Share SQL History between machines

Hi all

This has possibly been asked before but I can't find it.

I use two machines and I want to have a shared version of SQL History between the two machines (i.e. I don't want to have to copy files between the machines).

Is it possible to move the SqlHistory.db and Sqlhistory-search.json to a location where both machines can access it?

Regards

Richard
RichardMGreen
0

Comments

7 comments

  • Dan_J
    Hi @RichardMGreen

    Thanks for reaching out to us regarding this.

    Whilst it is possible to move the file to another location and point one machine to it, unfortunately sharing it will cause problems because the file will be locked when one machine is opening it.

    I appreciate it would be useful to you to able to share the SQLHistory.db file among multiple machines and so I encourage you to submit a feature request via our SQL Prompt UserVoice page: https://redgate.uservoice.com/forums/94413-sql-prompt.  That way our development team can consider adding this functionality in future released of the product.
    Dan_J
    0
  • RichardMGreen
    Hi @Dan_J

    Thanks for that.
    Just to be a bit clearer, I won't be using them at the same time, I just need to be able to access the same history on two machine.

    Can you let me know how to move the file(s) to a different location please?

    Regards

    Richard
    RichardMGreen
    0
  • Dan_J
    Hi @RicahrdMcGreen

    My apology for the delayed reply.

    Following the below steps should enable you to move the file location:

    1. Open regedit
    2. Go to Computer\HKEY_CURRENT_USER\Software\Red Gate\SQL Prompt 10\
    3. Add a string value with the Name = “Options Folder” and Data = “your new location”
    4. Go to C:\Users\<UserName>\AppData\Local\Red Gate\SQL Prompt 10
    5. Move the xml-files to the new folder if you want to keep the data

    I hope this helps!
    Dan_J
    0
  • RichardMGreen
    Thanks @Dan_J

    I'm not comfortable editing the registry so I'll leave that bit alone.
    I was hoping there was a config file that could be edited but obviously not.

    I'll head over to the UserVoice page and add it to the list.

    Regards

    Richard
    RichardMGreen
    0
  • Dan_J
    Hi @RichardMGreen

    Entirely understandable! Unfortunately, this is currently the only way to change the location of SQL History.

    If you could add this to UserVoice, that would be greatly appreciated. I will also highlight this to our development team for their future consideration.
    Dan_J
    0
  • RichardMGreen
    Hi @Dan_J

    I found a couple of items already on UserVoice to cover this scenario.
    Between them they have about 45 votes (so it looks like it would be nice addition).
    These are the topics:-
    Tab History Cloud Sync – Customer Feedback for Redgate (uservoice.com)

    SQL history - Allow user to set custom SqlHistory.db save location – Customer Feedback for Redgate (uservoice.com)


    Regards

    Richard
    RichardMGreen
    0
  • Dan_J
    Hi there @RichardMGreen

    Many thanks for highlighting these!

    I will bring these to our development teams' attention, hopefully we can do something in the future to improve this process.
    Dan_J
    0

Add comment

Please sign in to leave a comment.