Monday, May 3, 2010

How to get SQLDeveloper working on Windows 7




Oracle SQL Developer 2.1

I have a 64 Bit Windows 7 installed in my laptop. So I downloaded and installed 64 bit Java software in my machine. Next I found where the jdk was installed (usually it is in the "C:\Program files\Java\jdk<version>". If you cannot find it, go to c:\ and type dir jdk*.* /s /p - 's' will search recursively and 'p' will pause after each page of display). Go to the directory where you have unzipped the SQLDeveloper and open the SQLDEVELOPER.conf file and updated the variable SetJavaHome (This file is located at sqldeveloper\sqldeveloper\bin directory. Then click on the sqldeveloper.exe (located in the same directory), a command window is opened and lanuches SQLDeveloper in a new window. (Note:Do not use the SQLDeveloper.bat - available in the same directory - to launch SQLDeveloper. This would result in problems Procedures/Packages/Function toolbar (see below)


This is the Screen from as launched from SQLDeveloper.bat;As you can see, Both the Compiler options and Procedure Toolbar are missing(Screen -01)


This is the Screen from as launched from SQLDeveloper.exe;As you can see, Both the Compiler options and Procedure Toolbar are present(Screen -02)



Version Screen for Sqldeveloper.bat(Screen -03)



Version Screen for Sqldeveloper.exe(Screen -04)







SO Exception, TNS-12514 and other errors



My Windows 7 was giving troubles of late and was crashing (Blue-screen-of-death) almost 3/4 times daily (Need to figure out that one at some other point of time). Naturally, the Linux OS installed in the VMware, also started giving problems. For the last two days, I could not connect to Oracle from SQLDeveloper. First I got ORA-12541 (Screen -1), then, ORA-12514 error and lastly, a "SO Exception".

Lastly, I logged into SQLPLUS as sys and ran the following command:-
Show parameter local listener (Screen -02).

Bingo! I found that the port number was wrong. Instead of 25000,my tnsnames and listener was set at 3801. Modified the listener.ora and tnsnames.ora and SQLDeveloper was able to connect again (Screen -03)