Satyendra
Satyendra

Reputation: 1705

How to take a backup for the 'connection details' in sqldeveloper?

What is the process to take a backup of all the connection-details (viz. host,port,sid,etc.) in 'oracle sqldeveloper' software.
How can we import these connection details to some other machine ?

Upvotes: 49

Views: 125255

Answers (6)

Satyendra
Satyendra

Reputation: 1705

The 'oracle sqldeveloper' stores all the connection details in an xml file ie. connections.xml.
If you want to have a backup for the connection details, you will have to navigate to

In Windows 7 / 10

C:\Users\<YourUserName>\AppData\Roaming\SQL Developer\systemX.X.X.X.X\o.jdeveloper.db.connection.X.X.X.X.X.X.X\

In old windows XP

C:\Documents and Settings\<YourUserName>\Application Data\SQL Developer\systemX.X.X.X.X\o.jdeveloper.db.connection.X.X.X.X.X.X.X\

and take a backup of connections.xml .

Later, if you need to use the same connections on some other machine, you may simply copy the <Reference ...> tags for respective connections.

PS : Careful, your password are NOT included.

Upvotes: 44

John S
John S

Reputation: 21492

Do to unfortunate circumstances, a new Windows profile was set up for me so I lost all my database connections. Fortunately, my old profile folder had been saved under a different name before the new one was set up.

I was able to use the information from two of the above answers and this post to import my connections with passwords.

Steps:

When in SQL Developer, I right-clicked on "Connections" and chose "Import Connections..." as per the answer by @AniketThakur.

I selected the connections.xml file from my old profile. I found it using the answer by @Satyendra.

The Import dialog gives the choice of discarding passwords or entering the key that was used to encrypt them. This is where this post helped. I found the key by searching under the \systemX.X.X.X.X\ folder for a file named product-preferences.xml. Inside that file I searched for an element that looked like:

<value n="db.system.id" v="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"/>

It appears the v value is the key that is needed to decrypt the passwords.

Note: The product-preferences.xml file was under:

\systemX.X.X.X.X\o.sqldeveloper\

Upvotes: 3

Padmanabh Rudrawar
Padmanabh Rudrawar

Reputation: 1

(I am using Oracle SQL developer) 1) Go to View -> Connections 2) Right click on Connections -> Export Connections 3) Select the connections that you wish to export. Click Next. 3) Provide name to the file. Say export.xml (Sometimes you need to create a .xml file in some folder and then choose this file using Browse option) 4) If you wish to keep the passwords Saved in the xml file then choose "Encrypt all passwords with a key". Provide Encryption key. This will be used whenever you import the connections. If passwords are not needed to be exported with the xml file then choose the other option "Remove all passwords from the exported connections" 5) Before clicking on Finish , see the destination of the xml file that is created.

To import the Connections, follow the similar procedure.

:)

Upvotes: -1

Girdhar Singh Rathore
Girdhar Singh Rathore

Reputation: 5615

Step 1. Right click on connections and choose the Export Connections.

enter image description here

Step 2. In the File Name sections provide the name of connections file you want to save at your local computer. and click OK. your connections xml file will be saved at your provided location.

enter image description here

NOTE: To import the connections in your sql developer choose the Import Connections..

Upvotes: 27

rudrasiva86
rudrasiva86

Reputation: 583

This link Migrating Oracle SQL Developer Connections with Passwords provides a much better way to do it.

Upvotes: 9

Aniket Thakur
Aniket Thakur

Reputation: 68985

From Sql developer you can export the connections and then easily import them

  1. Right click connection.
  2. Select Export
  3. Browse to provide it a xml file path to export connection. Select Ok.
  4. Click Import in connections similarly to export.
  5. Select the xml file and all your connections should be imported.

Note : If you are using Connection type as TNS and providing alais then you will have to export tnsnames.ora file separately. Then provide it to sql developer using

Tools -> Preferences -> Database -> Advanced -> Tnsnames directory

Upvotes: 31

Related Questions