Where does Oracle SQL Developer store connections? - oracle

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.

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

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

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

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

For OS X my connection.xml files are in
/Users/<username>/.sqldeveloper/system<sqldeveloper_version>/o.jdeveloper.db.connection.<oracle_version?>/

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

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

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

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 macOS
/Users/joseluisbz/.sqldeveloper/system18.1.0.095.1630/o.jdeveloper.db.connection/connections.xml

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.

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.

On linux systems:
~/.sqldeveloper/system<sqldeveloper_version>/o.jdeveloper.db.connection/connections.xml

Related

How to prevent Oracle SQL Developer from creating the product.conf file in %APPDATA%

In 2022, the question asked in how-to-prevent-oracle-sql-developer-from-writing-to-appdata-roaming is still a bit of a problem. While the -Dide.user.dir option does allow you to move the SQL Developer directory from %APPDATA%, the application still creates a sqldeveloper directory in %APPDATA% that contains a <version>/product.conf file.
What option needs to be added to move this directory as well? I am using version 21.4.3 of SQL Developer. Thanks in advance for any help you all can offer.
You need to convince SQL Developer that it's not actually running on Windows, but is instead on Linux or a Mac.
Otherwise, SQL Developer is designed to do EXACTLY as you describe/observe.
The -Dide.user.dir doesn't let you move those files per se, it more accurately allows you to mirror them somewhere else.

Saving worksheets in SQL Developer

I recently migrated to the most recent version of SQL Developer and I've run into a problem I can't remember how to solve. I like to save all my worksheets and SQL Developer used to provide a default filename based on the connection name. Now, the file save dialog is just blank. Does anyone know how to configured SQL Developer so it provides the filename again? Thanks!
I'm still seeing that behavior in version 18.3 on my Mac.
Connection name is 'HR'
SQL Worksheet
File - Save
Defaults filename to HR.sql
I don't see any preferences that would affect this behavior. What does it default the filename to, untitled? Are you sure your worksheet has a connection attached? If so, what's your connection name? And what version of SQL Developer, Java, and OS are you running?
I figured out that the version I was running was very old. I upgraded to the latest and greatest version and that solved the problem. Thanks for the reply!!

Installing and creating instance of SQL Server 2012

I am running SQLManagementStudio_x86_2012_ENU.exe to install SQL Server 2012. I came across a problem and I was hunged on it too long.
I have seen the same problem in SO and they are give a solution for that. I also over come that problem but again stuck again in half way through. So I am going to ask this again(not a spam)
Problem: When I ran above mentioned exe it was installed fine, Then I tried to create a instance of the server. I used SQL Server Installation Center in configuration tools. then I selected new SQL Server and it asks me to select the SQL Server Installation Media. I selected C:\Program Files (x86)\Microsoft SQL Server but it was invalied.
then I figured out that it is asking for the Installation media itself. So I extracted the .exe file to a folder and selected that path. that was taken as a valid media.
I refered to this link.
some have mentioned that this was a bug here.
when I clicked next it gives the following error. so that I can not proceed and create a instance. Can some one help me on this.
thanks in advance.
I have tried lot of things to come up with a solution for this. As you can see in the picture, there are only 2 check boxes which are already checked and disabled. This is not the right .exe file to run(I was unable to create a server instance using this). I downloaded the right SQL server installation file from here.
There are several .exe files that gives different functionality enhancements. I chose SQL server with tools which is about 1GB. I did not have to uninstall the existing sql server installation. I installed this and it worked fine. I will post back if I found a way to create a SQL server form the given installation. If you have the same problem as described above, most probably you are using the wrong .exe file.
Good luck with your fix.

SQL Developer - No readers registered for SQL type error

I am using Oracle 11g. I had exported data using the installed version of SQL Developer to a sql file called "export.sql". Now, I have downloaded the new version which is 3.1.07 and when I try to import data by clicking on the tree view and choosing Tables | Import Data and navigating to "export.sql", I get the following error:
no readers are registered for the sql type
When I first started the application it asked for the path to java.exe and I have shown that path and application started. I have the started the application from the path where it was downloaded (C:\users\kaushik\Downloads\sqldeveloper)
You can call the file directly from sql developer.
Example: If you saved you file to c:\Oracle\MyBackups\Export.sql
Then from within Sql Developer, connect to your database and use the sql command:
#C:\Oracle\MyBackups\Export.sql
and that will execute the Export.Sql script.
If you have a valid SQL file, you simply need to execute the script. Open the file (File | Open and navigate to export.sql), hit the Run Script button (F5 on Windows), and choose the connection you want to use. The Data Import Wizard supports a number of different file formats (Excel, CSV, etc.). It doesn't support SQL files. If you want to ask the developers why they don't support SQL (or why they use the general file navigation dialog rather than using different dialogs for different sorts of files) you can ask them over in the SQL Developer forum on OTN. I assume the problem is that most SQL scripts contain much more than simple INSERT statements and it would be challenging to figure out whether any particular script was actually just a bunch of INSERT statements that could be used to import data.
Yes, SQL Developer is written in Java so you need to have an appropriate version of the JVM installed. Different SQL Developer download options include a bundled JVM or you can download a smaller file and use an already installed JVM.
One of oracle client tools to make session to database is sqlDeveloper and its graphical interface tool Programmed with Java Lang and its installed independently from oracle_home its a stand alone product and Of Course it needs SDK Or JDK to work
make sure to set the path and check it
read this link http://www.ehow.com/how_5127784_set-java-path.html
all of this if sql developer didn't run and other similar problem
this to answer
Is JDK is needed or what ? Yes
use sql Developer higher version
i am upgraded to Version 20.2.0.175
issue resolved

Oracle Home for Visual Studio

Okay. Forgive me, but I'm going to vent a little here. Visual Studio doesn't recognize my TNSnames for oracle so I can't connect to my database. I believe the problem is that I have multiple homes on my machine, one for me (In C:/app/{UserName}/product/11.1.0) and one general one which was already installed on my machine (In C:/oracle/product/11.1.0) and I don't have access to. I don't know why they can't just giv eme rights to my machine (Its not like I would abuse that power, but rather user it to cut hinderences like not being able to edit your freaking TNSNames file).
Anyway. I need to know if there is a way to change my oracle home for visual studio. I edited my PATH variable in the terminal to point first to MY oracle home (C:/app/...) but that didn't work. So is there another way to change the oracle home for visual studio so I can connect to my database. (Maybe in the .vssettings file???)
Thanks for your support. You guys here at stackoverflow are a great community and I am extremely appreciative of your assistance.
-Matt
You don't need to change your Oracle HOME directory. Just make sure there's a tnsnames.ora file in the current HOME directory (the one pointed to by the system PATH) with the propery connection settings. Here's a blog post that walks through the entire process of connecting to Oracle in Visual Studio.
If you have the ability to set a user environment variable, then try setting the variable TNS_ADMIN to a directory where you can create files. Just edit a copy of the current tnsnames.ora so that it contains the entry you need, and place it in the directory pointed at by TNS_ADMIN.

Resources