Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Automating shutdowns

Re: Automating shutdowns

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1998/02/11
Message-ID: <6bs5hp$dhv$7@news02.btx.dtag.de>#1/1

On 10 Feb 1998 14:24:33 GMT, "Patrick Bogers" <p.bogers_at_scope-mt.nl> wrote: Hi,

a slightly better solution might be:

shutdown.sql :

SHUTDOWN IMMEDIATE;
STARTUP RESTRICT;

ALTER SYSTEM SWITCH LOGFILE;
ALTER SYSTEM SWITCH LOGFILE;	(number_of_online_redologs) + 1 times
ALTER SYSTEM SWITCH LOGFILE;
ALTER SYSTEM SWITCH LOGFILE;

ALTER DATABASE BACKUP CONTROLFILE TO TRACE; SHUTDOWN; After the immediate shutdown the startup will clean up dangling transaction so that db will be brought down in a 'clean' state. Switching logfiles forces the online redo logs to be archived.
--
Regards
Matthias Gresz :-)


>
>Brian Camper wrote in message <01bd3285$a86173c0$03e057cf_at_brianc>...
>>Hello,
>>
>>I am fairly new at Oracle, and I am wondering how/if you can create a batch
>>file to shutdown a database instance on a Windows NT Server running Oracle
>>7.3.3.0.0. I have found examples on how to do this in Unix, but I can not
>>do the same procedures on a NT 4.0 environment. Let me know if anyone else
>>has tried to do this.
>>
>>Thanks in advance,
>>
>>Brian Camper
>>
>>brianc_at_cmhc.com
>
>Try creating a cmd-file with the following text:
>
> set oracle_sid=<SID>
>
> <ORACLE_HOME>\bin\svrmgr23 @shutdown.sql
>
> net stop oracleservice<SID>
>
>
>usually <ORACLE_HOME> is C:\ORANT
>In the shutdown.sql script put the following;
> spool shutdown.log (if a log-file of shutdown is required)
> connect internal
> shutdown immediate
> exit
>
>
>
>Patrick
>
>
-- Regards Matthias Gresz :-)
Received on Wed Feb 11 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US