Search code examples
c#sql-servervisual-studiovisual-studio-addinsvspackage

Where does Visual Studio store data connection strings used in SQL Server Data Tools


If you are familiar of using SSDT tools in visual studio to compare database schema or data then you might be noticed the below picture ...

SSDT Connection setting box

Due to my visual studio add-in work i need to provide end user these connection strings.. Can you please help me to find-out where these data connection string resides and how SSDT access them.. Any hints will be appreciated ..

Note: I am not asking about server explorer data connection strings .. where they resides i already knew.


Solution

  • I'm not 100% sure on this, but it looks like it's stored in the registry. I used Process Monitor to get a look at what VS was doing when I added a new connection. I couldn't pinpoint from there what was happening because there was so much stuff. But I realized that it was hitting the registry a crap ton. So I searched the registry for one of my servers and eventually found a spot that looks good.

    This is the registry path: enter image description here

    This is what they look like: enter image description here

    If that isn't it, I'll keep looking. But I'm pretty sure that's it.