Topic
6 replies Latest Post - ‏2013-01-23T14:14:13Z by Bart.VanCampenhout_ASIST
Bart.VanCampenhout_ASIST
5 Posts
ACCEPTED ANSWER

Pinned topic Update database connection when RDz is shut down

‏2013-01-14T15:47:20Z |
Hello,

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:

RemoteConfigurationFiles\global\com.ibm.ftt.database.configurations.databaseconfigurationfile\databaseconfig.xml
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 ?
Updated on 2013-01-23T14:14:13Z at 2013-01-23T14:14:13Z by Bart.VanCampenhout_ASIST
  • SystemAdmin
    SystemAdmin
    1086 Posts
    ACCEPTED ANSWER

    Re: Update database connection when RDz is shut down

    ‏2013-01-14T16:26:50Z  in response to Bart.VanCampenhout_ASIST
    The 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.
    • Bart.VanCampenhout_ASIST
      5 Posts
      ACCEPTED ANSWER

      Re: Update database connection when RDz is shut down

      ‏2013-01-15T11:37:32Z  in response to SystemAdmin
      Hmm.. the mystery is unresolved for now.
      Thx for your feedback. I'll be searching on myself.
      • SystemAdmin
        SystemAdmin
        1086 Posts
        ACCEPTED ANSWER

        Re: Update database connection when RDz is shut down

        ‏2013-01-18T09:35:44Z  in response to Bart.VanCampenhout_ASIST
        Hello 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
        <USERNAME>
        test1234
        </USERNAME>

        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,
        Olivier
        • Bart.VanCampenhout_ASIST
          5 Posts
          ACCEPTED ANSWER

          Re: Update database connection when RDz is shut down

          ‏2013-01-21T10:24:41Z  in response to SystemAdmin
          Hello, 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) ?
          • SystemAdmin
            SystemAdmin
            1086 Posts
            ACCEPTED ANSWER

            Re: Update database connection when RDz is shut down

            ‏2013-01-22T13:50:41Z  in response to Bart.VanCampenhout_ASIST
            Hi 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.
            • Bart.VanCampenhout_ASIST
              5 Posts
              ACCEPTED ANSWER

              Re: Update database connection when RDz is shut down

              ‏2013-01-23T14:14:13Z  in response to SystemAdmin
              Hi, 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.