I never had so much trouble installing an Oracle version on a Windows OS as I had with installation of Oracle 11R2 on Windows 7 (64-bit). The issues I faced were twofold:
- First I got messages (during installation of the software) that files could not be found in the target oracle folder
- Second, after finding the solution for the first annoyance, I spent two hours finding out why everything installed correctly, I could create a database, but could not start a Listener. I am an Administrator on my laptop. The errors I got at starting a listener were ORA-12560 and ORA-12541.
It appeared to be very simple: when you download Oracle 11 R2, there are two zip files. Make sure to extract both zip files into the same folder and not into two separate folders (like a Disk1 and Disk2 folder). After extracting both zip files into the same folder, the installation went smooth without errors.
After a fresh installation and creation of a database, I am used to open a Command prompt, start LSNRCTL, and execute a START to start the default listener. If a Windows Service does not exist yet, LSNRCTL throws some errors around that but as part of this it creates the Windows Service. But not this time. I kept on getting the result:
C:\>lsnrctl start LSNRCTL for 64-bit Windows: Version 184.108.40.206.0 - Production on 18-MRT-2011 21:48:56 Copyright (c) 1991, 2010, Oracle. All rights reserved. Starten van tnslsnr: Even geduld a.u.b. TNS-12560: TNS: fout bij protocoladapter. TNS-00530: Fout in protocoladapter.
and a LSNRCTL status gave me:
C:\>lsnrctl status LSNRCTL for 64-bit Windows: Version 220.127.116.11.0 - Production on 18-MRT-2011 21:52:02 Copyright (c) 1991, 2010, Oracle. All rights reserved. Verbinding wordt gemaakt met (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=18.104.22.168)(PORT=1521))). TNS-12541: TNS: geen listener. TNS-12560: TNS: fout bij protocoladapter. TNS-00511: Geen listener 64-bit Windows Error: 61: Unknown error C:\>
But no listener got created. The Oracle support site, nor any forum or blog pointed me in the correct direction. The only thought I had was: I know Windows requires the Listener to be present as a Service, so as long as that is not the case, it will not start. So here is what I tried: I created the service myself using the Windows “sc” command. Now a first attempt gave an Access Denied, but after storing the command in a Batch file and executing the batch file to “Run as Administrator” (right-click the command file and choose that option), the service got created!
The SC command used was: sc create OracleOraDb11g_home1TNSListener binPath= “C:\app\toine\product\11.2.0\dbhome_1\BIN\TNSLSNR.exe” (take care of the space after binPath= !)
And after starting it using the Service Control Panel, LSNRCTL gave me a good status:
C:\>lsnrctl status LSNRCTL for 64-bit Windows: Version 22.214.171.124.0 - Production on 18-MRT-2011 21:57:57 Copyright (c) 1991, 2010, Oracle. All rights reserved. Verbinding wordt gemaakt met (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=126.96.36.199)(PORT=1521))). STATUS van LISTENER ------------------------ Alias LISTENER Versie TNSLSNR for 64-bit Windows: Version 188.8.131.52.0 - Production Startdatum 18-MRT-2011 21:57:48 Ingeschakeld 0 dagen 0 uren 0 minuten 9 seconden Traceerniveau support Beveiliging ON: Local OS Authentication SNMP OFF Parameterbestand van listener C:\app\toine\product\11.2.0\dbhome_1\network\admin\listener.ora. Log van listener c:\app\toine\product\11.2.0\dbhome_1\log\diag\tnslsnr\mypc\listener\alert\log.xml Traceerbestand van listener c:\app\toine\product\11.2.0\dbhome_1\log\diag\tnslsnr\mypc\listener\trace\ora_6728_7012.trc Overzicht beluisteren eindpunten... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=184.108.40.206)(PORT=1521))) Overzicht van services... Service "ONTW112. MYPC.MYDOMAIN.NL" heeft 1 instance(s). Instance "ONTW112", toestand UNKNOWN, heeft 1 handler(s) voor deze service... Uitvoeren van opdracht is geslaagd.
and I could login using Oracle Net :-)
The problem appeared to be Administrative privileges. Which was not obvious to me at first. I wondered why the installer could create all necessary services, whereas LSNRCTL was not able to create the Listener service. I stopped and deleted the service again (using “sc delete”) and started LSNRCTL.EXE as Administrator (go to the Oracle\bin folder and right click LSNRCTL.EXE. That lead to the same result: a START within that LSNRCTL session created the Windows Service as I am used to from other Oracle installations on Windows I did many times.
After all it is probably a logical error on Windows 7. What bugs me is that I did not read it somewhere and that the errors did not point me to the problem. They pointed me towards some network problem. I almost wonder whether I missed some guideline. Still, it may help others, who have the same trouble.