Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: starting and stopping db instances
Okay - get a GOOD telnet client for Winnt that supports scripting and
seesion/script associations. (I use Reflections by WRQ. It has good vt-xxx
emulations, mainframe w/ Regis Graphics, etc) Any way, when scripting a logon,
I can actually 'record' until I say stop. (I do have to edit it to remove the
popup password dialogue and just send my password for log-on.)
I can then use the at scheduler with to schedule a bat file. In it there is one
line: the file name of the 'session profile' ex:
axpb.r4w
Because that session has the script associated, everything fires automatically,
once scheduled. You can also use things like MacroMagic, etc. Really, lots of
options. Cron jobs on the server...
Doug
Software Analyst/OCP
Puneet Khanna wrote:
> Hey David,
> He wants to run it from NT. He's already using a shell script.
>
> David F. Newman <buzzwang_at_damocles.ourvillage.com> wrote in message
> news:86oggudkbm.fsf_at_damocles.ourvillage.com...
> > chienli_at_uclink4.berkeley.edu writes:
> >
> > > Hi,
> > >
> > > I have a problem that I can't figure out how to do or even know if it is
> > > possible.
> > >
> > > The problem is that I want to shutdown and startup an oracle instance
> > > everyone hour or so. Before, how we did it was to run a shell script on
> > > the server side to schedule a bunch of batch jobs. The shell script
> > > calls svrmgrl and connects internal to do shutdown and startup. Now I
> > > would like to do this from my NT client and do the same thing from a
> > > program I am writing.
> > >
> >
> > Well,
> > You could use a script like the following and just put it in
> > cron to go off ever hour.
> >
> > #!/bin/sh
> >
> > ORACLE_SID=<insert SID here>
> > ORACLE_HOME=`grep "^${ORACLE_SID}:" /var/opt/oracle/oratab |cut -d: -f 2`
> > export ORACLE_SID ORACLE_HOME
> >
> > #########################
> > # Shutdown the database #
> > #########################
> >
> > ${ORACLE_HOME}/bin/svrmgrl <<END_OF_SHUTDOWN
> > connect internal
> > shutdown immediate
> > END_OF_SHUTDOWN
> >
> > ######################
> > # Start the database #
> > ######################
> > ${ORACLE_HOME}/bin/svrmgrl <<END_OF_STARTUP
> > connect internal
> > startup
> > END_OF_STARTUP
> >
> > --
> > David F. Newman
> > Oracle DBA
> > buzzwang_at_ourvillage.com
Received on Sun Aug 01 1999 - 02:47:30 CDT
![]() |
![]() |