Bulk import database connections in Rider

Hi,

is there a way to bulk import data sources in Rider?

We manage a few hundred SQL Server databases, usually from SSMS or Azure Data Studio. I've extracted the connection strings in a connection string per line file thinking that "Import from clipboard" in Rider would pick them up, but it didn't work.

0
5 comments

Hello Igor Benić,

Thank you for reaching Rider Forum.

 Could you please let me know more details on how are you migrating these connections? Is it from another Rider instance?

Thank you in advance!

0

Hi,

 

no, I'm a new user and I'm trying to see if I can use Rider as a replacement for SSMS/Azure Data Studio as well. I've extracted the connections from Azure Data Studio as it has a JSON configuration with all connections definitions so it's easy to do it from there,

 

Br

0
Hi Igor,

The data sources (connections to your database) are stored in XML format and every data source gets assigned a unique UUID. Using Import from Clipboard option will only work for importing a single data source having xml structure. So I am afraid a bulk import in json format won't work as it has a different structure and doesn't accept more than 1 datasource per import.

Please let me know if you have questions.
0

Is it possible to edit that XML? I could at least make a script to convert my connection strings to that XML format

0

You can certainly try to achieve this via a script. First, please familiarize yourself with the XML file structure for storing data source information. You'll be looking for dataSources.xml file found in .Idea  folder of your Datagrip project directory. 

You can kick things off by exporting a single database connection of your json file and see if gets recognized by the IDE. Please note that it's not necessary to generate a unique UUID parameter, as it should be assigned automatically if the data source structure is correctly retained.

0

Please sign in to leave a comment.