Skip to Main Content

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Rajesh.

Asked: July 13, 2001 - 5:09 pm UTC

Last updated: April 27, 2004 - 5:10 pm UTC

Version: 8.1.6.3

Viewed 1000+ times

You Asked

Hi Tom,I have been asking regular questions from you. I hope that does not bothers you too much. I have made a recent trasition from Unix to NT so I am little confused about services in NT for
the Oracle DB. In NT there is something called 'SERVICE'. How is that connected to DB ? If that service is stopped then what does that mean - the database is up or not ?

If we have to shutdown that database normally then if we stop the service, will the database be shutdown ? or we have to stutdown the database then dtop the service. What should be the sequence for shutting down the database and bringing it up again so that database
keeps running smoothly? I hope my question is clear.

Basically I want to know the relationship between the service and database up/down status/procedure.

and Tom said...

Sorry to hear of your predicament. I hope you can get back to unix soon ;) (hey, we are all entitled to our opinions)

The SERVICE is how the database "bootstrap" process gets going. If the service is running that means the database may or may not be up. If the service is NOT running, the service will NOT be up.

When the service is running, normally it indicates the database is up and running (but does not imply that it is). For example, I have my 9i instance setup so that it does NOT startup with the service starting up. So, I have to start the instance and then I use sqlplus to startup the database.

You can use sqlplus/svrmgrl to shutdown normal the database, typically, the stopping of the service will actually "crash" the instance (NT can be impatient and can kill the service on shutdown instead of waiting for it to end).

The relationship between the OracleService%ORACLE_SID% and the datebase "up down" state is this:

o if the service is not running, the database is definitely not up

o if the service is running, the database might be up and if it is not, you can start it up.


follow up to comment three

I find that time spent in books and manuals is not wasted.

where do you think I get many of my answers from? I read the manuals and books. I used the software.

This was not one of them, but I frequently get questions that I answer with a simple URL pointing the questioner to the documentation. I would urge and encourage everyone to read the manuals. There is some truly useful information in there.

Start with the server concepts manual (which I reread with every release).

it is DEFINITELY not a waste of time.



followup to comment 5

Thats just part of the story... there are two other parameters you need to be aware of as well:

ORA_SID_SHUTDOWN
Possible values: TRUE or FALSE
Set this to TRUE to enable the proper shutdown of the database

ORA_SID_SHUTDOWN_TIMEOUT
Possible values: timeout in seconds (30 for example)
Sets the maximum time (in seconds) to wait for the
shutdown to complete before the service for a particular SID stops.
This timeout should be set high enough to give the database time
to complete the shutdown.
If this is lower then the time needed, you won't have a clean shutdown!
You can check this in the alert file.

ORA_SID_SHUTDOWNTYPE
Possible Values: i , t , a.
where n = shutdown normal
i = shutdown immediate
and a = shutdown abort

If the entry's are not set, stopping an service will do WORSE then an shutdown
abort. Windows NT / 2000 will just "clean" the memory. This could be compared
by a kill -9 on unix.


So, NT will still crash your instance if the database takes longer then it likes to shutdown. NT has ( i believe ) a 20 second default in addition upon which it'll kill the service. There is a registry WaitToKillServiceTimeout that controls this.

Rating

  (10 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

What is the feature of oracle

Anna Lee, July 13, 2001 - 10:33 pm UTC

Hello .
I am confuse when I am studying the oracle web site .There are many information about the oracle .Can you show me briefly about the feature of Oracle and what is the different between oracle and dBASE2 only .
Thank you .

A reader, July 14, 2001 - 10:23 am UTC


Excellent explanation

Rajesh, July 16, 2001 - 10:35 am UTC

The explaination was very mushc concise and upto the point. That's the reason I alway look forward to asking you instead of wasting time in books and manuals.

Got you !!

A reader, July 16, 2001 - 12:54 pm UTC

I understand the utility of manuals and books but most of the documentation is targetted to a broad audience. They explain most of the things with example but at times they overlook certain things so at times the specific answer u r looking for a particular issue is not clearly explained....Just like the explanation that u have provided for services and Database status is not there in any of the books and only by experience one can understand these things and share it with others.

Autostopping the instance

A reader, July 16, 2001 - 1:16 pm UTC

There is a registry value you can use to have the service shutdown the instance for you to avoid instance recovery. With v8.0.5 on NT, I used ORA_{SID}_SHUTDOWN = TRUE. (as always, check the details out for yourself first)

Oracle Database and NT Services

Umesh Patel, October 29, 2002 - 2:36 am UTC

Got some very useful information regarding automatic startup and shutdown of Oracle database.
For Windows 2000 and oracle 9i, the registry key is HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0
the String is ORA_DEPLOY_SHUTDOWN

Don't know if it is the same for all other versions of Windows and Oracle.

Win200 Services and Patch

Teddy, December 11, 2002 - 1:31 pm UTC

OK, this is clear.
What I am not sure about is this:
Which services do I have to shutdown before installing a patch or upgrading? I have to install the Server Patchset 4 for 9.0.1.3.x (=> 9.0.1.4) and have multiple installations of OraServ (8.1.7,9.0.1.3,9.2),iAS (1.0.2.2.1) AND tools (iSuite) on that server. So I have following services (* indicates, that these are started):

OracleOraHome81xxx
(xxx:Agent,ClientCache,CMAdmin,CMan,DataGatherer
HTTPServ,MgmtServ,PagServ, TNSListener)
(*) OracleOraHome901xxx (Agent*,ClientCache*,HTTP,PagServ,
SNMPyyy,TNSListener*)
OracleOraHome92xxx (Agent,ClientCache*,HTTP,MgmtServ,
PagServ,SNMPyyy,TNSListener*)
OracleServiceDB81
* OracleServiceDB901
* OracleServiceDB92
(*) OracleiSuitesyyy
(yyy: Agent,CLientCache,DataGatherer,
HTTPServer(*),TNSListener, Webzzz)

* Oracle Forms Server [Forms60Server]
* Oracle Reports Server [Rep60_<node>]
OracleDiscoverer4i

OracleClientCache80

Oracle OLAP 9.0.1.0.1
Oracle OLAP Agent
Oracle Web Integration Server
OracleMTSRecoveryService
OracleSMNPPeerEncapsulator
OracleSMNPPeerMasterAgent

some of them not having a version, so I don't know, whether
-they will crash on installation of the patch, or whether
-I won't be able to start/restart them after the installation.

I think, the patchset installation affects all 901 services and DBs, so I will have to shutdown/stop them.
I am not sure about the last 6 (probably will have to stop the OLAP services too), which causes headache to me ;-)

What do you say, Tom ?

Thanks in advance

Teddy

Tom Kyte
December 11, 2002 - 10:25 pm UTC

shut them all down. windows loves to be rebooted, they'll restart after that.

better safe then sorry - you'll end up in DLL hell with some dll being locked in some fashion otherwise.

A reader, May 17, 2003 - 2:06 am UTC

Tom,
i see the following services installed in my system - windows2000. can you please provide me with information of each of these services. few of this i know.

i searched your site, i didnt get.. if you get time please answer or a link would do.

OracleMTSRecoveryService
OracleOraHome90bAgent
OracleOraHome90bClientCache
OracleOraHome90bHTTPServer
OracleOraHome90bPagingServer
OracleOraHome90bSNMPPeerEncapsulator
OracleOraHome90bSNMPPeerMasterAgent
OracleOraHome90bTNSListener
OracleOraHome90ClientCache
OracleServiceORACLEB

Thanks for you valuable time and effort.



thanks tom

A reader, May 17, 2003 - 12:29 pm UTC


Microsoft KB835732 patch stop OracleServices after reboot !!!

Sven Bleckwedel, April 27, 2004 - 5:10 pm UTC

Tom,

Please, the windows users must be warned about this. I had helped a business last saturday about this issue. After some research, I found a reference that this "hotfix" (from Microsoft) could stop Oracle Services. Removing this "patch" this problem "disappear":

>Microsoft Security Patch KB835732 on MS Windows 2000 Server with ORACLE 8.1.6.0.
>--------------------------------------------------------------------------------
>
>Environment:
>
>ORACLE (Rel.8.1.6.0) on Microsoft Windows 2000 Server OS.
>
>We had just installed the latest security patches, issued by Microsoft last
>week (there were six of them), when we found out that our database instances
>wouldn't startup after the next OS reboot. By trial-and-error (uninstalling and
>reinstalling the patches one-by-one from Windows Update), we concluded that the
>patch causing the problem was the one numbered KB835732. We had to leave it
>back uninstalled in order to be able to use our database servers (so far, I was
>not able to find out what this could cause to our environment in terms of
>security...).
>
>Has anyone else met this problem? Does anybody know how to resolve this issue (
>if there is any resolution at all...)?
>
>Regards,
>P.Tsapralis,
>Greece.
>__________________
>Panos Tsapralis,
>Software Engineer,
>Athens, GREECE.
>
>#2 04-20-04, 18:48
>tlael
>Slacker Join Date: Oct 2003
>Location: St.Louis,MO
>
>See if you have any issues that may be affected by this update.
>Detailed information about security patch KB835732 is here.
>
></code> http://www.microsoft.com/technet/se...n/MS04-011.mspx <code>
>
>tlael
>
>#3 04-22-04, 13:50
>MikeDB
>Registered User Join Date: Apr 2004
>Location: London
>Posts: 1
>
>Re: Microsoft Security Patch KB835732 on MS Windows 2000 Server with ORACLE 8.1.6.0.
>------------------------------------------------------------------------------------
>
>Hi,
>
>we have Oracle 9i and the same thing happened, Oracle wouldn't start it
>returned the error "shared memory realm does not exist"
>
>Uninstalling it fixed the problem, other than that I have no solution
>
>regards,
>
>Mike
>
>#4 04-22-04, 16:22
>
>Same error
>--------------------------------------------------------------------------------
>
>We have exactly the same issue on 8.1.6
>Symptoms we noticed were Oracle Service reports as "Starting" not started
>Oradim.exe continues to run indefinately.
>using svrmgrl to stop and start the Db made the db accessible. Killing oradim
>changed the Service status to Started (the above svrmgrl steps were required to
>mage it accessible though).
>I actually posed about this (not knowing the answer 2 days ago). The patch
>seems to be for Terminal Services. I had not installed terminal services and
>tried adding this and then reapllying the patch to see if it made any
>difference (it didn't) thank god this patch can be uninstalled some of them
>cannot!! Is there anything on msdn or microsoft or oracle sites about this?
>
>Oisin

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library