Sharing your settings
Published 29 October 2019
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
- In the menu bar select SQL Prompt → Active Style → Edit styles...
- 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:
- In the menu bar select SQL Prompt → Active Style → Edit styles...
- In the Formatting styles window change the Style folder to the shared folder.
Sharing Snippets
- In the menu bar select SQL Prompt → Options → Snippets (Sidebar).
- Copy the path to the Snippets folder.
- 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:
- In the menu bar select SQL Prompt → Options → Snippets (Sidebar).
- 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
To change the location of your settings:
- In the menu bar select SQL Prompt → Manage Code Analysis Rules.
- 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:
- In the menu bar select SQL Prompt → Manage Code Analysis Rules.
- 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
- In the menu bar select SQL Prompt → Options.
- Click the Export button located in the Options window.
3. Select the file destination to export the settings and click Save.
Importing general settings
- In the menu bar select SQL Prompt → Options.
- 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
To change the locations of these files so they aren't stored in your user profile:
- Open Registry Editor (regedit.exe).
- Navigate to the SQL Prompt registry key: HKEY_CURRENT_USER\Software\Red Gate\SQL Prompt <version number>
- Right-click the key and select New > String Value.
- Set the string name to Options Folder or Snippets Folder as appropriate.
- Right-click the string and select Modify to open the Edit String dialog.
- 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:
- Open Registry Editor (regedit.exe).
- Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Red Gate (64-bit) or HKEY_LOCAL_MACHINE\SOFTWARE\Red Gate (32-bit).
- Right-click the Red Gate folder and select New > Key.
- Set the folder name to SQL Prompt.
- Right-click the SQL Prompt folder and select New > DWORD (32-bit) Value.
- Name the value StoreSettingsUnderRoaming.
- Right-click the value and select Modify.
- In the Value data box, set the value to 1.