Oracle 10.2 Fails to Startup with Windows Server 2003 After a Reboot

I spent all Friday trying to debug a problem with Oracle 10.2 starting up. I use Microsoft Virtual PC 2007 to virtualize Windows Server 2003, Oracle, and IIS 6 and I could not get Oracle to come up clean after a reboot of my server. The symptom – connect as SYS (sysdba) and the instance reports being idle.

Here’s what shows up in the oradim.log:

Mon Mar 31 10:38:58 2008
C:\oracle\product\10.2.0\db_1\bin\oradim.exe -startup -sid josaims -usrpwd * -log oradim.log -nocheck 0
Mon Mar 31 10:38:58 2008
ORA-12560: TNS:protocol adapter error

 What threw me for a loop was the ORA-12560 error pointing at listener or low level protocol errors. The solution for me turned out to be a fortunate blog post: Oracle Service Doesn’t Autostart The Instance in MS SERVER 2003R2?

Note – since I initially posted this, I discovered that this does not start the batch file at boot – it actually starts it when a user logs in. 

I’m still using the batch file, but I’m now using a utility from the Windows 2003 Resource Kit:

How to Run a Batch File Before Logging on to Your Computer

I needed to create a cmd interpreter batch file to start up the instance manually as follows:

@echo off
sleep 60
set ORACLE_SID=josaims
echo set echo on > %0.tmp
echo connect sys/password as sysdba; >> %0.tmp
echo startup; >> %0.tmp
echo exit; >> %0.tmp
sqlplus /nolog @%0.tmp
del %0.tmp

This file was placed on my Server 2003 file system and pointed to in the registry at the following key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

Now Oracle starts the instance on a reboot. 

What is going on here? My guess is that the Oracle instance service is starting up when networking hasn’t been fully configured in Windows Server 2003. The TNS protocol adapter error is the result since it isn’t a permanent error once the server responds to command line interpreter commands.

Ben Stein and his new movie

About an upcoming movie:

I really enjoyed Ben Stein’s work up to now (including “Win Ben Stein’s Money”), but I’m afraid my opinion of Mr. Stein has been lessened by news of his upcoming movie Expelled – No Intelligence Allowed which is coming out April 18th 2008. I have not seen this movie yet, but the scientists whom I deeply respect report misrepresentations of the project’s intent during the production of this movie. In addition, PZ Myers (who was in the movie and thanked in the credits) was “expelled” from an early screening for little provocation. Quite ironic – don’t you think? Please see this site for information about the misrepresentation made to those scientists about this project – and shame on you Ben Stein and your producers! Expelled Exposed – Flunked, not Expelled: What Ben Stein isn’t telling you about Intelligent Design