|
|
Check & verify Oracle windows services
Oracle Database Tips by Donald Burleson |
Question: How do I
verify that my Oracle Windows services are running? I want to monitor and
verify that the Windows services are always available?
Answer: In Oracle Windows
you can check for the Oracle services with these commands, and you can
encapsulate the services monitoring with a "check script".
The Windows Oracle database must attach itself to a running Windows process, and it
is the Windows Service that provides this process. Most DBAs think that the
Windows service is the Oracle database but that is not true. The Windows service can
start/stop the Oracle database, but it can also be started without starting the
database.
Most Problem with the Windows Service for the Oracle database involve the service
starting but the database not starting.
If the Windows service is set to automatically start when the server boots
but the Oracle database does not start, you may have a improper registry setting or you
may have a bad service.
1. Check Task Manager for the ORACLE.EXE process. If it is present,
then the service started.
2. Check the Alert Log for the database. If the problem is not with the
database, there will be no indication in the log that the database even
tried to start.
3. Check the oradim.log in the
$ORACLE_HOME/database directory for errors. Check the date on the
log file as versions before 9i did not date/time stamp the entries.
If there are no errors in the logs then try and start the Oracle database.
C:> sqlplus "/ as sysdba"
connected to an idle instance
SQL> starup
If the Oracle database starts great, the problem is in the service.
To check the Windows service:
Open the registry with regedit. Always back up the registry before making
changes. Navigate to the key entry in the Windows registry:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\oracle_home_name.
There will be a key called:
ORA_SID_AUTOSTART. SID is your database SID.
This key should be set to TRUE. If not the server starts but does not start
the database. There is also an ORA_SID_SHUTDOWN which you want to be TRUE so
that if the server is shut down the service will shutdown the database.
If you want to manually start the database set
ORA_SID_AUTOSTART to FALSE. The Windows service will start but not the
Oracle database.
Test the Windows Oracle service.
If the ORA_SID_AUTOSTART setting was the
problem, change it to TRUE and then test the service by stopping and then
restarting the service to see it the database automatically starts. If it does,
then that fixed your problem......or maybe it didn't. Reboot the Windows
server to verify that the database will start automatically. Sometimes the
service will work, only to fail again after a reboot. If the Windows service fails after
rebooting you will need to recreate it. This is where the oradim utility is useful.