SQL_Developer to SQL Developer

When I first ran SQL Developer on my Mac I remember being a bit put off by the fact that the application name showed up as SQL_Developer rather than SQL Developer as I would have expected.

The address book application shows up as Address Book rather than Address_Book and Keychain Access show up as just that, rather than Keychain_Access. Just to pick two examples from my running applications. It just doesn’t look right!

That was a few years ago and I figured there must be a reason why it’s like this, but it didn’t bother me enough to spent any time trying to understand why it is this way and if there is any way to change it.

Having found my way into the inner files of /Applications/SQLDeveloper.app during my recent attempts to get SQL Developer working with EUS I thought it was time to see if I could work out why, and ideally “fix” it.

It turned out to be amazingly simply. I ran a quick find with grep to look for files that had the string “SQL_Developer”:

macbook-pro:~ martin$ find /Applications/SQLDeveloper.app/ -type f -exec grep -H SQL_Developer {} \;
/Applications/SQLDeveloper.app//Contents/Resources/sqldeveloper/sqldeveloper/bin/sqldeveloper-Darwin.conf:AddVMOption  -Dcom.apple.mrj.application.apple.menu.about.name="SQL_Developer"
macbook-pro:~ martin$ 

Well, this looks easy!

A quick test of changing the option to “SQL Developer” and a restart of the application makes me a happier man.

I’d like to clarify that I know this is a bit of a trivial/weird thing to be bothered by, but it just messes with my desire for consistency.

For the full harmonising effect you can also rename the application “file” in your Applications folder from SQLDeveloper to SQL Developer so that the application name in the dock and menu bar match up.

Making SQL Developer and EUS Work

Enterprise User Security (EUS) really appeals to me and so I was very keen to get a proof of concept up and running. It’s something I’d looked into in the past, but one thing or another had come in the way of actually getting it done. Mainly other demands on my time, but also the politics around LDAP management in organisations slowing down or stopping projects.

After getting OID setup in my lab, creating a user called “martin” in the directory and registering the database in the directory (OID) via DBCA it was time to test logging in:

[oracle@cs-03 ~]$ sqlplus martin

SQL*Plus: Release 11.2.0.1.0 Production on Sat Jul 21 13:58:18 2012

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning option

SQL> select sys_context('userenv','current_user') current_user,
  2         sys_context('userenv','authenticated_identity') authenticated_identity,
  3         sys_context('userenv','enterprise_identity') enterprise_identity
  4    from dual;

CURRENT_US AUTHENTICA ENTERPRISE_IDENTITY
---------- ---------- ----------------------------------------
GLOBAL_EUS MARTIN     cn=martin,cn=Users,dc=orasavon,dc=com

SQL>

All looking good.

As one of my clients had plans to use EUS for managing access for developers (to development databases) it seemed logical to try to connect using Oracle’s SQL Developer (as that’s the only “development tool” I have running on my laptop).

I got the following error:

SQL Developer EUS Login Error

[SQL Developer version 3.1.06]

This was going to be a bit of a problem. Not everyone likes working with SQL*Plus as much as I do.

It was some time before I got chance to investigate properly, but when I did the following MOS note seemed relevant:

How to Connect to an EUS Database Using 11g Thin JDBC Driver? [ID 793673.1]

The key part of the note is the need to set oracle.jdbc.thinLogonCapability=o3

I had to work out how to change the Java options for SQL Developer, which turns out to be very simple.

The following applies to a Mac, but the .conf file will be in the same location relative to the top level “sqldeveloper” directory regardless of the platform. For example, on my “Oracle Developer Days” Linux VM it is /opt/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf.

  1. Backup /Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf
  2. Open the file with your preferred text editor
  3. Add the following as a new option: AddVMOption -Doracle.jdbc.thinLogonCapability=o3
  4. Save the file
  5. Restart SQL Developer

Now connection to the EUS authenticated account works.

SQL Developer EUS Login Successful