Moving snippets, styles and SQL history to another installation Moving snippets, styles and SQL history to another installation

Moving snippets, styles and SQL history to another installation

If you want to move your snippets, styles and SQL history from one installation of SQL Prompt to another, or you're upgrading SQL Prompt, you'll need to copy a few folders and files across.

Locate your files

By default these are stored at:

%localappdata%\Red Gate\SQL Prompt <version>\Snippets
%localappdata%\Red Gate\SQL Prompt <version>\Styles
%localappdata%\Red Gate\SQL Prompt <version>\SavedTabs.db (or SQLHistory.db on versions after 10.13.0.31319)

Replace <version> with your installed version number, for example SQL Prompt 10 or SQL Prompt 11.

Copy to the new installation

  1. Copy the Snippets and Styles folders into the matching folders on the new installation
  2. Copy SavedTabs.db or SQLHistory.db into the %localappdata%\Red Gate\SQL Prompt <version>\ folder on the new installation, replacing any existing file of the same name

If you copy an older SavedTabs.db file into a SQL Prompt 10.13 or newer installation, it's automatically converted to a SQLHistory.db file the next time SSMS or Visual Studio starts.

If the new installation already has a SavedTabs.db or SQLHistory.db file you want to keep, note that this can't be merged with the one you're copying over. You'll need to choose one or keep a backup of the other.

Point SQL Prompt to a snippets folder in a new location

If you'd rather move just your snippets to a new folder without copying the whole Snippets directory:

  1. Copy the contents of your existing Snippets folder to the new location
  2. In SQL Prompt, go to Options > Snippets
  3. Click Add and select the new folder

Your snippets should now appear in SQL Prompt from the new location.

Share snippets across multiple machines

To use the same snippets on more than one machine, set up a shared folder instead:

  1. Create a shared folder on a network drive or cloud storage service such as OneDrive or Dropbox
  2. Copy your snippets into this shared folder
  3. On each machine, go to Options > Snippets in SQL Prompt, click Add and select the shared folder

All connected machines will then use the same set of snippets.

Add comment

Please sign in to leave a comment.