Home » Infrastructure » Windows » 11g service not starting automatically on Windows 7 Professional (Oracle 11.2.0.1.0 EE, Windows 7 Professional)
11g service not starting automatically on Windows 7 Professional [message #494287] Sat, 12 February 2011 18:36 Go to next message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
I installed Oracle 11.2.0.1.0 Enterprise Edition on my home laptop computer running Windows 7 Professional months ago, set the services to start automatically and it had been working fine, with multiple shutdowns and re-starts per day, until today. I was using it earlier today, then shut the laptop down, went to lunch, turned it on again, tried to login through SQL*Plus and got:

SQL*Plus: Release 11.2.0.1.0 Production on Sat Feb 12 15:48:39 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Enter user-name: scott/tiger
ERROR:
ORA-12560: TNS:protocol adapter error


Enter user-name:


I tried restarting the computer, but still got the same result as above.

I went to:

Control Panel -> System and Security -> Administrative Tools -> Services

and confirmed that the Oracle services were still set to start automatically. The OracleOraDb11g_home1TNSListener showed started. The OracleServiceORCL showed that it was set to start automatically, but did not show started or starting or stopped. The only option displayed for it was start, not pause or stop or restart, implying that it was not started. My computer had been on long enough that it should have started and it did not show that it was trying to start or give any indication that it had tried to start and failed and showed that it was set to start automatically.

I clicked on the start option, it started, and I was able to login. If I have to, I can live with this as a workaround, but I would prefer that it start automatically like it is supposed to. I find it puzzling since it had been working and I did not change anything, at least not intentionally. The only thing that I can think of that I did differently recently was experimenting with cursors and dbms_sql in order to intentionally reproduce the error "ORA-29471: DBMS_SQL access denied" to demonstrate it in response to a thread on the SQL and PL/SQL forum: http://www.orafaq.com/forum/t/167000/43710/. However, after reproducing the error, I corrected it and was still able to exit SQL*Plus and log in again until I shut down the computer and re-started. I don't know if this is related or coincidence.

I did a google search for "windows 7 oracle 11g service not starting automatically" but did not find anything that I recognized as being helpful.

I am a retired developer, not a DBA, using a laptop computer at home, so there is no DBA to consult and my knowledge of DBA stuff is limited to what I have needed to learn out of necessity and have stumbled upon.

[Updated on: Sat, 12 February 2011 18:39]

Report message to a moderator

Re: 11g service not starting automatically on Windows 7 Professional [message #494289 is a reply to message #494287] Sat, 12 February 2011 19:08 Go to previous messageGo to next message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Hello Barbara,

Well, nothing comes to mind at first glance, but did you have a look if there are any errors or warnings in the Windows event log that might be connected to the service failing to start?
Re: 11g service not starting automatically on Windows 7 Professional [message #494290 is a reply to message #494289] Sat, 12 February 2011 20:32 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
Thanks Thomas. I found the following two entries in the Windows Event Viewer. So, I guess I need to figure out how to increase the time from 30000 milliseconds, but I wonder why it is suddenly taking longer than usual.

A timeout was reached (30000 milliseconds) while waiting for the OracleServiceORCL service to connect.

The OracleServiceORCL service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.
Re: 11g service not starting automatically on Windows 7 Professional [message #494291 is a reply to message #494290] Sat, 12 February 2011 20:38 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
I right clicked on the OracleServiceORCL and selected properties, but I don't see anything that allows me to change the time.
Re: 11g service not starting automatically on Windows 7 Professional [message #494292 is a reply to message #494291] Sat, 12 February 2011 20:52 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
It just occurred to me that I might be looking in the wrong place. Do I need to increase the 30000 milliseconds from Windows or from Oracle?
Re: 11g service not starting automatically on Windows 7 Professional [message #494297 is a reply to message #494292] Sat, 12 February 2011 22:46 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
I just tried shutting down the computer and then starting it again to see if the problem persists or was just transient. The same thing happened. Oracle failed to start with the same messages in the Windows Event Viewer. I also noticed that a few other things failed to start, like Windows Live. I also saw that it was trying to start a MySQL database that I had uninstalled sometime ago because I was having problems with it and planned to reinstall but never got around to it. Apparently that uninstall was not thorough. It seems like everything is running slow. I think I may have a more systemic problem. I have Norton Internet Security Suite set to do automatic virus scans and updates and such, so there should not be a problem there. I recently had problems with a scanner that I plug into a USB port and was advised to return the scanner for replacement, but now I wonder if the problem is something on the computer, not the scanner. I tried running some diagnostics, but didn't find anything. Something strange is going on.
Re: 11g service not starting automatically on Windows 7 Professional [message #494317 is a reply to message #494297] Sun, 13 February 2011 05:32 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10694
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Did you try creating a new Oracle service using oradim?
Re: 11g service not starting automatically on Windows 7 Professional [message #494327 is a reply to message #494317] Sun, 13 February 2011 07:24 Go to previous messageGo to next message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
A few things you might try:

First there is the command line sc.exe tool to create, configure or delete services. You could use that to get rid of the MySQL service.

Secondly, in the normal service configuration there should be an option to "retry" the service start a couple of times.

And a third option, with sc.exe you can configure a specific service to DEPEND on another specific service. It might be possible, for example, that the oracle service and the others are just not starting because something basic like networking has a problem and is not started fast enough, so all those other services fail, too.
Re: 11g service not starting automatically on Windows 7 Professional [message #494333 is a reply to message #494327] Sun, 13 February 2011 10:52 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
When I started the computer this morning, the same thing happened: I got the same error when I tried to login through SQL*Plus, found that the Oracle service had not started automatically, I started it manually, and then logged in through SQL*Plus successfully.

I don't see any point in creating a new Oracle service, since the service starts manually, so there is nothing wrong with the service. The operating system just isn't able to start it and other things simultaneously fast enough to avoid the timeouts.

I changed the MySQL service from automatic to disabled. I changed the Oracle service from doing nothing if it fails to start to waiting 1 minute then retrying each time it fails. I found where it displays dependencies and it did not show any for the Oracle service and it was grayed out so that I could not find a way to add a dependency. I seem to recall with a previous version of Windows having problems with it trying to start the Oracle service before the listener was done starting.

After making the above changes, I restarted the computer and, by the time I tried to login to Oracle through SQL*Plus, the service had started automatically and I logged in without error. So, that is good enough and I consider the problem solved.

Thomas, thank you very much for your help.






Re: 11g service not starting automatically on Windows 7 Professional [message #494335 is a reply to message #494333] Sun, 13 February 2011 11:02 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
The things that I did above, I did from the Services menu, where I don't see an option to delete a service. Although I set the MySQL service to disabled, I thought I should delete it, especially since it might interfere with a future installation. So, I tried the sc.exe, but I got the following even though I am logged into the operating system with administrator privileges.

C:\>sc delete MySQL
[SC] OpenService FAILED 5:

Access is denied.


C:\>



Re: 11g service not starting automatically on Windows 7 Professional [message #494355 is a reply to message #494335] Sun, 13 February 2011 19:46 Go to previous messageGo to next message
John Watson
Messages: 8427
Registered: January 2010
Location: Global Village
Senior Member
I delete wiondows services (regularly!) by running regedit.exe and navigating to hkey_local_machine / system / currentcontrolset / services, find it and hit delete. Then reboot, and it really is gone.

Re: 11g service not starting automatically on Windows 7 Professional [message #494412 is a reply to message #494355] Mon, 14 February 2011 07:22 Go to previous message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
Thanks, John. That worked. MySQL is gone.
Previous Topic: Oracle Client on W2K8 Server
Next Topic: ORA 12154 from other machine
Goto Forum:
  


Current Time: Sun Nov 29 17:32:09 CST 2020