COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => COGNOS 8 Administration => Topic started by: jive on 25 Jun 2010 09:24:37 AM

Title: Script to stop cognos server
Post by: jive on 25 Jun 2010 09:24:37 AM
Hi,
Can someone point me in the right direction on that topic, I tried to find some script to stop start cognos server periodically , after backup was done. the os on the server side is windows 2003 server. I try to find something but nothing coming up. I also have the intuition if we can launch a script whit the executable of cognos server with argument like : "cogserver.exe start-stop" Is it possible to do that on windows. Anyway any input to reading I can done or script exemple qill greatly help me.

Thanks for your time.
Jive
Title: Re: Script to stop cognos server
Post by: smiley on 27 Jun 2010 08:22:06 AM
The windows equivalent of stopping the service is called "net stop" (and net start to start)
lookup the full NT service name, as i don't have a BI in front of me. The full command should be something like:

Net stop "IBM Cognos 8 BI"
Title: Re: Script to stop cognos server
Post by: dlafrance on 30 Jun 2010 07:48:17 AM
I was using in my server :

net stop "IBM Cognos 8"
Title: Re: Script to stop cognos server
Post by: MellBI on 06 Jul 2010 04:26:03 AM
Hi,

This is a script I use in a Bat-file scheduled in Windows that restarts the Cognos services every evening...


Echo off
C:\WINDOWS\system32\sc.exe STOP "IBM Cognos 8.4"
:Wait1
C:\WINDOWS\system32\sc.exe Query "IBM Cognos 8.4" | Find /I "Stopped" > nul
If Errorlevel 1 Goto :Wait1
C:\WINDOWS\system32\sc.exe START "IBM Cognos 8.4"


C:\WINDOWS\system32\sc.exe STOP "IBM Cognos 8 Planning 8.4"
:Wait
C:\WINDOWS\system32\sc.exe Query "IBM Cognos 8 Planning 8.4" | Find /I "Stopped" > nul
If Errorlevel 1 Goto :Wait
C:\WINDOWS\system32\sc.exe START "IBM Cognos 8 Planning 8.4"


/MellBI
Title: Re: Script to stop cognos server
Post by: jive on 06 Jul 2010 02:51:02 PM
Thanks every one for your help on that,

I just schedule 2 task  a) netstop  b)nestart  an hour between each of them. and everything work find for now. MellBi thanks for the script too, I will show that to the person responsible for the windows server.

thanks again
Title: Re: Script to stop cognos server
Post by: Suraj on 07 Jul 2010 12:21:24 PM
We used the following:

NET STOP Cognos8
echo Waiting 30 seconds for shutdown...
@ping 127.0.0.1 -n 2 -w 1000 > nul
@ping 127.0.0.1 -n 30 -w 1000> nul
NET Start Cognos8
Title: Re: Script to stop cognos server
Post by: johnk on 14 Jul 2010 08:56:50 AM
We also use a start/stop script during early monring times when data loads are being run.  For us a key point was the wait time so that the Content Managers come up in the order we want them to (we want a specific server to be the primary CM and then two others to be in standby).   We have a wait time of 4 minutes between starting the services on multiple servers to give time for the install that has all C8 components to fully start up.