OracleSQLDeveloper 在哪里存储连接?

我有一个应用程序,我不能得到连接到我的 Oracle 数据库11g 速成版。我在这个版本中创建了一个测试数据库,我可以使用 Oracle SQL Developer 连接到数据库,创建表、视图等等。然而,我很难通过我的应用程序连接。连接信息在哪里?什么档案?我想将我的连接信息与 SQLExplorer 文件中设置的内容进行比较。* I found all the * .然后重命名它们,看看能否找到连接存储在哪个文件(通过消除的过程) ,但是我没有成功。如果你能帮忙,我将不胜感激。

269722 次浏览

It is stored in a file called connections.xml under

\Users\[User]\AppData\Roaming\SQL Developer\System\

When I renamed the file, all my connection info went away. I renamed it back, and it all came back. When I viewed the XML file, I found both test connection aliases, ports, usernames, roles, authentication types, etc.

In some versions, it stores it under

<installed path>\system\oracle.jdeveloper.db.connection.11.1.1.0.11.42.44
\IDEConnections.xml

If you don't find the connections.xml then right-click on Connections in the Connections view of SQLDeveloper, and choose Export connections.

Assuming you have lost these while upgrading versions like I did, follow these steps to restore:

  1. Open SQL Developer
  2. Right click on Connections
  3. Chose Import Connections...
  4. Click Browse (should open to your SQL Developer directory)
  5. Drill down to "systemx.x.xx.xx" (replace x's with your previous version of SQL Developer)
  6. Find and drill into a folder that has ".db.connection." in it (for me, it was in o.jdeveloper.db.connection.11.1.1.4.37.59.48)
  7. select connections.xml and click open

You should then see the list of connections that will be imported

It was in a slightly different location for me than those listed above

\Users\[user]\AppData\Roaming\SQL Developer\system3.2.20.09.87\o.jdeveloper.db.connection.11.1.1.4.37.59.48\connections.xml

I found mine in

C:\Users\<user>\AppData\Roaming\SQL Developer\system2.1.1.64.45\o.jdeveloper.db.connection.11.1.1.2.36.55.30\connections.xml

SqlDeveloper stores all the connections in a file named

connections.xml

In windows XP you can find the file in location

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

In Windows 7 you will find it in location

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

If you have previously installed SQL Developer then it will store the connection details in the 'connection.xml' which will be located in below mentioned path.

C:\Users\Username\AppData\Roaming\SQL Developer\system3.1.07.42\o.jdeveloper.db.connection.11.1.1.4.37.59.48

Once you get that 'connection.xml' try to import it into SQLDeveloper by right clicking to CONNECTIONS.

For OS X my connection.xml files are in

/Users/<username>/.sqldeveloper/system<sqldeveloper_version>/o.jdeveloper.db.connection.<oracle_version?>/

In a simpler way open search window and search for connection.xml gives a right click on that file and select open file/folder location. Once you get that connection.xml try to import it into SQLDeveloper by right clicking to CONNECTIONS.

On linux systems:

~/.sqldeveloper/system<sqldeveloper_version>/o.jdeveloper.db.connection/connections.xml

With SQLDeveloper v19.1.0 on Windows, I found this as a JSON file in

C:\Users\<username>\AppData\Roaming\SQL Developer\system<versionNumber>\o.jdeveloper.db.connection

The file name is connections.json

for macOS

/Users/joseluisbz/.sqldeveloper/system18.1.0.095.1630/o.jdeveloper.db.connection/connections.xml

To recover your password, locate the product_preferences.xml file in the following location:

C:\Users[username]\AppData\Roaming\SQL Developer\system*\o.sqldeveloper\product-preferences.xml

Then, search for the string db.system.id and copy the value of the v attribute. That is your decryption key to use when you are prompted to enter your decryption key on the Password Handling panel during the import processing on SQL Developer.