Hello,
for testing purposes I installed a XP server, now I want to stop and restart the tm1-server remotely via a batch-file. In the Cognos docu I read that the netsvc command will not work with XP (I tried it and I agree). The TM1 server is running as a service. Do you have a hint how I can remotely start/stop the server automatically?
Thanks a lot,
Toto
Restart TM1-Service automatically
-
- MVP
- Posts: 3703
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: Restart TM1-Service automatically
On Windows XP Net Stop and Net Start commands should work.
Eg. batch file would be
Net Stop "Planning Sample"
Eg. batch file would be
Net Stop "Planning Sample"
-
- Posts: 6
- Joined: Wed Mar 04, 2009 9:32 pm
- OLAP Product: TM1
- Version: 9.0 SP3 64-bit
- Excel Version: 2003
Re: Restart TM1-Service automatically
Net Stop / Net Start work, and so do the equivalent SC commands.
The problem with both of these is that neither of them have a Restart command equivalent to the option in the Services applet, so you have to include a delay in your batch file between the Stop and the Start to allow the server to save and unload:
The best solution I've found was to use Sysinternals free PsService.exe utility to restart the service. Copy it to an executable path on the server and this type of command should work in a batch file.
The problem with both of these is that neither of them have a Restart command equivalent to the option in the Services applet, so you have to include a delay in your batch file between the Stop and the Start to allow the server to save and unload:
- Net Stop "Planning Sample"
Sleep 120
Net Start "Planning Sample
The best solution I've found was to use Sysinternals free PsService.exe utility to restart the service. Copy it to an executable path on the server and this type of command should work in a batch file.
- psservice restart "Planning Sample" /accepteula
- jameswebber
- Community Contributor
- Posts: 188
- Joined: Sun Nov 21, 2010 8:00 pm
- OLAP Product: Cognos Express 10
- Version: CE 10.1.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: Restart TM1-Service automatically
I have had to change all my services to use a domain user who is also an admin user on the box
Then in my TM1 prolog I can do this:
vCmd = 'net stop "IBM Cognos Express Advisor"';
ExecuteCommand(vCmd,1);
vCmd = 'net start "IBM Cognos Express Advisor"';
ExecuteCommand(vCmd,1);
Then in my TM1 prolog I can do this:
vCmd = 'net stop "IBM Cognos Express Advisor"';
ExecuteCommand(vCmd,1);
vCmd = 'net start "IBM Cognos Express Advisor"';
ExecuteCommand(vCmd,1);