My work machine is a Dell laptop running Windows 7. My home machine is a MacBook Air running OS X Yosemite.
98% (made up number) of the posts on this site were written using my Windows machine.
But now that I’ve discovered that my SnagIt license is also valid on my Mac, I’m trying to do more writing there. It’s also a good way to see how the other 10% of our users work, live, and breathe in SQL Developer.
Installing
We don’t have a download installation package. You just download the file from OTN, and extract it. You’ll want to extract it in your Applications space in Finder. Or just copy and paste the contents over…
Once you’ve done this, it should be ready to go. If it doesn’t work, there’s probably a Java problem. You’ll need to make sure you have java…
If you want to follow the official directions, these should help. Just try to get the latest JDK, 7 or 8. We’ll officially support Java 8 in the next release of SQL Developer but it’s OK to run now (note that I’m using version 4.0.3!)
If you need to mess with any of the JVM settings or even specify WHICH Java to use, you’ll need to go into your $HOME directory.
Make It Pretty
I’m using the OS X Look and Feel – see yesterday’s post for details.
I’ve enabled font anti-aliasing – folks with Retina displays pay attention here. Apparently this can help with ‘blurry’ text.
I’ve downloaded the Droid fonts, free with Apache dist license 🙂 I didn’t know how to install fonts on a Mac until I read this great tutorial.
A Mac Quirk?
I like to drag and drop multiple things from the tree to an editor or a diagram.
I’ve noticed to get multi-select drag and drop to work with my Magic Mouse touchpad, I have to end the shift+select and drag from that end-point immediately and then drop where I want it – all while holding the SHIFT key…if I let go of the ‘mouse’ and then try to drag, I get back into a single selection again.
Anyways, this is probably me not reading the Mac docs or doing the right Google search, but just in case it helps you 🙂
76 Comments
I’m trying to configure TNS connection on SQL Developer on macOS, but I don’t know where I have to create the file tnsnames.ora, thanks in advance.
Anywhere you want, it’s a simple text file. Once you have it, specify the directory in the preferences.
Hi Jeff, Thank you for sharing your expertise and sense of humor. I have SQL Developer 19 running on my Macbook Air. I’m connecting to a Oracle 19 EE database on a Windows 7 VM that runs through VMWare Fusion. This all works great. Which is really cool. 🙂 It’s a good time to be a geek.
I would also like to be able to use SQL*Plus on the Mac side. I have downloaded and unzipped the Instant Client basic & SQL*Plus archives and have unzipped them both into the same directory. I’ve also copied the TNSNAMES file that I had for SQL Developer.
When I attempt to connect I get the ORA-12545 error.
Jacks-Air:instantclient_11_2 freejak$ sqlplus system/oracle@orcl
SQL*Plus: Release 11.2.0.4.0 Production on Fri Aug 23 21:01:03 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-12545: Connect failed because target host or object does not exist
It seems like the common cause of this error is a type in TNSNAMES, but I can’t think that’s the issue, this is the same TNSNAMES that is fine for SQL Developer (and for everything on the VM too).
Any suggestions would be appreciated.
Thank you, Jack
What’s your take on SQLcl?
Hi Jeff, Well I *was* ignorant of SQLcl, but have downloaded and installed it and it’s working just great. Thanks for the gentle steer to that.
I did find it a little tedious to pass a long command to Terminal to launch SQLcl, so I wrote a small Applescript that I have in an Automator app now.
If anyone else is interested, add a Run Applescript step in Automator and paste in the commands below (change the path to where you have SQLcl installed) and save this as an app. Now you have a way to double-click your way to SQLcl directly.
set pathWithSpaces to “/Users/freejak/documents/installers – oracle/sqlcl 19.2/sqlcl/bin/sql”
tell application “Terminal”
do script quoted form of pathWithSpaces
activate
end tell
Jack
What’s the keyboard shortcut for jumping to the end of the returned data?
Ctrl+End, make sure your mouse focus is on the data grid first.
Hi, I have a strange problem, I’m executing a script on MAC sqldeveloper and getting message as no rows returned, whereas same script on same database when executed on windows machine sqldeveloper returns rows, this is happening for some tables in schema, whereas for others I’m able to extract data.
can you plz tell the exact steps i need to perform to resolve it.
I can’t help without seeing your script. I might need your table ddl and data too.
Hi, I have a strange problem, I’m executing a script on MAC sqldeveloper and getting message as no rows returned, whereas same script on same database when executed on windows machine sqldeveloper returns rows, this is happening for some tables in schema, whereas for others I’m able to extract data
check your login.sql script, your NLS session parameters, and anything else that might affect how your sql is ran and objects resolved
Hello,
I have a persistent problem with sql developer. Users wants lots of data. It will run (increased the worksheet settings so that works). Then I save the script output and it will not write a large file. I cannot find a setting to change so that works. Do you know?
More details please. How much is lots. What do they ask for and what do they get?
Today I was writing 80,000 rows, 18 columns from 6 tables. The columns are names, addresses, dates.
Sometimes I get a low memory warning when I have 2 scripts open.
“Memory is running low.
740 used of 769 Maximum MB.
Memory can be reduced by closing applications and projects not in use.
Memory can be increased by modifying the setting in null”.
You could edit the product.conf file and increase the jvm max size.
Hi,
I have a question. I have downloaded and installed Oracle SQL developer and JDK but there is no Oracle Database 11 or 12 for mac version. how can I make this work??
What I do for my Mac is use a VirtualBox Linux VM. We make one for folks that want to learn Oracle, on their Macs.
I just downloaded latest java JDK and oracle developer 4.1. I tried setting up connection with HR as both username and password I kept getting ‘the network adapter could not establish the connection’.
I have used both the service name as orcl and SID as xe but I get the same error in each case.
Somebody help me please!!
Do you have a database?
No I guess that was the problem, I can use mysql it works fine. Plus I am currently downloading the DeveloperDay to use since I am a student and only need it to complete a class project.
developer day image is PERFECT for you then – let me know if you have any questions or need help
Hi all, I have small trouble with sql developer and mac. I created same local connection (same configuration) like on Windows but in OSX env it does not work ends with ‘the network adapter could not establish the connection’. Do you have any idea why it’s working for Windows but not for OSX ?
Maybe another question. I needed to install Oracle XE for Windows but I did not install something like this on OS X on my mac. Thank you for your help.
Lukas
I have the same error Vendor code 17002″
Have a macbook pro and installed java and sql developer just now.
Help me what I can do to resolve this error
Do you have a database?
I just downloaded latest java JDK and oracle developer 4.1. I tried setting up connection with HR as both username and password I kept getting ‘the network adapter could not establish the connection’.
I have used both the service name as orcl and SID as xe but I get the same error in each case.
Dear ThatJeffSmith thank you so much for this explanation.
I still have some issues though.
1. When I download SQL developer from OTC, the icon just appears on my download list, I open it. How do you extract it ?
2. It just opens but is missing the connect bottom on the connection menu. It has the test bottom though
3. When I do ls in the terminal I only see three files:
4.1.0, system4.1.3.20.78, and tmp
Any help is really appreciated.
I downloaded SQL Developer version 4.1 Everything works fine, but I do not see the “Preferences” on the menu anymore. I need to change the NLS date format permanently which is under the Preferences, but I cannot find it. Please help.
It’s on the SQL Developer menu item.
It is not for some strange reasons. When I go to “Tools”, it is missing the “Preferences” option on the bottom. Should I look somewhere else?
Preferences isn’t on the Tools menu, on a mac. OS X standard is to put the preferences item on the application main menu, right below ‘About Oracle SQL Developer’
You are a life saver! I don’t know how to thank you! Really appreciate your help.
No problem, that messed with my head when I first switched to Mac too.
Note that your application settings will go in your OS User $home directory, in a hidden (.) sqldeveloper folder. So if you want to save your sql history or application settings, you just need to open a terminal.
Thanks again!
My Mac just upgraded to OS 10.10.5 last night and now SQLDeveloper will not open. It tries to open and then simply closes with no error or any window. I downloaded the newest version of SQLDeveloper 4.1.1.19.59 and it did not help. I have Java 8 Version 25. I believe these are now the most up-to-date version of Mac OS, SQLDeveloper, and Java. Can you at least confirm that SQLDeveloper should work? Thanks for any assistance, Cabe
The java location probably changed. Look at your product.conf file and confirm it’s set correctly
Thank you for the prompt reply Jeff. My product.conf is commented out so it uses the default. But I finally figured it out and hopefully this will help others reading this page. The Java Control Panel told me that I was using Java 8 Version 25 which I reported initially – but it turns out that is the JRE. To check the version of the JDK which is what matters to SQLDeveloper, I had to go to terminal and type “java -version” which told me I was using 1.7.0_67. I downloaded the newest version of the JDK which is 1.8.0_60 and now SQL Developer works again.
I also have this issue. I just downloaded java 1.8.0_60 and when I do “java -version” is says 1.8.0_60. However I cannot get SQL Developer to open. I just got this Mac and I am trying to set it up so I also just downloaded SQL Developer. My product.config file is all commented out. I have also tried to look at the sqldeveloper.conf file and set the “SetJavaHome” there. Is there anything else you had to do to get SQL Developer running?
product.conf file – uncomment the line re: set java home, and point it to your java 8u60 JDK path
that’s all you should have to do
So I have uncommented the line “SetJavaHome” and I have added my path, /Library/Java/Java…/jdk1.8…/. And it said that was not a path. Then I added on Contents/Home and that was “not a path”. Then I tried adding on “bin” to the end of all of that. And it still says it’s not a path. I know this is a path though because I copied it right from my JAVA_HOME variable. Do you have any other suggestions?
yeah, I talk about it explicitly here but it should look something like this:
SetJavaHome /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
no trailing /, not the bin
Unfortunately that did not work either. I have just tried restarting my computer and still nothing. Any other suggestions? I also looked through that other page but it didn’t seem to fix my issues.
show me what you have, show me what you get when you try to start the app
This is what I get when I am starting ./sqldeveloper from the bin.
So that did not work…
Administrators-MacBook-Pro:bin angela.benway$ ./sqldeveloper
Oracle SQL Developer
Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1329)
at oracle.ideimpl.MainWindowImpl.(MainWindowImpl.java:166)
at oracle.ide.osgi.Activator.setupWindow(Activator.java:281)
at oracle.ide.osgi.Activator.start(Activator.java:135)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalStart(EquinoxLauncher.java:271)
at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.start(EquinoxLauncher.java:241)
at org.eclipse.osgi.launch.Equinox.start(Equinox.java:258)
at org.netbeans.core.netigso.Netigso.start(Netigso.java:191)
at org.netbeans.NetigsoHandle.startFramework(NetigsoHandle.java:209)
at org.netbeans.ModuleManager.enable(ModuleManager.java:1352)
at org.netbeans.ModuleManager.enable(ModuleManager.java:1156)
at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:340)
at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:276)
at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:301)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:181)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:150)
at org.netbeans.core.startup.Main.start(Main.java:307)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
at java.lang.Thread.run(Thread.java:745)
if you want, i can setup a web meeting and i can help talk you through it as you share your desktop
So if anybody else is still having issues, I just solved mine by downloading SQLDev 4.1.0 instead. Once I did that it worked perfectly!
hi, my sql developer is not launching, i have downloaded the java over and over again.. still no luck
So what have you tried? I’m assuming you’re actually on a Mac?
Hi Jeff, I’m helping a student install SQL Developer and the preferences menu is simply not there under the tools menu. We need to install the MSSQL database driver but need that menu to do so. Any thoughts?
On a Mac, it’s under the sql developer menu.
Fantastic! I’ll pass that on. Thanks.
Where is the tnsnames.ora file on Mac?
wherever you want it to be, just tell us the directory in the preferences
Hi, I indtalled the Sql developer VM on my Mac, but I couldnt select DB connection as SYS. I’ve tried connection name: ORCl
Username: SYSDBA
Basic connection type,
Role:SYSDBA
SID: orcl
But it does not work. So my question how to set the DB as sys ?!
Thnx in advance .
I have OSX Yosemite (latest version) and java 1.8.0_31 (latest) installed (this is the only java version on my machine. SQL developer does not want to start. Instruction java -version in terminal indicates that no version is installed (No Java runtime present, requesting install). What should I do to get this running?
Install Java such that your Mac THINKS you have Java installed.
I installed SQL Developer on my Macbook air OSX 10.10.1 ,
but when I try to connect to DB i got the following error
“An error was encountered performing the requested operation:
IO Error: The Network Adapter could not establish the connection
Vendor code 17002”
I tried to turn off my wireless and firewall but same problem always ?!
Can you ping your db server?
The error says it can’t reach the machine you have defined in your connection.
it’s localhost
you have Oracle running on your Mac, or on a VM running on your Mac?
Sorry , I’m still new and just started learning oracle
I’m following this learning course
http://www.cbtnuggets.com/it-training-videos/course/oracle-database-11g-sql-fundamentals-1-1z0-051
he just start connecting with DB I don’t know what I should setup too .
ah. yes.
you’re going to need a database – this might help you
Thanks a lot ,
I cannot find an Oracle Database for MAC os .. only for windows and linux , how can I can install it for MAC please
You can’t.
I’m running 12c on my Mac via an Oracle Linux VirtualBox image.
Thanks a lot 🙂 you are the best ..
I’ll use OTN VirtualBox image for testing and learning as you mentioned.
Thanks again
thanks it works on OTN VM fine all users , but on my mac SQL Developer connection only worked with SYS user with Role SYSDBA and SID cdb1 .. and if I tried to enter HR user it says wrong username or password.
and user HR with SID orcl it shows an error
Status : Failure -Test failed: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
I did the port forwarding
Here’s what my connection looks like – SQL Dev running on the Mac, connecting to the VirtualBox VM, also running on the Mac. Note that I have port forwarding setup
I have a couple of posts here on help with getting setup with this image and port forwarding…
Thank you for pointing , I downloaded java again and now SQLDeveloper.app is opening and showing my connections.
No Java runtime present, requesting install.
Strange I have 1.8.0_25 installed and my ebs is also looking it and opening forms .
I have checked in system preferences java console the security is high . I have high and very high as my options and I did check high and add the edit sites list for EBS.
Thank you
Krishna
I am trying to instal sql developer on my mac . OS X Yosemite 10.10.1
and I have java 8u25. My oracle apps on safari is working fine after adding to serucity list . But I am unable to open the SQL devloper applicaiton which is 4.0.3!. Please help me to get installed.
Do you just get the bouncing sqldev icon?
Try launching from terminal..Open the app file and find the sql developer.sh file. Execute that and it should show an error message.
I did as you said and I get this error
Krishnas-MacBook-Pro:macos sai$ ./sqldeveloper.sh
Unable to find any JVMs matching version “1.7”.
No Java runtime present, try –request to install.
Unable to find any JVMs matching version “(null)”.
No Java runtime present, try –request to install.
I am having java1.8
I dont want to work with two java’s as my other applications will impact.
thanks
Krishna
you have java 8, but it can’t find it.
if you run java -version from a terminal, what comes back?
Hi Jeff,
Thank you so much for your posts, they are very useful. One question not related to this post. How can you see the query results in two colors? I have been investigating in SQLDeveloper and I can’t find it.
Thanks!
You mean light yellow / dark yellow? That’s in Preferences, under “Database->Worksheet”, a checkbox saying “grid in checker board or zebra pattern”.
Great!! I found it !. Thank you!!