Planning & Consolidation > COGNOS Planning

script to stop services, reboot servers, and start services in appropriate order

(1/4) > >>

Does anyone have knowledge of how to automate the following processes in a multiple server environment?

1.  Stop all services in the appropriate order
2.  Reboot all servers
3.  Start all services in the appropriate order

I currently have all servers scheduled to reboot at staggered times, but this has the Content Manager server stopping services first and then starting them first before any other services have been stopped, etc.

Windows 2003
SQL Server 2005
Cognos Planning 8.4.1

Hey Jeff,

I did a quick google search for this.  Take a look at:

This basically allows you to use the sc.exe (services console) to trigger a restart of a service.  To simplify your process and eliminate one extra step, you could set all cognos services to manual, and script a restart using the shutdown -r -m server01 (where -r is restart, -m is machine, server01 can be replaced by IP or Machine name).  Since the service is set to manual, use a SC.exe command to restart the services in the correct order on each machine.  Example: sc \\server01 start "IBM Cognos 8 Planning 8.4"

You'll probably want to keep this script on a file server that won't be restarted very often.

Thanks, Eric!  Let me do some testing with this in DEV, and I'll get back with you.

Sounds good!

I'll be interested to see how you make out.  I like learning about system administration topics in combination with Cognos.  :)

Hi Jeff,

In the project I work now we shutdown our windows server rarely. So I have to find a way to reboot the cognos part . The easiest way we find it's script :

C:\WINDOWS\system32\sc.exe Query "IBM Cognos 8" | Find /I "Stopped" > nul
net START "IBM Cognos 8"

With that we closed Cognos ans reopen it each morning. The "IBM Cognos 8" is the service name If it's running we close it and reopen it. That way to do thing have nothing to do with the reboot of the machine. When the windows server is shutdown cognos restart automatically.
 I hope this help.

Regards Jacques


[0] Message Index

[#] Next page

Go to full version