|
-
Jun 6th, 2001, 02:13 PM
#1
Thread Starter
New Member
NT Services
I have two NT servers, v4.0, that I need to run verified backups on; I scheduled the backups using the AT command and ntbackup, no problem. However, on one server I need to stop the SQLServerAgent and MSSQLServer services, and on the other I need to stop two services named DiskXtender Agent and DiskXtender Server. The backup will run and (the idea is that) it will verify OK, then the services will be restarted. I was planning on making one VB executable for each server, using the AT command to schedule it, and passing a command-line switch to tell the VB executable to start or stop its appropriate services. Is it possible to write VB code to start and stop individual NT services?
-
Jun 6th, 2001, 02:26 PM
#2
Junior Member
Starting, Pausing, and Stopping NT Services
-
Jun 6th, 2001, 02:58 PM
#3
Thread Starter
New Member
Thanks, looks like it will work! But it doesn't want to let me make a reference to ActiveDS.TLB... any clue on that one?
-
Jun 6th, 2001, 03:40 PM
#4
Junior Member
This is what i did.
I added a command button and a combo box.
Named them correctly.
changed in .bas to allow object to see the form:
cboService.AddItem oSvc.Name to Form1.cboService.AddItem oSvc.Name
Added the Reference
project -> references -> Active DS Type Library
And the code flew.
I am running win 2k, vb 6.0.8169
Not sure if something else needs to be installed for the Active DS Type Library to be used as a reference.
Hum... shut the service down...Now how to start it back up with code?
-
Jun 6th, 2001, 03:43 PM
#5
Thread Starter
New Member
I read, but I don't comprehend (duh).... the reason I couldn't add the reference was: Project/Components (where I went) is *NOT* the same as Project/References... 
Thanks again!
-
Jun 7th, 2001, 09:50 AM
#6
Addicted Member
what software are you using??
Due to the energy crisis, the light at the end of the tunnel has been turned off.
Sorry for any inconvenience this may cause
-
Jun 7th, 2001, 09:52 AM
#7
Thread Starter
New Member
VB Learning 6.0. The compiling machine is Win 2000 Pro workstation and the two servers in question are Win NT 4.0; one of the servers is running MS SQL 7.0.
-
Jun 7th, 2001, 09:53 AM
#8
Addicted Member
soz, i mean ... what backup software are you using??
Due to the energy crisis, the light at the end of the tunnel has been turned off.
Sorry for any inconvenience this may cause
-
Jun 7th, 2001, 10:02 AM
#9
Thread Starter
New Member
Oops, sorry! Just using plain-vanilla NT backup -- I don't have the budget for Backup Exec, etc...
-
Jun 8th, 2001, 05:19 AM
#10
Addicted Member
before the backup run a batchfile with
net stop <service>
after the backup run
net start <service>
its what we do by using backup exec, see if nt will let you do a prejob and a postjob command.
Due to the energy crisis, the light at the end of the tunnel has been turned off.
Sorry for any inconvenience this may cause
-
Jun 8th, 2001, 07:58 AM
#11
Thread Starter
New Member
Works fine from a batch file -- this will be a good simple setup for this application, and the source code will also come in handy in the future I'm sure... thanks all!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|