Page 1 of 1

Net Stop Net Start CXMD Cognos Express

Posted: Mon Apr 04, 2011 4:08 am
by BigG
Hi, I have tried the standard method for restarting Tm1 services but in Cognos Express, so within the CXMD folder (data directory) I put a RESTART.BAT batch file. I try running as administrator and the cxmd services do not stop start, so the EXECUTECOMMAND('RESTART.BAT',0); initiated from eplilog of TI process doesnt either.

We are on 2008R2 server with Cognos express 9.5, is there something I am missing?


Batch file syntax:
NET STOP <cxmd>
sleep 120
NET START <cxmd>

thanks in advance

Re: Net Stop Net Start CXMD Cognos Express

Posted: Mon Apr 04, 2011 4:30 am
by BigG
arh,

for 2008 r2
'RESTART.BAT'>right click>run as adminstrator

NET STOP cxmd
sleep 120
NET START cxmd

but sleep is not recognosed as internal or external command appears briefly on the screen and this is manual so TI is still not working

Re: Net Stop Net Start CXMD Cognos Express

Posted: Mon Apr 04, 2011 4:44 am
by BigG
sorry think this is the answer

In Windows Server 2008 R2, the command to be used is "timeout" which replaces "sleep"

timeout /t 120

http://technet.microsoft.com/en-us/libr ... .10).aspx

to run as administrator it seems ok as a TI process, just have to tidy up all the bits above prior to testing.

So in epilog call 'RESTART.BAT' that is the cxmd data directory EXECUTECOMMAND('RESTART.BAT',0);

Code: Select all

NET STOP cxmd
timeout /t 120
NET START cxmd

Re: Net Stop Net Start CXMD Cognos Express

Posted: Mon Apr 04, 2011 4:46 am
by Alan Kirk
BigG wrote:arh,

for 2008 r2
'RESTART.BAT'>right click>run as adminstrator

NET STOP cxmd
sleep 120
NET START cxmd

but sleep is not recognosed as internal or external command appears briefly on the screen and this is manual so TI is still not working
Ah, I see you've found the answer since I started to type this post. For reference, though, Sleep has never been part of the standard implementation of batch files for reasons that escape me. I guess back then everything was so slow nobody needed it. It could be applied (by installing an exe named, obviously, sleep.exe) to Server 2003 by installing the Windows Server 2003 Resource Kit, but I can't find anything equivalent for Server 2008. Seems that you may have.