Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Restart a Generic Service in Windows 2003 Server

Posted on 2009-07-06
5
Medium Priority
?
713 Views
Last Modified: 2012-05-07
Hi Experts,

Please can you assist in the scenario below?

We have a windows 2003 clustered server (2 nodes)

The cluster has a resource setup as a generic service.

We require the service to be restarted on a daily schedule.. can you advise the best way? With it being a clustered resource, does it make more difficult.

A scheduled task with a srcipt would be ideal.
Thankyou,




0
Comment
Question by:wk6838
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:marcustech
ID: 24786521
create a .bat file in note pad with

net stop "service name"
net start "service name"
(keep the speach marks " - and replace service name with the exact name of the service)

in schedualled tasks, set it to run at required time.

enoy
0
 
LVL 85

Accepted Solution

by:
oBdA earned 1000 total points
ID: 24786536
This is a cluster; do NOT use "net stop" or "net start"!
You need to use cluster.exe to take the resource offline and then back online again:
REM stop the service:
cluster /cluster:<Clustername> res "<Some Generic Service>" /offline
REM start the service:
cluster /cluster:<Clustername> res "<Some Generic Service>" /online
0
 

Author Comment

by:wk6838
ID: 24789525
thanks for the comments. Yes it is a cluster.
oBdA > If I put the command in the script will it also bring down the dependancies?
0
 
LVL 85

Expert Comment

by:oBdA
ID: 24789683
It will take down all resources that are dependent on the service (but not resources that the service depends on).
If you have other resources that are dependent on this service, and you want to bring them all online after stopping the service, simply bring the whole group online:
cluster /cluster:<Clustername> group "<Some Resource group Name>" /online
0
 

Author Comment

by:wk6838
ID: 24821405
This has worked successfully thankyou
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question