0

My Python script updates Oracle passwords regularly using the command alter user my_user identified by "new_password" replace "old_password" Now I need to update these passwords in the SQL Developer connection definitions. I have looked all over my Windows 7 machine but nowhere can I find Connections.xml, nor IDEConnections.xml. And if so, the passwords would be encrypted.

Can anybody automate password updates for SQL Developer?

2 Answers 2

1

The file is called connections.xml and on Windows is located in:

"%appdata%\Roaming\SQL Developer\system<some-numbers>\o.jdeveloper.db.connection.<some-other-numbers>\connections.xml"

For example:

C:\Users\XXX\AppData\Roaming\SQL Developer\system3.2.20.09.87\o.jdeveloper.db.connection.11.1.1.4.37.59.48\connections.xml

There you will find entities like this:

<Reference name="XXXXXXX" className="oracle.jdeveloper.db.adapter.DatabaseProvider" xmlns="">
  <Factory className="oracle.jdeveloper.db.adapter.DatabaseProviderFactory"/>
  <RefAddresses>
    ...
    <StringRefAddr addrType="ConnName">
        <Contents>MY DATABASE</Contents>
     </StringRefAddr>
     <StringRefAddr addrType="customUrl">
        <Contents>jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521:service_name</Contents>
     </StringRefAddr>
     <StringRefAddr addrType="password">
        <Contents>0540C826BDC964bFF7C1E309587AAA35D53B34ACAC8A595A52</Contents>
     </StringRefAddr>
  </RefAddresses>

The hash is DES cipher - some examples here: https://stackoverflow.com/a/18021526/9655177. It is a decryption example, but you can reverse it.

Sign up to request clarification or add additional context in comments.

2 Comments

Robertus, as I said, there is no file "Connections.xml" on my Windows 7 workstation. The path you provided fails on the "system<vers no> directory. I did find a file C:\Users\wmetzner01\AppData\Roaming\sqldeveloper\4.1.5\product.conf it looks like a configuration file; however, all text lines are commented with hash (#). Thanks @robertus
oh, I found the connections.xml and the product-preferences.xml files on my workstation; they are hidden system files. THANKS. Now I need to figure out the encryption that SQL Developer 4.1.5 uses.
0

Robertus post pointed me in the right direction as to the location of the relevant configuration files; however, the password encryption is not solved yet. Re-opening a new question.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.