Monday, September 08, 2008

PL/SQL developer on Linux

I have made the decisions to switch from a windows work laptop to a Linux laptop. At some points this can be hard, for example I use a tool called PL/SQL Developer from allroundautomations. I use the tool to code PL/SQL code for Oracle and is one of the things I start at first in the morning; mail, Firefox and then PL/SQL Developer. So switching to a Linux only laptop was challenging because I needed to get this windows program running under windows.

To run windows applications on a Linux box you can use wine, Wine is an Open Source implementation of the Windows API on top of X, OpenGL, and Unix. So I installed wine and gave myself a windows runtime enviroment. The following steps to make PL/SQL developer run under windows are:

Download and unpack (no need for installation) the Oracle instant client package which you can download from the oracle website and place this in your virtual C drive.

Next step, create a location to store you TNSNAMES.ORA file. I have placed it inside the instant client directory.

Now you have to make some changes to the system.reg file of wine. Here are settings stored which are used in 'windows'. You have to set the location of your TNSNAMES.ORA file as a TNS_ADMIN variable and you have to set the location of the instant client in the PATH variable. This made in my case the following:

[System\\CurrentControlSet\\Control\\Session Manager\\Environment] 1220471456

"APPDATA"="C:\\windows\\profiles\\jlouwers\\Application Data"

"ComSpec"=str(2):"C:\\windows\\system32\\cmd.exe"

"LOCALAPPDATA"="C:\\windows\\profiles\\jlouwers\\Local Settings\\Application Data"

"NUMBER_OF_PROCESSORS"="2"

"OS"="Windows_NT"

"PATH"=str(2):"C:\\windows\\system32;C:\\windows;C:\\instantclient_11_1"

"PROCESSOR_ARCHITECTURE"="x86"

"PROCESSOR_IDENTIFIER"="x86 Family 6 Model 15 Stepping 13, GenuineIntel"

"PROCESSOR_LEVEL"="6"

"PROCESSOR_REVISION"="0f0d"

"ProgramFiles"="C:\\Program Files"

"SystemDrive"="c:"

"SYSTEMROOT"="C:\\windows"

"TEMP"=str(2):"C:\\windows\\temp"

"TMP"=str(2):"C:\\windows\\temp"

"TNS_ADMIN"="c:\\instantclient_11_1\\tns"

"windir"=str(2):"C:\\windows"

"winsysdir"="C:\\windows\\system32"


Now you also have to set some things in PL/SQL developer itself to make things work correct. Install PL/SQL developer, this should go without any problem. After you installed it open PL/SQL developer and go to the preferences menu. Under 'Oracle' – 'Connections' set the Oracle Home. In my case this was 'C:\instantclient_11_1' and set the location of the OCI library, in my case this was 'c:\instantclient_11_1\oci.dll'. The last thing you have to do is to uncheck 'faded disabled buttons' under 'User Interface' – Apperance. This is to solve the problem of some menu items not displaying.

When this is set, restart PL/SQL developer and you are able to use like it was installed on a windows pc.





6 comments:

Anonymous said...

Have you tried SQL Developer from Oracle? That works OK although slower as it is Java based.
I've tried running PL/SQL Developer under Wine but it seems to have a few quirks. For instance the object browser on the left always shows an extra red X in the object list and closing and opening a list results in duplicate entries. Also the find text function in the editor does not work. It doesn't accept input.

Johan Louwers said...

Hi Ruud,
yes I have tried the Oracle SQL developer however I like PL/SQL developer so much I can live with the red X.... :-) However... I have not been able to locate the duplicates you mentioned. I did however find some strange behavior with blocks of selected code and de-selecting them in the editor. Maybe this makes me change somewhere in the future.

Regards,
Johan Louwers.

UFUK TÜL said...

thank u very much man. It is awsome

UFUK TÜL said...

it is working and awsome... thank you very much man

Anonymous said...

I use "Insight Developer" from www.tncas.com
No need to do so many step,easy to use and cost effectively.

Gerson said...

Thank you Joahn , it worked very wellas mentioned above. Just a little correction.I had to change the path value using linux way and using absolute linux path like /home/myuser/wine/... instead of c:\windows\wine

Tkanks a lot

Gerson Silveira