I think I've asked this before but can't find it. I did find a 5-year old thread about adding the ability to change passwords for multiple connections but that doesn't seem to be available.
Is there a way to update passwords by command line? Or to drop/create a connection from the command line?
I have hundreds of connections and every time I change my password I have to touch every one of them. I need a script for this. I'm sure there are others who have thousands of connections to manage.
In the DbVisualizer UI select the database connections you want to change the password (or other settings) and then right-click in the Database tab and select Edit Database Connections. That will open window showing all fields that are commonly available for the selected database connections, by database type. Since for example Password is available for all connections you will manage to change that in a single edit for multiple connections.
I hope this is what you are looking for.
That doesn't work.
If you select database connections only it will work. You can click the first in a list and then shift-click the last in a list, and, if the entire list is all in the same folder then it will work.
The problem is, I think most people who use DbVis would agree, that most people take advantage of the feature that allows us to group our connections into folders. The shift-click feature will select across multiple folders but it selects the folder item in the tree as well as the connection items in the tree. I assume because there are multiple object types selected, when you select this way then the "Edit Database Connections..." menu option is disabled.
So, with the options provided, you have to repeat the process for each folder in your tree or you have to manually ctrl-click each connection (perhaps hundreds or thousands) to select the connections across folders without actually selecting the folders.
This is an oft-mentioned gap in the features of DbVis over many years. There really should be a way to create/delete/update a connection through available APIs. I'll add a feature request and hope that this gets solved sometime.
In the mean time, the best workaround that actually will work, but still takes manual intervention in the GUI, is this:
So once you know the solution is to change one connection so you can get a valid encrypted base64 value for your new password and you can globally find/replace, you have a lot of scripting options on how to apply the replacement password or you might find that, though not ideal (ideal would be an API call) all the scripting is not worth the trouble and just use your favorite text editor's global search/replace function manually)
I just did exactly what Dale did on some 150 connections. For me, the multi-connection select was a godsend for picking out the initial connections to change the user and password (I just control-clicked any folders to remove them from the select). Then I easily updated dbvis.xml when my password changed. It may not be perfect but at least you don't have to update each one by hand.
So if we offered an improved way of selecting what connections to multi edit, it would be sufficient?
It would be a help but I don't understand the reluctance to just add the APIs.
I already have my connections divided into two main folders, one for those with my account and one for those with service accounts. Under each are dozens more folders. If I did a multi-select across folders and it didn't select the folders themselves, or if the app still enabled the edit connections option but was smart enough to just signore the folders when editing connections, that would certainly help.
This is a pretty restrictive solution as it requires a structure similar to what I have, requiring that your folders group connection by user ID rather than by any other functional or business purpose the user might prefer.
For the record, I am not sure that any other SQL tool manages this any better than DbVis but I don't use those tools; I use this one.
We are not reluctant to add APIs, I haven't said so either.
We do have a multi connection edit capability available which is helpful for most users. Adding an API would attract a very small number of users (since it requires coding) while having it in the GUI gives a much easier way to accomplish these tasks. This is the reason I am trying to figure out what you are looking for, in order to hopefully adjust the current functionality to allow the requested functionality.
So if I understand you correct, you have two top level folders containing a lot of sub folders and database connections? You then want to change the passwords for all database connections for one of the top level folders?
Yes, I have two folders. Changing all connections under the top level folder would work for me.
Great. One more idea is to offer so that you can specify the old password and DbVisualizer will automatically scope all matching database connections in the multi connections edit?
Since the encryption does not appear to use a random salt, it would be easy to update all those with the same password. Hopefully people aren't using the same password across multiple accounts because that would break things.
What about asking for account name and password?
Thanks. I was just thinking of having that (additional) way to select the database connections in effect. I am as you say quite sure that technique is not very useful for the majority of users.
Just to inform that we have released a beta version of the upcoming DbVisualizer 11.0 which makes it easier to scope and search for database connection in order to perform multi-edits such as changing passwords.
Would be great to get your feedback on the new version.