In my first two posts I made myself comfortable with Oracle instant client on my MacBook. Now I want to use it for something more serious, like changing passwords.
Even with all the modifications from previous post SQLDeveloper still does not show the Reset Password... option. The reason: it just don't know about the library correctly.
PATHas shown in previous post is not set in an application started via launcher - It does not contain the
ORACLE_HOMEat all. But even as I forced that with a temporary hack it did not help; so I just can say: with OSX it's more complicated to let SQLDeveloper use the proper libraries.
PATHis not that important on OSX, the real issue is
DYLD_LIBRARY_PATH. Regardless if it's set in
~/.profiles- they never reach an application started via launcher, probably for similar reasons like PATH shown above.
But there is hope:
ORACLE_HOMEas set in
/etc/launchd.confis shown in the environment of SQLDeveloper. At the end, that's all we need, now just to check where to put this little flame of hope to let it grow to a bonfire.
From now on I'm talking about SQLDeveloper 3.2.20.09! Future Versions might behave different!
The script to check is
/Applications/SQLDeveloper.app/Contents/Resources/sqldeveloper/ide/bin/launcher.sh. There is a function called
CheckLibraryPath()which is supposed to check for a proper
LD_LIBRARY_PATH(or it's equivalences) and if not set create a proper setting. Oracle just forgot to check about OSX! I write forgot on purpose, as HP-UX is checked with
if [ `uname -s` = 'HP-UX' ]and
SHLIB_PATHis set instead of
So my solution is simple: I just enhance this function with this little patch:
524a525,541 > elif [ `uname -s` = 'Darwin' ] > then > echo "OSX!" > if [ "X$DYLD_LIBRARY_PATH" = "X" ] > then > DYLD_LIBRARY_PATH=$ORACLE_HOME > # only instant client exists on OSX > else > echo $DYLD_LIBRARY_PATH | egrep -e "(^|\:)$ORACLE_HOME($|\:)" > /dev/null > if [ $? != 0 ] > then > DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$ORACLE_HOME > fi > > fi > export DYLD_LIBRARY_PATH > #echo "$DYLD_LIBRARY_PATH"
With this little patch now I can change the password of my users with SQLDeveloper on OSX!