Craig Boland
Craig Boland

Reputation: 1054

How do I export Server Group configurations?

How can I export to file my Server Group configurations in Azure Data Studio?

I've created a Workspace file in my application solution that contains useful queries for troubleshooting, etc. I'd like to also include connection configurations for servers relevant to the solution so that any developer can use the Workspace queries quickly without having to ask which servers to run them on.

Upvotes: 16

Views: 12124

Answers (3)

Adi
Adi

Reputation: 139

Export connections

  1. To export the saved ConnectionGroups, click on

    File --> Preferences --> Settings --> Data --> Connection Groups

enter image description here

enter image description here

this saves the "datasource.connectionGroups" object array.

  1. To export the saved Connections, click on

    File --> Preferences --> Settings --> Data --> Connections

enter image description here

enter image description here

this saves the "datasource.connections" object array. Only thing left is that the passwords will not be exported/saved for each of the connections.

Import connections

  1. To import the saved ConnectionGroups, click on

    File --> Preferences --> Settings --> Data --> Connection Groups --> Edit in settings.json

Copy the "datasource.connectionGroups" object array that were saved in step 1 of Export.

  1. To import the saved Connections, click on

    File --> Preferences --> Settings --> Data --> Connections --> Edit in settings.json

Copy the "datasource.connections" object array that were saved in step 2 of Export.

Once import is complete, the list of connections will be listed under "Connections". Only thing left out is that the passwords should be set/saved for each of the connections.

Upvotes: 1

Mohamed Sahbi
Mohamed Sahbi

Reputation: 1143

You can copy your Server Group configurations from User Settings. You will find them under datasource.connectionGroups and connection details under datasource.connections (if you have different ones, check with the group id). Any user can copy and paste them into his user settings except the password. Everyone needs to add that individually after the fact. I would suggest creating a JSON file with those settings and adding the steps to a readme.md file. enter image description here

Upvotes: 13

Rider Harrison
Rider Harrison

Reputation: 571

All connections and groups are located in the settings.json file located at:

%AppData%\azuredatastudio\User\

For me specifically the path looked like this:

C:\Users\MyLogin123\AppData\Roaming\azuredatastudio\User

Upvotes: 18

Related Questions