Tantalus – that Greek bloke who was doomed for all eternity to eternal thirst and hunger despite having food and water within reach. Had he been a Geek, rather than a Greek, he would’ve worked in a place where you can choose which OS to use…but be denied by the fact that, as a database developer, he had to use PL/SQLDeveloper – a Windows only IDE.
Oh the bitter irony. Well, unlike Tantalus, I’ve decided that, as with so many other problems in life, this particular dilemma can be resolved by alcohol – in this case, a glass of Wine.
WINE – formerly WINdows Emulator, now re-christened Wine Is Not an Emulator. It’s open source so, on this occasion, we don’t have to beware Geeks bearing gifts ( sorry).
For this particular exercise, I’m using Ubuntu 10.04.
PL/SQLDeveloper is that “other” PL/SQL IDE – this one being published by Allround Automations.
An acknowledgement before I go any further – this article by Nik Chakov was really useful.
Installing Wine
Go into Synaptic Package Manager ( System / Administration / Synaptic Package Manager )
In the Quick Search type wine
Check the box to install wine and say yes to the host of packages that will also be marked.
Click Apply and let Synaptic do it’s thing.
When it’s all finished, you’ll have a menu entry for wine under the Applications menu.
Notepad comes pre-installed and is runnable from under the Wine / Accessories Menu
Installing the Oracle Client
Yes, we may well have a Oracle Client already on the machine, but PL/SQLDeveloper relies on the presence of a dll. So, head over to the Oracle Client Download Page.
Note – we need the full-fat instant client – the one with all the OCI stuff. I found this out the hard-way as I initally downloaded the sqlplus version (780 kb). What you actually need is the 49.1 MB instantclient-basic-win32-11.2.0.1.0.zip.
If you’re using Firefox, the file will be saved to the $HOME/Downloads directory.
Next step is to create get the files extracted into the appropriate directories in the Wine home directory. In Terminal…
$ cd $HOME/.wine/drive_c $ mkdir oracle $ cd oracle $ mkdir bin $ mkdir network $ cd network $ mkdir admin $ cd bin $ cp $HOME/Downloads/instantclient-basic-win32-11.2.0.1.0.zip . $ unzip instantclient-basic-win32.zip
At this point, I tidied up a bit…
$ mv instantclient_11_2/* . $ rmdir instantclient_11_2
So, we’ve got all of the required files in c:\oracle\bin
The oracle home is going to be c:\oracle
We need to define this in a Windows way so …
$ wine regedit
Add Oracle under HKEY_Local_Machine\Software
Under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\Environment…
Amend the PATH by adding c:\oracle;c:\oracle\bin
We also need to add an entry for TNS_ADMIN to be c:\oracle\network\admin.
Next, we need a listener.ora and tnsnames.ora in the c:\oracle\network\admin directory.
These files are the same irrespective of the OS you’re running on so, if you’ve already got an oracle client configured, you can just copy these files accross.
The listener.ora first :
SQLNET.AUTHENTICATION_SERVICES=(NTS) NAMES.DIRECTORY_PATH=(LDAP,TNSNAMES,ONAMES,HOSTNAME) DEFAULT_SDU_SIZE=8761
Now the tnsnames.ora :
XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = my-pc-name)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) )
PL/SQLDeveloper
You can download a trial version from the Allround Automations site.
The downloaded file is plsqldev804.exe.
Copy this file to c:\Program Files ( $HOME/.wine/drive_c/Program Files)
We need to associate this file with wine so…
Go to the Applications Menu , Wine, Browse C: Drive then navigate to Program files.
Right click the file you’ve downloaded ( plsqldev804.exe )
Select the Permissions tab.
Here you need to check the Allow Executing File As Program as per the screenshot below :
Next open the Open With tab, click the Add button.
Now select Wine Windows Program Loader from the list and click Add.
Back in the Open With tab, select the Wine Windows Program Loader.
Back in the file explorer, Right-click the file and open with Wine.
The installer should now run as you’d normally expect. Accept all of the defaults.
Now for the test. You can either run PLSQLDeveloper from the desktop icon or from under the Wine menu ( Applications/Wine/Programs/Applications/PLSQLDeveloper ).
When you get the dialog box to connect to a database, you should have all of the databases in your tnsnames file in the drop-down.
One final step – ( thanks to the instructions at the Wine PLSQLDeveloper page) – to get the icons to display correctly, go into the PL/SQLDeveloper Tools/Preferences menu and in the User Interface Appearance section, uncheck the option for Faded disabled buttons. Now re-start PL/SQLDeveloper.
Hopefully, you should now have a fully functioning copy of PL/SQL Developer and just maybe one step closer to a Windows free working environment.
Awesome, thanks Mike, worked like a charm.
Just had to configure fonts under Preferences, as the defaults PL/SQL Dev expects are not there, and code formatting is terrible unless you use a mono-space font
LikeLike
Oliver,
thanks for the tip, came in really handy when I was doing this at work the other day.
Mike
LikeLike
AWESOME! I might add also including ORACLE_HOME = C:\oracle in case you install Oracle Instant Client on Ubuntu since the local environment variable will take hold and PL/SQL needs an ORACLE_HOME to point to C:\Oracle
LikeLike
Excelent!!!
Thank you very much
LikeLike
Great job with tutorial. Works great.
LikeLike
Hi Everyone I have installed Wine and PL/SQL Developer but i haven’t installed Oracle Client I dont know how to install Instaclient in Ubuntu can u pls guide me how to install….
If u have any document which is related to install Instaclient @ Ubuntu Kindlly Forward to me..
arulxavier00@gmail.com
LikeLike
Jesus,
for PL/SQL Developer running under Wine you only need to install the Windows Oracle Client under Wine also, as detailed in the post.
If you want to install a standalone Oracle client in Ubuntu in order to connect directly from Ubuntu to an Oracle database then have a look at these instructions.
HTH
Mike
LikeLike
Thank You So much Mike…!!!!!
LikeLike
Mike,
I have Installed PL/SQL Developer Under Wine also I have Installed Oracle 11g Express Edition Installed in My laptop(using Linux RPM file Setup),Then Which one I need to take( Windows Oracle Client under Wine or standalone Oracle client to connect XE directly) Kindly help me …I am stucked…..
Thanks in Advance……..
LikeLike
Jesus,
For PL/SQL Developer running under Wine, you’ll need to user the Windows Oracle Client under Wine to connect to the Oracle Express Edition database you have running natively on the same machine.
You’ll need to add an entry for it to the tnsnames.ora file.
HTH,
Mike
LikeLike
Mike..
If you have any Video Installation Kindly Share…else kindly share your Mail id to oraplsqldeveloper@gmail.com …I need a help to install PL/SQL developer in UBUNTU 16.04 LTS…
If you don’t have any Video Tutorial to install….. kindly make one Video Installation to configure any one 10/11g Express Edition and share the link with me…Kindly help me….
LikeLike
No videos I’m afraid, but the steps to install PL/SQL Developer in Ubuntu 16.04 should be pretty much the same as the ones I’ve described here.
For installation of Oracle Express Edition, these instructions will work on Ubuntu ( or any other Debian based distro).
HTH,
Mike
LikeLike
Hi Mike! i was been searching lasts 72h for “How to install PL/SQL developer on linux (Zorin SO)” and i am stuck. Man, im using wine and PL/SQL open (version 12) but when i try to connect in my database this error is displayed: ” Access violation at address 1354717D in module ‘OraOCIEI.dll’ read of address FFFFFFFF”. Can you tell me how i can fix that error?
LikeLike