Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: starting and stopping db instances
Hi,
You can write a cmd file, which is like a batch file (.bat). Write down all the scripts that are required for shutdown and startup etc.. use 'at' command for scheduling it. The help of AT is below.
The AT command schedules commands and programs to run on a computer at a specified time and date. The Schedule service must be running to use the AT command.
AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]] AT [\\computername] time [/INTERACTIVE]
[ /EVERY:date[,...] | /NEXT:date[,...]] "command"
\\computername Specifies a remote computer. Commands are scheduled on the
local computer if this parameter is omitted. id Is an identification number assigned to a scheduled command. /delete Cancels a scheduled command. If id is omitted, all the scheduled commands on the computer are canceled. /yes Used with cancel all jobs command when no further confirmation is desired. time Specifies the time when command is to run. /interactive Allows the job to interact with the desktop of the user who is logged on at the time the job runs. /every:date[,...] Runs the command on each specified day(s) of the week or month. If date is omitted, the current day of the month is assumed. /next:date[,...] Runs the specified command on the next occurrence of the day (for example, next Thursday). If date is omitted, the current day of the month is assumed. "command" Is the Windows NT command, or batch program to be run.
Hope it helps.
Puneet
<chienli_at_uclink4.berkeley.edu> wrote in message
news:7nq59u$upn$1_at_nnrp1.deja.com...
> 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.
>
> Initially I tried to just use REXEC to connect to the server and execute
> the shell script, but since rexec does not start a shell
> connection, I can't get svrmgr to work correctly (many of its
> required initialization are not there?)
>
> So I am wondering if there are other ways I can do this from my client
> VC++ program, I looked through OCI but didn't find anything there
> regarding to starting up and ending oracle instances either. Are there
> some tools or parts of OCI that I overlooked?
>
> any help will be greatly appreciated
> thanks
> Chienli
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Thu Jul 29 1999 - 14:25:01 CDT