Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> Re: closing DB on NT with a scheduled BATCH FILE

Re: closing DB on NT with a scheduled BATCH FILE

From: <>
Date: Thu, 09 Aug 2001 10:19:04 -0700
Message-ID: <>

  1. Create Batch file startdb.bat

containts of startdb.bat

SVRMGRL @c:\yourdirectory\startup.sql

2. create startup.sql

containts of startup.sql

connect internal/***;
startup exclusive open;

3. Create Batch file stopdb.bat

containts of stopdb.bat

SVRMGRL @c:\yourdirectory\stop.sql

4. create stop.sql

containts of stop.sql

connect internal/***;
shutdown immediate;

now schedule startdb.bat & stopdb.bat into NT scheduler. If you want to do it thru a single bat file than call the 2nd bat from 1st.

I hope this clarifies your problem.

Ramesh D Papnoi
(BrainBench & Brainbuzz Certified Oracle 8/8i DBA & Developer)

To: internet["Multiple recipients of list ORACLE-L" <>]

Hi Ihoska ,
I am sorry to read your reply.
Firstly Not a silly question.
Yes I am sure batch file runs because I can run it directly correctly. Yes I create log file.
I investigate task manager if svrmgrl runs and look at v$session and it connects .
 So not a silly question as you see. Only thing is you do not understand the problem perhaps.

  silly question.
  Are you sure your batch file runs? Do you create logs? If so, did you check if log was created?
  How do you know it connects.
  I have similar batch files. They run either way with no problems.     -----Original Message-----
    From: Bunyamin K. Karadeniz []     Sent: Wednesday, August 08, 2001 9:15 AM     To: Multiple recipients of list ORACLE-L     Subject: closing DB on NT with a scheduled BATCH FILE

    Dear Gurus , I have a question , In fact I wonder if it is a bug of NT .

    I want to close and reopen database with a .BAT file .      When I execute the .bat file directly it executes correctly . But When I execute it with a schedule with AT command then it connects but does not close database.

    How can I handle That. ?
    What do you do when you want to schedule startups and shutdowns of database on NT?

    Thank you

Please see the official ORACLE-L FAQ:

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
To REMOVE yourself from this mailing list, send an E-Mail message
to: (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Thu Aug 09 2001 - 12:19:04 CDT

Original text of this message