Sql Developer Mac Os Java

In this tutorial, I am giving the steps to install Oracle SQL Developer 19.1 on Mac OS (Mojave) with JDK version 8. Software Versions Used for this Demonstration macOSMojave 10.14.4.

RADIUS authentication in SQL Developer on MacOS

24 Feb 2017 →

  • Tutorial for setting up Oracle and SQL Developer (Mac OS) This tutorial is aimed at explaining how to set up Oracle’s DBMS. You will use it to store the databases you will need to work with. Additionally, you will need to set up Oracle SQL Developer, a tool needed for executing SQL queries and scripts.
  • To start SQL Developer, go to the sqldeveloperdirectory under the directory, and do one of the following, as appropriate for your operating system: On Linux and Mac OS X systems, run sh sqldeveloper.sh. On Windows systems, double-click sqldeveloper.exe.
  • Java Developer Kit For Mac free download - Java SE Development Kit 14, Java SE Development Kit 7, PL/SQL Developer, and many more programs.

There’s an updated, simpler version of this post that you’ll want to use for current versions of SQL Developer.

This post will walk you through configuring SQL Developer to perform RADIUS authentication on MacOS.I periodically need to do this to connect to databases that require multi-factor authentication (MFA) and Istruggle with it every time. More than anything, this is just yet another entry in my Oracle Survival Guide to helpfuture-me waste less time. Hopefully it helps others too!

A note on versions

Version matters here. While SQL Developer will let you point to anyinstant client you like, it’ll secretly be expecting a specific version that dependson which version of SQL Developer you’re using. If you don’t point it to that exactversion of Instant Client, things won’t work—and it won’t be clear why.

As of the writing of this post, the latest versions areSQL Developer 4.2.0andInstant Client 12.1.0.2. That’s what I’ll use in this guide.

Download

Download these resources directly from Oracle. The Homebrew packages available strip out the .jar files whichconfuses SQL Developer.

1. Install instantclient

Download instantclient 12.1.0.2 from Oracle.You’ll only need the basic package. Unzip this package and place it in an accessible location.I install my instant client in ~/lib/instantclient_12_1. You can install yourswherever you like.

Oracle delivers this library to you in a broken state. Your instantclient contains a dynamic library called libclntsh.dylib.12.1,but every bit of software you’ll want to use will be looking for libclntsh.dylib.cd into your instantclient directory and ln -s libclntsh.dylib.12.1 libclntsh.dylib to un-broken it.

2. sqlnet.ora

The OCI driver properties can be configured via a special file called sqlnet.ora. The propertywe’re interested in is SQLNET.AUTHENTICATION_SERVICES.

Create a sqlnet.ora file and place it in a directory you’ll reference later as TNS_ADMIN. Make sure sqlnet.ora file has an entry for radius:

3. Mangle the java.library.path property

Sql Mac Os

Modern MacOSes—version 10.11 (El Capitan) and newer—have a feature called System Integrity Protection (SIP)which ignores the DYLD_LIBRARY_PATH environment variable. This is how the instantclient pathis typically revealed to SQL Developer. SQL Developer still looks at this environment variable even though wecan no longer use it. It’s simply not an option for setting this path.

Instead we can clobber the java.library.path via a not-so-invasive configuration file, ~/.sqldeveloper/4.2.0/sqldeveloper.conf.Create this file and set java.library.path to your instantclient path:

4. Set the TNS_ADMIN path for GUI applications

Sql Server Developer Download

You must set the TNS_ADMIN environment variable to make this work. Note that this needs to be set inthe GUI environment via launchctl—simply setting the environment variablein a terminal will not work. Unfortunately, values set via launchctl don’t persist between sessions(if you logout or restart, the value is lost).

In order to set this value upon start, create a ~/Library/LaunchAgents/oracle.plistfile that looks like this (replace the path with your own):

Note that TNS_ADMIN should point to a directory—not a file.

You’ll need to logout or restart for this change to become active.

4. Configure SQL Developer to use OCI

Sql Developer Macos Java

Now, fire up SQL Developer. Navigate to Oracle SQL Developer > Preferences and choose Database > Advanced:

Check the Use Oracle Client and Use OCI/Thick driver checkboxes.

Then, click Configure and enter the location of your instantclient:

Don’t worry about clicking the Test button here. Its output is not useful (failures here do not necessarilyindicate a broken configuration). Even when everything is working this test fails—ignore it.

5. Verify

In SQL Developer, go to Oracle SQL Developer > About Oracle SQL Developer. Click on the Properties taband search for the sqldeveloper.oci.available property. If the value is true, everything is set up correctly.You should now be able to authenticate using RADIUS!

References

Please enable JavaScript to view the comments powered by Disqus.comments powered by

Oracle Sql Developer Mac

Disqus

Comments are closed.