Login window to create a new database connection on SQL Oracle Developer doesn't appear - oracle

I'm unable to create a new database connection on SQL Oracle Developer because the login window to enter the details do not appear. Only the login windows for "Oracle NoSQL Connections" and "Database Schema Service Connections" appear.
I've tried re-installing the developer but that doesn't seem to help. I'm using a mac and have JDK 8 installed. I'm fairly new to SQL and coding in general so any help would be appreciated.

Let's try this - it will usually do the trick.
Open and bash terminal, and cd to your home directory.
Then, cd to .sqldeveloper
You should see one or more system directories, appended with the version number of SQL Developer - these directories hold the settings, connections, etc for your copy of SQLDev.
Rename that directory. Then try starting SQL Developer.
Two additional things
i'm assuming you have Oracle JDK and not OpenJDK - OpenJDK isn't supported
i'm assuming you have a recent version of SQL Developer (20.2 is latest)

Related

Sql developer problem. No ocijdbc21 in java.library.path

So I downloaded Oracle 19c DBMS. Then I downloaded Sql Developer. When I try to add a new connection, I get the message
How do I get past this. I have seen some other threads on this but none of the solutions that I understand seem to fix it. I need to keep the connection type as local. Is there somewhere I can go and just adjust this path?
EDIT
I used just a basic connection and the name database name in the service name box and it worked. The initial setup instructions I had were dated and not set up for 19c. One of the comments in the answer below suggested this.
For 20.4.1 and bequeath connection you must have a 21c instant client as we're using a 21c jdbc driver.
If you're not on Linux, that means you'll need version 20.4.0 so you can use a 19c Instant Client.
Windows 21c Clients should be available later this Summer.
Edit/Update: Version 21.2.1 now supports 19c and 21c Clients. 21c Instant Clients are rolling out across supported platforms. Currently avail for Linux, soon to include Windows and OS X.
In my case, the DB connection changed from Network Alias to Connect Identifier post a company pushed update, simple fix after hours /days of trouble shooting.
enter image description here
Ran into this error with Oracle SQL Developer and the fix for us was to in Oracle SQL Developer:
Tools -> Preferences
In the tree view on the left Expand Database and select Advanced
In Use Oracle Client click Configure...
Set the path to your Oracle home (should looks something like C:\Path\To\Oracle\19.n)
Check the Use Oracle Client box
In the Tnsnames Directory set it to the folder containing the tnsnames.ora file (should looks something like C:\Path\To\Oracle\19.n\network\admin)
Click OK
Relaunch Oracle SQL Developer

Need help installing ODAC 122011x64 so I can connect ADW to Power BI

So I have successfully installed Oracle DB 19c and connected it to Oracle SQL Developer. I am able to create tables and run queries. Furthermore, I can connect to ADW with both python and SQL Developer and any changes that I commit are seen in all locations. I am trying to connect the ADW database to Power BI. I am running all this on a personal Windows 10 Pro laptop with plenty of SSD & RAM.
In a new window of Power BI I click Get Data and then Oracle Database followed by Connect. When I do this I get a pop up that says:
The recommended provider ('Oracle.DataAccess.Client') is not installed. You can continue with your current provider, however it has been deprecated and may not work correctly.
I clock OK. Enter my Server as the TNS Name that I have used for my python and SQL Developer instances. In my ADW database, I have a table called TEST. It's a simple table with 1 column with the years 2015 through 2020 in it. Been using this to test to see if things are working. So I click on the DirectQuery and run the SQL statement SELECT * FROM TEST under the Advanced options menu and select OK. A sign in window pops up and I select the Database table and enter my correct ADW username and password. The same one that I can use to access this table from SQL Developer and then select Connect. When I do, I get this error:
Details: "The provider being used is deprecated: 'System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.'. Please visit https://go.microsoft.com/fwlink/p/?LinkID=272376 to install the official provider."
So I go to the website and download the ODAC122011_x64 file from Oracle and unzip it. When I double click the setup.exe file inside the directory I get a yes/no user control account menu and I select yes and then a command prompt window flashes very quickly and then nothing happens. I ran a super slow motion capture from my phone to capture what the command window showed and below is what I see:
Starting Oracle Universal Starter...
Checking monitor: must be configured to display at least 256 color Higher than 256 . Actual 4294967290 Passed
Preparing to launch Oracle Universal Installer from C:\Users\<my username>\AppData\Local\Temp\OraInstall2020 09:20_09-04 {???}
Please wait .._
It does nothing after this I have tried running the oui.exe file under the install subdirectory and get nothing and I have tried running the install.exe file in Oracle Universal Installer that I acquired when installing Oracle DB 19c and I get the following error when I target the install.exe file for installation:
OUI-10118:C/Users/{my username}/Downloads/ODAC122011_x64/Setup.exe is either a directory or a corrupt file. Specify a valid filename.
This is a file that I just directly downloaded from Oracle's website and unzipped to a directory with no spaces in the directory location. I have the latest version of Java installed (JDK 15).
I am not sure the proper work around here. Why can't I get my Power BI to connect to my Oracle ADW table using the methods described in this article. Those are the instructions that I used. It appears that I need this ODAC application but I don't understand why it won't install.
Can anyone help me resolve this issue? Thanks!
Edit: I am using 64-bit on each application.
Update: Still having issues. I checked the log and this is what I am seeing:
Using paramFile:
C:\Oracle\Oracle_PowerBI_ODAC\ODAC122011_x64\install\oraparam.ini
Checking monitor: must be configured to display at least 256 colors. Actual 4294967296 Passed
The number of files bootstrapped for the jre is 0.
The number of files bootstrapped for the oui is 0.
the client version need not match the server version, Removing all other versions, and making sure that I had the x64 version,
You need the latest ODP.net library to use Oracle. Please download it here:http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
I figured out the solution after reviewing this post. Apparently having over 2TB of free space on a hard drive causes this problem. You have to go into command prompt and create a temporary file to get your free space under 2TBs using something like this:
fsutil file createnew temp_1TB_file 1200000000000
Run the setup.exe again and then delete the temp file after.
Update: After doing all this I still was running into the same issues in Power BI. Then I read the troubleshooting notes from this page more closely and realized that I might have found the problem when it said:
If you downloaded Power BI Desktop from the Microsoft Store, you might be unable to connect to Oracle databases because of an Oracle driver issue.
I uninstalled the PowerBI Desktop that I had installed from Microsoft Store and installed it from the download from its website and tried connecting to Oracle ADW again through PowerBI and IT WORKED!!! So much troubleshooting but it finally works!

Toad for Oracle, No valid Oracle clients found. You need at least one 64-bit client properly configured

I get this error when I launch Toad for Oracle.
No valid Oracle clients found. You need at least one 64-bit client properly configured.
This has been happening since I upgraded the Oracle Client to Oracle 12c from 11g.
Here is what I have done so far to try to resolve it based on internet research:
I checked the path variable, it's currently set to C:\xyz\Oracle\ora12.1\client_2\bin, and there is an Oracle installation at this path.
I checked the TNS_ADMIN variable, it is currently set to C:\xyz\Oracle\ora12.1\client_2\network\admin. This also appears to be valid and correct, there is a tnsnames.ora file under this path.
SQL Plus works without issues, and Oracle SQL Developer also works without issues.
Is there anything else I can try to resolve this issue? Unfortunately, uninstalling and reinstalling Toad is not an option at this point as I do not have access to a new setup.
The issue is due to not having the Oracle Database installed on your computer.
You can download the database here: https://www.oracle.com/database/technologies/appdev/xe.html
Once the zip file is downloaded and extracted, run setup.exe. Once that is complete, the Oracle DB will be installed on your machine and the error will no longer appear.
With TOAD you need to have oracle client installed on your computer and you must configure the related TNSNAMES.ORA to connect to the server.
If you use SQLDeveloper you can do without oracle client installation.

ora-12560 :TNS: protocol adapter error after installing ODP.NET

I have installed Oracle Database 11.2.0.1 Win64 and also Client 11.2.0.1 Win64 in my windows 7 Ultimate and I was able to access Oracle database using Sql*plus
using sqlplus / as sysdba. After that I installed ODP.NET ODTwithODAC1120320_32bit to work with Oracle using C# in Visual Studio 2010. When i tried to add connection to Oracle database using ODP it pops out ora-12560 :TNS: protocol adapter error and even during logging to Oracle using SqlPlus / as sysdba.
I have read several articles that say stopped service will cause but mine is running.
What could be the problem???
The main problem that I faced Connecting to Oracle 11g using Server explorer in VS 2010 was not version compatibility of ODP with Oracle database but it's architecture. After such errors I uninstalled Oracle Database 11g using deinstall.bat file then cleaned Registry Key ../Software/Oracle and cleaned up temp files, did a system restart. Then installed Oracle 11g Database x32 Database server, ODP.NET x32, checked Env vars.
First success was that I was able to connect to DB using SQL*Plus. After that started VS 2010 and tried to connect ..... Connected! wow has worked in VS IDE. I was so happy :)
I remember how many times I reinstalled Oracle(cleaning,configuring checking listeners, restarting services). Then my hard work really paid off.
here is a screenshot
Generally, I advise to install Oracle server under different credentials than what you usually use. The Oracle server (under Windows) makes use of a few environment variables; and the same is the case with ODP.NET as well. And while you can't easily switch between different sets of env variables in your user profile, you can assign different env var values to a (different) user under which the Oracle server is installed and/or being run.
If you already have your Oracle server installed (which, I suspect, is your case), then try:
Create a new user in your Windows, make him sufficiently privileged. ("Admin" rights will do fine. :-))
Log in as the new user.
Set up ORACLE_HOME, ORACLE_SID, NLS_LANGUAGE and PATH environment variables for that particular user (not globally for the whole Windows!) to point to your Oracle server.
Log in as the original user.
Start the Services management console ("services.msc").
Change "Log On" credentials for the OracleServiceSOMETHING and Oracle SOMETHING VSS Writer Service and OracleJobSchedulerSOMETHING and OracleOraDb11g_home1TNSListener to that new user+password you just created. (... where SOMETHING is usually the name of your instance)
Stop all Oracle services.
Set up ORACLE_HOME and PATH env var to point to your ODP.NET root and root\bin folders respectively; set up the ORACLE_SID and NLS_LANGUAGE vars to whatever values you need.
Start all Oracle services. (After this moment they should be running under their own credentials.)
Let's pray that it works.
I myself would have to improvise, too, if this scenario didn't work. But so far I have successfully run two Oracle servers and one Oracle client on the same machine this way with no problems, so I hope it works for you too. If it does not, then there's still the option of reinstalling your Oracle server completely.
Don't forget about backing up your database ... just in case something horrible happens.

Effects of changing NLS_LANG setting in the registry for Oracle Client

We are in the process of moving from the .NET Microsoft oracle driver to the ODP.NET driver.
One of the problems we have had is this error:
ORA-12705: Cannot access NLS data files or invalid environment specified
We were able to stop the error by modifying the registry and changing the setting (see this question)
In our case we changed
HKEY_LOCAL_MACHINE - SOFTWARE - ORACLE - NLS_LANG
which was set to NA
to be the same as
HKEY_LOCAL_MACHINE - SOFTWARE - ORACLE - HOME0 - NLS_LANG
which was set correctly
My question is why would there be different NLS_LANG settings in the registry, and might there be any knock on effects of changing this value?
Update:
I've just found in the Oracle NLS FAQ the following
For Oracle version 7:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
For Oracle Database versions 8, 8i and
9i:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEx\
where "x" is the unique number
identifying the Oracle home.
HOME0 is the first installation
For Oracle Database 10g:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_<oracle_home_name>
There you have an entry with name
NLS_LANG
OK, so there are different registry settings for different versions...
Note:
Some people are confused by finding a
NLS_LANG set to "NA" in
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
when no version 7 was installed. This
is used for backwards compatibility,
and can be ignored.
I have Oracle 9i, so now I'm even more confused - why is the ODP.NET dll looking at the Oracle 7 registry setting?
I had a similar problem with the;
ORA-12705: Cannot access NLS data files or invalid environment specified
The ODP.NET dll's or instant client were reading the registry;
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\NLS_LANG=NA
The value NA caused the error.
This was because I already had a client installation but I wanted to use the oracle instant client via network drive for the a VB.NET app with ODP.NET.
My simple fix in my vb.net solution was for example to adjust the environment for the application via:
Environment.SetEnvironmentVariable("NLS_LANG",
"AMERICAN_AMERICA.WE8MSWIN1252",
EnvironmentVariableTarget.Process)
nb. The Oracle "NLS FAQ" link is no longer valid (2012)
PER Oracle Notes on the 11g ODP release, the following can cause this error:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\NLS_LANG=NA <--- This NA does in fact cause this error if set to NA.
You can try DELETING the key if not needed or setting it to a valid NLS_LANG setting for your locale.
For us we set it to AMERICAN_AMERICA.WE8MSWIN1252.
In our case we did not want to make any potentially breaking changes to the Oracle registry because we were installing our web service on a production Oracle 9i server.
The solution was simply to prevent ODAC from being able to see any ORACLE registry keys by denying all access to that key for the user ID our web service was running as.
Start -> Run... regedit (as an administrator)
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
Right click on the ORACLE key -> Permissions...
Click the Add... button.
Add the web service user name configured in your web service's application pool identity (e.g. IUSR_MyWebService); this is the user name that appears against your w3wp.exe process in Task Manager.
Press OK.
For the new user permissions, check "Deny" against the Full Control permission and press OK.
This worked just fine and as a bonus we have ensured that our application is isolated from any future changes to the ORACLE registry keys.
Tip: you can prove to yourself that the user in question has no access to the keys in question by closing any running instances of the Registry Editor, start a CMD prompt as that user (using Run As...) and then launching regedit from the command prompt.
the Oracle Client (ORACLE_HOME\bin\ora*.dll) is looking for a file named "oracle.key" in the same directory. This file contains the name of the registry key which belongs to this Oracle client installation. (e.g. "Software\ORACLE\HOME3")
hth
Andreas
This was all resolved in the end by installing the ODAC 11 client components (downloaded from the Oracle website). I think the system was getting confused because we had copied the ODAC dlls across rather than fully installing the client. ODP.NET is expecting an Oracle 11 client and didn't know where to find the Oracle Home.
NB if you are installing the ODAC components using xCopy deployment then do not install them to an existing Oracle Home directory (eg c:\oracle\ora92 for 9i client). This causes a 'Provider is not compatible with the version of Oracle Client’ error.

Resources