SQL Server Datastore

Topics: Developer Forum, User Forum
Mar 29, 2009 at 3:20 PM

I don't know of anyone mentioned this allready, but it would be a nice feature if Terminals would have the ability to use MS SQL Server (or MySQL or any other) as database backend to store all connections.
Then It would be easy to manage connections with several users in a network.
It this time I mostly use TeamViewer and this program is able to this this. This makes it an really easy program.

Maybe, when this feature will be included, it would be best that there is an option which can only be controlled by a particular user to save passwords or not.

Dec 15, 2010 at 9:49 PM

I would just like to resurrect this comment.  I love this tool.  But we have many users who all have to maintain individual databases of connections.  If there was a central database where all connections were pulled from this would allow us to add connections to be available for everyone to access.  Terminals is a great tool, but this feature would revolutionise how we use it.  Thanks.

Dec 21, 2010 at 2:41 PM

I agree completely on this. I have about 10 admins that use it, and right now I update and make changes to it and then copy the config file out to the network and notify everyone to copy down the new file with the changes. If it could just point to a database that stores all the connection information that would be awesome.

Feb 2, 2011 at 7:54 AM

is this a feature that is even planned for? or is asking for this feature just wishful thinking that is of no priority to the devs? Just wondering.

Jun 28, 2011 at 12:02 AM

I just wanted to bump this.  seriously, I would pay an annual license for this feature.

The is an awesome product and I really feel there is an opportunity to add a paid-for version that makes it ready for the enterprise.  having a system where it pulls all the config setup from an centralised DB would put this into an enterprise class product.  please please please look into this as a feature.

again, I would pay!


Jul 13, 2011 at 8:39 PM
Edited Jul 13, 2011 at 8:40 PM

Hi guys. If it's up to me it will be planned in one of the next versions. We're now working on trying to fix all the open issues and implementing some small features for the 2.0 final release. After that we'll see what we can do in the next releases. Just be patient. And you can always support the project by donating.

Jul 15, 2011 at 2:20 PM

@Nielsvdc:   As a Database Developer and an AVID fan and user of Terminals.  I would gladly help develop a small standalone database and/or a full SQL database on this part of the project if you would allow me.  contact me offline for more information olepadre@hotmail.com

Jul 21, 2011 at 5:42 PM

Users - What about just having a feature to e-mail the config file and then opening it to import the connections. that way the developers would not have to rewrite their data layer for the application? Also as nielsvdc said, donating will help them get more done.

Jul 26, 2011 at 1:37 PM

Of course you guys donating is always nice, but it still takes a lot of time in programming. On the other hand it's also fun to do...

For this feature it takes some planning to convert the current XML config to SQL Server or any other database. We have to consider lot's of things to implement the database feature like database configuration, import/export possibilities, upgrade scripting on every release, access security, etc. etc. I think it will be a very nice feature to add to this application, but we need some time to do the planning and design.

For probably version 2.1 I will have a look for the possibility of splitting the config file in user settings and favorites. And add a possiblity to choose the location of the config file for favorites. This way you can put the favorites config file on the network and start sharing with other users.


Aug 28, 2011 at 11:31 AM

What we've done is to get our website to pull all the connections and generate the favorites.xml and let the users import it manually from our intranet. Much like Jarrod's solution. It seemed easier than trying to re-write Terminals, although ..... if Terminals maybe had a 'Synchronize with DB' feature that just pulled the data once and treated it like an XML import then maybe that would be less time consuming to implement - no back-end redesign and connecting to MySQL / MSSQL from C# is fairly painless. 

Looking forward to V2.0!

Thanks for a great product


Oct 21, 2011 at 7:37 AM

I think this thread should be realized. I know it's not an easy task, but it could yield some fantastic results, solving a couple of issues that i have and i think others as well.

  • Shared connections: we (my company) use Terminals as a support tool with a shared config file, but this i not optimal as it creates problems when someone changes the favorites and everyone has to reload the application.
  • Shared/private favorites: It would be possible to have Terminals load the shared favorites and still have user specific favorites.
  • Shared/private passwords: same as the above.
  • Use read only a login for  people that shouldn't be able to change the favorites.

I really hope this makes the short list of things to include.


Oct 21, 2011 at 9:09 PM

Nice, it seems, that this feature should have highest priority for next version. Anyway we have to refactor the data layer, because of security and performance problems.

Nov 4, 2011 at 8:32 AM

Any news regarding the status of this request? Did you guys talk about it and if so did it make the list?


Nov 4, 2011 at 10:16 PM
Edited Nov 4, 2011 at 10:19 PM

I think we can slowly discuss the features of the database persistence. I am actually preparing the data layer together with other fixes.

Which database provider do you think we should use?



- MS SQL compact

- SQLite

- My SQL

Nov 7, 2011 at 8:35 AM

Hi jirkapok

I think that a combination of MS SQL CE and MS SQL would be optimal.

  • MS SQL CE (anything running on the local machine should CE, that way this can be done without extra installations on the machine):
  1. For the local connections. That way the user can set up "custom" connections to home servers or other servers they have explicit access to.
  2. The Credentials vault should be local as passwords to servers may vary from user to user.
  3. The settings for the app should be local to allow customization.
  • MS SQL:
  1. For the shared connections. These connections should have an option to be password protected (as admin shares).

Also the connection to the networked MS SQL for admin shares could have an option to syncronize with the MS SQL CE to allow users to "take the connections" with them. This should be an admin option as some admins might not want this.

Hope you can use the input. If you need guinea pig for testing, I'm available for it. also if you need some refactoring done.


Dec 6, 2011 at 8:47 AM

Hi jirkapok

Anything new on this one? I'm kinda sitting on my hands in expectation... :)



Dec 6, 2011 at 10:59 PM
Edited Dec 6, 2011 at 10:59 PM

Yes, i already start on refactoring, which as a side effect will prepare this feature. But currently this feature isn't planed for current release.

Feb 27, 2012 at 10:05 PM

Hmm, gotta ask again... Anything new? Nearly 3 month with no news and i so hope the annoyance i have nearly every day when different people changes the config files from their local machines and freezes up everyone else... The temporary solution to my problem was locking the access to the file to readonly on the AD level so only I have write access, but not a good solution for the long run... :(


So, the question is... When can i start the testdrive of your new datalayer? I'll try any alpha version you have...


Feb 29, 2012 at 7:36 PM

Thank you for your attention. I will be happy to really see someone testing the database feature. You have to understand, that it is not a simple task.

But anyway i am expecting to provide working solution until May. If you check the source code check-ins you can notice that Favorites, groups, credentials and history are prepared. The missing parts now are only the configuration, concurrent updates and updating passwords.

Mar 1, 2012 at 10:12 PM

I created feature request nr. 32339, which was missing: http://terminals.codeplex.com/workitem/32339

Watch the progress there.

Mar 11, 2012 at 12:24 PM

Because the security will be required to prevent concurrent updates only by required persons, we have to discuss access rights management.
My proposals are:

  • First implement database access with full control for all authenticated users
  • Later implement simple rights management which will be based on two kind of groups, one for read only access, second with read/write access


 Any other requirements?

Mar 11, 2012 at 8:18 PM

I think that for starters that sounds alright, then we can evaluate the need for any alterations along the way. It sounds like the idea with groups is adequate for the purpose we are talking about. :)

But like I said, we can adjust along the way...

Apr 12, 2012 at 9:42 PM
Edited Apr 12, 2012 at 9:43 PM

I noticed small point to discussion. The favorites contain their icons. It means, that there are not only connection properties, but also appearance property. I think, that like tool bar buttons, icon should be stored together with other application options. Why such small thing?
When implementing SQL persistence, the store will be shared and the icons paths pointing to local path wouldn't appear. But if the icons are local option, than in a team the same connection will look different.

Where should we place connection favorite icon? To the application option or to the data (favorite)?

Apr 13, 2012 at 6:10 PM
Edited Apr 13, 2012 at 6:56 PM

I would vote for the favorite. The icons have very small footprints so it shouldn't be a problem to store them as either a serialized object or as a blob. I like the idea that the icons can be "standard" delivered and the same for everyone using the same setup.

I'm really looking forward to testing this. The latest check in looks promising. Are we still looking at a may for a release or will there be an early trial run for the few lucky ones?

Apr 13, 2012 at 10:45 PM
Edited Apr 13, 2012 at 10:46 PM

Check the associated feature request. There are only two things pending on the persistence: The icons store and the concurrent updates. All other stuff is prepared. I am expecting first to introduce testing version only, because the is a large number of changes, which have to be tested.
And remember side effect: the UAC is gone.

Apr 14, 2012 at 2:34 PM

I did indeed check it out. Been following the checkins as they come and am very excited to see the result, been following the changes and can't wait for the testing version. Again, if there's any way to contribute let me know.

Apr 14, 2012 at 5:20 PM

If you want to contribute, then contact Rob, he will give you rights. Or create a patch from SVN and publish it on source code site.

But most of all i need help with testing.

Apr 14, 2012 at 5:24 PM

I'll look at the patches and let me know when and what to test and I'll jump right on it... :)

Apr 14, 2012 at 6:08 PM

Almi the data layer is completely refactored, so it has to be tested from all points you can imagine. First start with the upgrade from last release,

than test all features with current file persistence and then activate the sql persistence, configure it in options and you can start with over all testing in GUI.

There are unit tests, all passed, but it doesn't have to mean, that all still works.

Simply it will help to have tester who thinks about what he is checking. Try to kill the app :-)

Apr 15, 2012 at 9:41 PM

I've run into some problems while activating the SQL persistance layer. When i uncomment it in code and it tries to create a new instance it hits a snag where it tries to access the settings for the instance while in the process of configuring it. To be more specific it's in passwordfunctions.cs line 23 where it tries to decrypt the password, and to do that it tries to access the persistance instance to get the security keymaterial.

Have you fixed this issue already or should I work around it?

Apr 17, 2012 at 5:32 PM


you killed my implementation. :-)
You have found problem "What was first, Hen or egg?".

Thats not easy to solve, i have to think about it, there is currently no workaround.
The problem is, that the connection string is encrypted by masterpassword, but i try to obtain it from persistence, which needs in this case the connection string.
So i am not able to obtain connection string without masterpassword and i am not able to obtain masterpassword without connection string.
Why the masterpassword is in database? Because if i want to share encrypted passwords, they have to be encrypted by shared key and user has to authenticate to obtain them.

Any proposal, how to solve this?

Apr 18, 2012 at 6:49 PM
Edited Apr 18, 2012 at 6:49 PM

The issue is now solved, you have to be able to enable the persistence for development purposes.

Apr 20, 2012 at 7:11 PM

That issue seems fixed, but i ran into  couple of other ones:

  • When starting up the program it tries to move the config files if they where in the wrong place. This is fine, however since no initialization of the persistence layer has yet been performed the StartDelayedUpdate() in the SqlPersistance fails since the database is null.

          My idea: Either the move method should be moved or the initialization should be performed first and not with the mainform.

  • The Entity model didn't load the related objects, so I tried disabling lazy loading but that didn't do much good. In the implementation of you factory you use a different method than what I'm used to but I'm not sure that's why. The error I get is when in FillFavoriteSecurity() in NewTerminalForm. When trying to set the credentials the Favorite.Security item isn't attached to the object context and fails.

          My idea: Create the Favorite object from the context, detach it and when the item is "ready" to be saved, then reattach it and save it.

Apr 23, 2012 at 8:06 PM

again, what was first? OK, i have to look at the startup sequence. Hold on, we are closer and closer ...

May 12, 2012 at 12:37 AM

- There should be no updated when SqlPersistence is enabled. But we have that keep in mind.

- There was a bug in creating of favorite. The database is now configured.

With current state you should be able to import favorites from file or create new one.

May 12, 2012 at 11:32 AM

There seems to be missing some files in your commits. The Entity framework model (.edmx), the IPersistence, sqlpersistence and filepersistence doesn't get pulled from the SVN but are added to the project. I think you need to check for missing files. You could try to pull the files to a new folder and open the solution. That should give you a good overview of the problem. :)

May 12, 2012 at 2:48 PM

if you browse the sources directly in Codeplex web interface, you will see the files. It seems, that the solution is build able. The files you listed are long time theree and already have long history. Try to force replace all files in your source control client.

Jun 18, 2012 at 5:59 PM

Hi Guys,

Excellent work on Terminals, I've used it for years and am really looking forward to building and deploying the SQL version. How far along do you think everything is ? I had a look at the features for the SQL build and most are complete but I guess there must be some tricky issues to get it 'finished' - nothing's ever easy when you try and put stuff into production!

Is it beta-testing? I'm no good at writing unit tests but I can compile and test by pushing buttons / running it through VS2010 and checking it behaves ? 

Thanks again,

Jun 19, 2012 at 8:48 PM

The missing features to get it done are described in the request:

- concurrent updates
- automatic refresh from server
-  change the database password

The answer is simple, i didn't have resource to write the rest. To test the feature, there are unit test in Test project, which you can run from VS. But if you want to run Terminals version with this feature enabled, you have to enable it in code of Persistence class.