SQL Prompt 10

Sharing your settings

You can share SQL Prompt settings such as Formatting styles, Snippets and Code Analysis rules with your colleagues to maintain consistency across the team. At the moment, there is no way to share all settings at once so they have to be shared individually.

Sharing Formatting styles

You can share your Formatting styles with other SQL Prompt users by storing them in a shared folder (for example a network share or a Dropbox folder).
  1. In the menu bar select SQL Prompt  Active Style  Edit styles... 
  2. In the Formatting styles window, right-click the path to the style folder, and select Open in Explorer .

3. Copy the style files you want to share. In versions of SQL Prompt prior to v10.5.0, styles have a . sqlpromptstylev2 file extension. From v10.5.0, styles have a .json file extension.

4. Open the shared folder you want to use (a network share or a Dropbox folder, for example), and paste the styles into it.

5. In the Formatting styles window change the  Style folder  to  your shared folder.

Other SQL Prompt users can then use the same set of styles by changing their Style folder to the shared folder. To do that:

  1. In the menu bar select SQL Prompt  Active Style  Edit styles...
  2. In the Formatting styles window change the Style folder to the shared folder. 

Sharing Snippets

You can share your snippets with other SQL Prompt users by storing them in a shared folder (for example a network share or a Dropbox folder).
  1. In the menu bar select SQL Prompt → Options → Snippets (Sidebar).
  2. Copy the path to the Snippets folder.


  3. Paste the Snippets path in a File Explorer window, and copy the snippet files you want to share. In versions of SQL Prompt prior to v10.5.0, snippets have a .sqlpromptsnippet file extension. From v10.5.0, snippets have a .json file extension.


4. Open the shared folder you want to use and paste the snippets into it.

5. Change the path of the Snippets folder to the shared folder.

Other SQL Prompt users can then use the same snippets by changing their Snippets folder to the shared folder. To do that:

  1. In the menu bar select SQL Prompt Options Snippets (Sidebar).
  2. Under the Snippets folder, change the current location to the shared folder.

When the whole team uses a shared folder, any snippets they create will be available to all team members.

To restore the snippets folder to the SQL Prompt default location, click the Restore default button. This also adds any missing default snippets back into the folder.

When you restore the default snippets, your custom snippets aren't removed and any changes you've made to default snippets aren't overwritten.

Sharing Code Analysis Rules

You can share your Code Analysis rules settings with other SQL Prompt users by saving them in a shared folder (for example a Network share or a Dropbox folder).

To change the location of your settings:

  1. In the menu bar select SQL Prompt Manage Code Analysis Rules.
  2. Save your settings in a shared folder you want to use (a network share or Dropbox folder, for example) by clicking Save as..., changing the file location and clicking Save.

Other SQL Prompt users can then use the same Code Analysis rules by changing the default folder to the shared folder and selecting the saved file. To do that:

  1. In the menu bar select SQL Prompt Manage Code Analysis Rules.
  2. In the Code Analysis rules window, select the shared folder where the Code Analysis rules file is located.

3. Select the file you want to use and click Open.

4. Click Save to complete the process.

Sharing general settings

You can share your general settings with other SQL Prompt users by exporting them. You can then share the file with them (by saving it in a shared location or sending it by email) so that they could import it.

Exporting general settings

  1. In the menu bar select SQL Prompt Options.
  2. Click the Export button located in the Options window.

3. Select the file destination to export the settings and click Save.

Importing general settings

  1. In the menu bar select SQL Prompt Options.
  2. In the Options window, click the Import button, and select the folder where the general settings file is located.


3. Select the settings file and click Open to import the settings.

Changing the location of the settings and snippet folders

By default, the SQL Prompt settings and snippet files are stored in:
  • %LOCALAPPDATA%\Red Gate\SQL Prompt 10 (Windows Vista, Windows 2008 and later)
  • %UserProfile%\Local Settings\Application Data\Red Gate\SQL Prompt 10 (Windows XP and Windows 2003)

To change the locations of these files so they aren't stored in your user profile:

  1. Open Registry Editor (regedit.exe).
  2. Navigate to the SQL Prompt registry key: HKEY_CURRENT_USER\Software\Red Gate\SQL Prompt <version number> 
  3. Right-click the key and select New > String Value.
  4. Set the string name to Options Folder or Snippets Folder as appropriate.
  5. Right-click the string and select Modify to open the Edit String dialog.
  6. In the Value data box, type the path of the folder in which you want to store the files. You must specify an existing folder.

If you want to store existing snippet files in the new location, you will need to move them manually.

Storing settings in AppData\Roaming

You can only store settings in AppData\Roaming with SQL Prompt 7.1 and later.

To store settings in AppData\Roaming:

  1. Open Registry Editor (regedit.exe).
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Red Gate (64-bit) or HKEY_LOCAL_MACHINE\SOFTWARE\Red Gate (32-bit).
  3. Right-click the Red Gate folder and select New > Key.
  4. Set the folder name to SQL Prompt.
  5. Right-click the SQL Prompt folder and select New > DWORD (32-bit) Value.
  6. Name the value StoreSettingsUnderRoaming.
  7. Right-click the value and select Modify.
  8. In the Value data box, set the value to 1.



Didn't find what you were looking for?