On a Windows server 2016, we have an Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production running.
The goal is to have an external table created with a "preprocessor" command, triggering a batch file that will retrieve file infos like file size, date, name, with a "DIR" cmd.
We followed the steps described in this link: http://www.oracle-developer.net/display.php?id=513, we did exactly the same.
On another server owned by us, this is working directly.
On this Windows server 2016, the select statement on the external table returns no records. Absolutely no error created, only a logfile for the external table, which says not much.
The locations were the different files are stored are accessible for the OS-user Oracle. Oracle is able to read, "browse" through this paths and directories.
But the batch seems not executed.
What are we missing?
Thanks!
for the moment, I've found a workaround:
. I checked that I could execute a batch via "dbms_scheduler.create_job". Funny enough, it is the same (more or less) and in the same place as the one supposed the be executed by the preprocessor command of the external table.
Now, I create dynamically a batch via UTL_FILE (this is matching my need), then execute it via "dbms_scheduler.create_job". This batch is sending the results in a txt file.
I have then an external table pointing to this txt file.
Everything runs in a small procedure, where I can catch errors and log steps if needed, so I should be happy with this.
Nevertheless, I would have loved to understand what was the issue with the external table + preprocessor command...
Unfortunately, colleagues did their procedure and did not make triggers and logs. Now I need to see the history of calls with params. I did not find anything in the system table v_$sql
Is it possible to view the history of procedure calls (with params) in system tables?
Since it's no longer in V$SQL, it was likely more than a couple days ago. But it may be available. Sit down with your colleague and ask which SQL editor they use. Many use SQL Developer or TOAD for Oracle. Do these in order:
Have them connect to the schema and hit F8. An "SQL History" window will pop up that will show the history of SQL that was executed with "Run SQL" or F9. It doesn't store SQL executed using "Run as Script" or F5. TOAD for Oracle also has SQL history.
If that doesn't work, have them navigate to:
C:\Users<user>\AppData\Roaming\SQL Developer\system<nn.n.n.nnn.nnnn>.history.
You'll find subdirectories in it with just numbers for names, 1 through 100 or more. These are XML files that have SQL not found in SQL History.
Just search the ".history" directory or look in the individual files by date. They have no extension but are text, so you can open them in a text editor.
If that fails, run a search of the whole drive with a search app that's better than Windows Search, like Agent Ransack or another. Search for a part of the procedure name, or even some of the code procedure code itself.
Hope this helps. Good luck.
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.
I need some assistance in configuring my oracle 11g database with the PL/SQL developer 14. I have installed and configured 11g client for my windows PC but the database is not show in the DBs list on PL/SQL 14 as:
But I got connected when I use PL/SQL Developer 7 as:
Actually, I want to use some advance features and plugins of PL/SQL Developer 14 which are not available in 7.
I don't use PL/SQL Developer.
However, any tool I know looks for available databases in TNSNAMES.ORA file. It looks as if version 7 "knows" its location, while version 14 doesn't.
If it (PL/SQL Developer) behaves like other Oracle-related software, then I'd suggest you to do this:
create a directory (folder), e.g. c:\oralib
put TNSNAMES.ORA file in there
create environment variable named TNS_ADMIN (uppercase!)
what does it do? It tells Oracle software where to search for TNSNAMES.ORA. Probably every Oracle software uses its own "copy" of TNSNAMES.ORA so - every time you have to work with a new database, you have to add its alias into ALL of those files (which is tedious). But, if you keep a single copy in a directory and let TNS_ADMIN point to it, you have only one TNSNAMES.ORA to maintain
set its value to path that leads to that directory: c:\oralib
restart PL/SQL Developer
hopefully, you'll see your databases
The problem has been solved. Actually, the issue was that the PL/SQL was 64 bit and the client was 32 bit that's why I had to download and install a 64 bit client which I installed and set the path to it's oci.dll file and that's solved my problem. One more thing I need to mention is that I have also created an environment variable for TNS_ADMIN and set the path to the folder which contains tnsnames.ora file.
Other answers are also appreciated.
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