I'm trying to update an existing DB connection when RDz is down.
Through search I found that the following file (in workspace directory) stores the details for the database connection:
However, when I change for example the userid in this file, start RDz again, and try to connect to the database, the change is not taken into account.
If I change the userid in RDz itself, the change is written in the databaseconfig.xml file.
It seems to me that some sort of cache is always restoring the old data first.
Is there someone who can confirm the "cache"-idea ?
Or even better: Does anyone know how the force a different userid to an existing connection ?
This topic has been locked.
6 replies Latest Post - 2013-01-23T14:14:13Z by Bart.VanCampenhout_ASIST
Pinned topic Update database connection when RDz is shut down
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-23T14:14:13Z at 2013-01-23T14:14:13Z by Bart.VanCampenhout_ASIST
Re: Update database connection when RDz is shut down2013-01-14T16:26:50Z in response to Bart.VanCampenhout_ASISTThe information is read from another place. If I create a new workspace, I notice that I already have the connections defined, so I think it is not related to the info stored under my workspace directory.
I do not kwnow which is the other place, but sometimes I found that when using DB2 Connect prior to install RDz all of the connections created with DB2 Connect already appeared defined in the Database explorer view.
Re: Update database connection when RDz is shut down2013-01-18T09:35:44Z in response to Bart.VanCampenhout_ASISTHello Bart,
Data tooling is not coming from RDz but from Eclipse DTP project. This means you need to search for metadata in <workspace>\.metadata\.plugins\org.eclipse.datatools.*
What you have found in RemoteConfigurationFiles is the RDz push-to-client which is the recommended way in RDz to manage workspace configuration. When using push-to-client, you can create DB connection with a specific username. The file to modify is databaseconfig.xml
But you need to copy it to the host under pushtoclient directory. Next connect from RDz client will download it into RemoteConfigurationFiles and update the configured Database connections in your workspace.
The DTP config is stored encrypted in .metadata\.plugins\org.eclipse.datatools.connectivity\ServerProfiles.dat
You can export it decrypted to an XML file from the Data Source Explorer view.
You can import it as well from there.
I am not aware of a script (Ant) mechanism to import it in headless mode.
Hope that helps,
Re: Update database connection when RDz is shut down2013-01-21T10:24:41Z in response to SystemAdminHello, Olivier,
this is very helpful.
About Push to client, I am wondering though: In your example, can the hardcoded username "test1234" be replaced by a system variable that represents the user that is currently logging on (to Push To Client) ?
Re: Update database connection when RDz is shut down2013-01-22T13:50:41Z in response to Bart.VanCampenhout_ASISTHi Bart,
Unfortunately the name is indeed static. You cannot replace it with a variable.
That's the RFE mentioned in our emails. The other suggestion is to leave it blank so that users will be forced to fill it when they will try a connection from Data perspective.
Re: Update database connection when RDz is shut down2013-01-23T14:14:13Z in response to SystemAdminHi, Olivier,
thanks for the update.
For your information, I've created a custom workaround.
I've written an eclipse plugin that will manage automatic updates of the connection properties.
This is done using the API provided by the datatools project.