Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Start service with VB
scotty wrote:
> Not if he cant get in the damn room where the computer is it isn't.
Ah.. but then how do you expect to start and shut down the service then via VB? To perform remote service administration requires proper NT security and authentication, to allow the client to control the services. This also will unlock a pretty large security hole into your server, as the service management is happening from 'end-user' machines.
>>So have him click the START and STOP services button. Set the Oracle >>Services to MANUAL which means that it will not start by default when the >>machine is booted.
If you did, then I missed it.
> Do you always fly off the handle without knowing what you're talking
> about? What you *should* know, if you had bothered to read what I
> wrote previously is that I want the ability to start and stop the
> service over a network but I don't want to hand over admin rights for
> my whole box or leave my room open 24/7- hence the problem.
Nope. What you originally said (and what I replied to) was that you wanted to control (i.e. stop and start) NT services (Oracle in particular) via VB. To which I gave you the exact Win32 API details on how to do it.
If you asked for a solution, instead of jumping to the conclusion that you need VB, then I would have suggested the following:
Create 2 CMD files. One to start the Oracle services. One to start the Oracle services. The command is NET START <servicename> and NET STOP <servicename>. You will find the name of the Oracle services in Service Manager.
Test these 2 CMD files to make sure they work. Now copy them into your IIS's (or any other web server's) CGI directory. Also a good idea to protect this with basic web authentication so that students who know can access the CGI's to stop and start the server.
To make the CMD files proper CGI's, you also may want to add the following as the header to the CMD files:
-- @echo off echo.Content-Type: text/html; echo. echo. ..rest of the cmd file -- Maybe also throw in a <PRE> and </PRE> before and after the shell command, as this will correctly format the STDOUT output. Give the students the URLs to the CGI to start and stop Oracle. -- BillyReceived on Wed Nov 20 2002 - 07:02:00 CST
![]() |
![]() |