pgineste_at_gfi.fr (Pascal Gineste) wrote in message news:<e77e76b5.0301150642.2cbf74c_at_posting.google.com>...
> I have 8i (8.1.7) database that starts automatically when
> OracleServices<SID> is started from the control panel/Services.
>
> I can stop the database using .cmd file that contains such
> line:
>
> stop.bat
> oradim.exe -shutdown -sid <SID> -usrpwd <MDP> -SHUTTYPE "INST"
> -SHUTMODE "N"
>
> oradim.exe -shutdown -sid <SID> -usrpwd <MDP> -SHUTTYPE "SRVC"
> -SHUTMODE "N"
>
> With this batch, the database is closed correctly, and this operation
> is traced in <Sid>Alrt.log
>
> However, when performing all this two lines in one step in my
> stop.bat command file:
>
> oradim.exe -shutdown -sid <SID> -usrpwd <MDP> -SHUTTYPE "SRVC,INST"
> -SHUTMODE "N"
>
> the service is directly stopped without closing the database properly
> (no shutdown is performed; even an abort one): no log is traced in
> <Sid>alrt.log and the database restarts in recovery mode.
>
> So, when i stop the service OracleServices<Sid> manually in the
> control panel/services; it performs the same tasks: kill the services
> without shutdowning the database properly.
>
> I have checked the registry settings in
> HKLM\Software\Oracle\Home<N>
> and i have got :
> ORA_<SID>_SHUTDOWN = "TRUE"
> ORA_<SID>_SHUTDOWNTYPE = "i"
> ORA_<SID>_SHUTDOWN_TIMEOUT = "60"
>
> Rem: 60 is enough because it took 2 seconds to kill the service
> (without shutdowning the instance ....).
>
> I tried to delete the service; delete the entries related to
> this <Sid> from the registry and recreate the service with:
>
> C:\ORANT81\bin\oradim -new -sid <SID> -startmode manual
> C:\ORANT81\bin\oradim -edit -sid <SID> -usrpwd oracle -SHUTTYPE SRVC
> -SHUTMODE i
> C:\ORANT81\bin\oradim -edit -sid <SID> -startmode auto
>
> -> it recreates the same entries in the registry.
>
> However, the problem is still there ?????
> Can you help me ?
> I would like this database to shutdown automatically when machine is
> shutting down.
>
> PS: SQLNET.AUTHENTICATION_SERVICES = (NONE) or (NTS)
> -> the behavior is similar.
>
> Thank you in advance,
> P. Gineste
First of all you are using -SHUTMODE "N"... this makes the database
wait until all sessions are disconnected before shutting down. Use
-SHUTMODE "I".
Secondly, I personally don't like to use oradim tool other then to
create and delete a SID service. I have found Oradim to behave
strangely sometimes when used to shutdown or startup the database. If
you want to shutdown the database cleanly, I would suggest you modify
your batch file e.g.
stop.bat
_at_echo off
REM Shutdown database
set oracle_sid=<SID>