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

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.

Related

Can't generate table from Oracle Designer 6i

a little background, I really don't know any technical terms from Oracle. My company have a pre built machine and I'm trying not having to go there backup my files and lose a day of job because I cant.
Recently I'm learning how to use Oracle Designer (6i) to build a diagram and later a table so I can request it to be created... While using the software it requested to install some file for the repository... after doing it, It screwed up every Oracle product I was using... I couldn't connect to PLSQL or even the designer...
After fixing some registry to point to the right TNSNAME and manually adjusting PLSQL, I managed to access both. The problem in hand is in oracle Designer at the "Designer Editor", when I right click a table and select generate, the message bellow shows up
Message
-------
CDD-23564: The file "C:\ORACLE\DSG6I\BIN\cds61.dll" could not be loaded or does not exist.
Cause
-----
The specified file or one its dependent files could not be loaded.
This may be because a file has not been installed, or is not
correctly defined in the system registry.
As an example dependency, the Forms Generator files require the
Form Builder files installed as part of Developer.
Action
------
Check the registry settings for the location of the required
file. Also check the product and any required dependencies
e.g.Developer have been installed correctly.
If necessary, try reinstalling.
The dll mentioned IS and EXISTS on the mentioned folder.
Considering I don't have the Oracle Developer 6i intaller, what can I do? What registry entry should I update?
Designer 6 is long out of support. Oracle has a free tool, SQL Developer Data Model, which does not break.
Even Designer 9i was flaky and would crash at random intervals and poke along with larger schemas. Anything over hundred tables could take days to edit. Ah, good times...
I managed to fix the problem by copying and replacing the whole ORACLE_HOME\DSG6I folder (in my case c:\Oracle\DSG6I, for those confused in terms like me) and the oracle system registry (regedit > HKEY_LOCAL_MACHINE\SOFTWARE\Oracle) from a coworker machine!

How can I completely uninstall oracle 11g?

How can I uninstall Oracle 11g from my laptop? The uninstall program that comes with the software doesn't completely uninstall all the components. I tried it with Oracle12c and it left a lot of programs. I tried to delete the files manually but some dll files in the BIN directory were are not accessible. I want to do the right thing with 11g. Any suggestions?
Thank you very much in advance.
There are some problems when I uninstall Oracle 11g (on Window 10) from my installed path "D:\app\" .This is my solution to remove oracle manually:
Delete D:\app{user}\product\11.2.0\dbhome_1
and all Oracle's files from D:\app\
If you can not delete these files, need to change the owner or add permissions
Properties>Security> Advanced> Change Owner> Advanced>Find now> Choose Users
Sometime you need to add permissions to Users: Properties>Security>Edit> Add Users> Allow ...
Delete C:\Program Files (x86)\Oracle, C:\Oracle
Delete C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Oracle -
OraDb11g_home1
Run regedit.exe>
delete HKEY_LOCAL_MACHINE/SOFTWARE/Oracle
delete HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ORACLE
Delete HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Ora*
Start Run>Computer Management> System Tools>Local Users and Groups> Delete
all Oracle's users and groups
Restart windows.
Hope helpful for you!
First of all you should use the deinstall tool as recommended by Oracle.
Then if this fails have a look at this document: Manually Removing the Remaining Oracle Database Client Components (11.1), it provides detailed instruction how to remove everthing.
This documentation is for Oracle Client 11.1, however the principle should be the same for 12c. Actually the documentation for 10.2 is even more complete: Manually Removing the Remaining Oracle Database Client Components (10.2)
Perhaps some files are locked and you can not delete them by default, for example file oci.dll. Solution is to rename the file, e.g. oci.dll_x and then reboot your PC. After reboot you can delete the file.
Note, in case you installed 32-bit Oracle the Registry key is HKLM\SOFTWARE\Wow6432Node\ORACLE\... instead of HKLM\SOFTWARE\ORACLE\...
Before deinstalling oracle software, make sure you have deleted the oracle databases (and other services) running from the ORACLE_HOME
I have written about the different methods in which you can remove Oracle software from Linux server:
Using deinstallation tool with runInstaller
Using deinstallation tool under ORACLE_HOME
Manual Oracle uninstall

View recent files in Management Studio

I trying to find a SQL script that a former colleague of mine used to run periodically. His instructions are to log onto his machine and go to his recent files and select the file.
He doesnt remember where the file physically exists as every time he runs it he would open the file via this method.
My question is how do I access this list? Problem is we wiped his machine and made a copy of his HD. ive tried navigating to \USERS\Application Data\Microsoft\Microsoft SQL Server\100\Tools\Shell\ but there is nothing obvious I can use here.
Appreciate your comments.
I believe this is tracked in the in the following location (depending on your version of SQL) in the registry
HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\11.0\FileMRUList
[Edit] On a side note, rather than looking for this recent list I would use a grep tool like textcrawler (free, and awesome) to search for a particular string (presumably you remember some sprocs that are called or tables that are accessed by the script) within all .sql files on the hard disk.
In SSMS version 18, the registry path to the recent file list is:
HKEY_CURRENT_USER\Software\Microsoft\SQL Server Management Studio\18.0_IsoShell\MRUItems{01235aad-8f1b-429f-9d02-61a0101ea275}\Items
Keep in mind, you must restart SSMS for any changes to take effect.

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.

Is there an easy way to backup Oracle SQL Developer's User Snippets?

I love Oracle SQL Developer so I find myself using it a lot to complete my daily tasks. The thing is that my collection of custom snippets only keeps growing so I though it'd be interesting to learn how to backup them.
Before asking blindly I did a bit of work trying to figure out how. I've performed a search within the application's folder by "snippet" and found the following file:
oracle.sqldeveloper.snippet.jar
which quite probably contains my beloved pieces of code. I could just save that file hoping the best, but why not doing it the right way and perhaps being able to, say, only backup the ones and I've created, avoiding the ones that came out-of-the-box, et cétera?
Any suggestion would be really appreciated!
On my WinXP machine, I found my User Snippets at:
C:\Documents and Settings\eddie\Application Data\SQL Developer\UserSnippets.xml
PS: Replace eddie with your username.
Agreeing with Eddie Awad, just copy the xml file. And for windows7 the sqldeveloper User-Snippets file can be found here:
C:\Users[username]\AppData\Roaming\SQL Developer\UserSnippets.xml
If you use SQL Developer on Mac OS X, then the snippets can be found in ~/Library/Application Support/SQL Developer/UserSnippets.xml
Are you running on Windows? Check your "C:\Documents and Settings\\Application Data\SQL Developer" directory for a UserSnippets.xml file, it contains all user defined snippets.
Also, check the online help for "Location of User-Related Information" topic. It has location of files that hold other user defined info.
-Dave
Why not create a package on the Oracle server for daily maintenance that way it's stored with your DB and in your DB backups?
EDIT: I do this and find it even easier to use them later on when performing routine maintenance tasks. Being able to call a packaged procedure is really, REALLY handy sometimes.
Agreeing with Spyder -
C:\Users\[username]\AppData\Roaming\SQL Developer\UserSnippets.xml
is the place. But I only found this after creating my first new Snippet.
After that, I was able to edit the xml to add new snippets and new categories. Once a change is made to the xml, SQLDev has to be relaunched. (And since it's an xml, I'm going to see if I can save it to Git to share amongst my team when I get a minute...)
For SQL Developer 3.2.20.09 on OS X Mountain Lion (10.8.*), the snippet file is located in ~/.sqldeveloper/UserSnippets.xml.
On OS-X Yosemite (10.10.5) I found the current UserSnippets.xml for the current SQL Developer ( Version 4.1.0.19 ) also in
~/.sqldeveloper/UserSnippets.xml

Resources