I have an application that I can't get connected to my Oracle Database 11g Express Edition. I created a test database in this edition, and I can connect to the database fine using Oracle SQL Developer, create tables, views etc. However, I'm having a hard time getting connected via my application. Where is the connection information? In what file? I wanted to compare my connection info with what is set up in the SQL Explorer's file. I found all the *.ora files and renamed them to see if I could find what file (through the process of elimination) the connections were stored in, but I wasn't successful. Any help would be appreciated.
13 Answers
Assuming you have lost these while upgrading versions like I did, follow these steps to restore:
- Open SQL Developer
- Right click on Connections
- Chose Import Connections...
- Click Browse (should open to your SQL Developer directory)
- Drill down to "systemx.x.xx.xx" (replace x's with your previous version of SQL Developer)
- 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)
- select connections.xml and click open
You should then see the list of connections that will be imported
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.
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.