How restart the FAP service from TM1 Architect

Product:
Planning Analytics 2.0.9
Cognos Controller FAP service 10.4.2
Microsoft Windows 2019 server

Problem:
I want my tm1 developer be able to restart the Cognos Controller FAP service without login to the Windows server.

Suggested Solution:
Create two batch files (cmd) to run to start and stop of the FAP service.
Place the batch files in folder c:\scripts on the server where you have both Tm1 instance and FAP service installed.
Then create TI process to call the batch (cmd) files.

Enter below in notepad and save as STARTFAP.CMD

ECHO OFF
REM program to start fap service
REM https://ss64.com/nt/sc.html
REM print — to file
echo ———— >> “c:\Program Files\ibm\cognos\ccr_64\Server\FAP\fapstart.txt”
REM start the service
SC start “IBM Cognos FAP Service”
REM SC start “sdata”
REM print time to file
echo FAP STARTED >> “c:\Program Files\ibm\cognos\ccr_64\Server\FAP\fapstart.txt”
echo %date% %time% >> “c:\Program Files\ibm\cognos\ccr_64\Server\FAP\fapstart.txt”

Enter below in notepad and save as STOPFAP.CMD

ECHO OFF
REM program to stop fap service
REM https://ss64.com/nt/sc.html
REM print —- to file
echo ——— >> “c:\Program Files\ibm\cognos\ccr_64\Server\FAP\fapstart.txt”
REM stop the service
SC STOP “IBM Cognos FAP Service”
REM SC STOP “sdata”
REM print time to file
echo FAP STOPPED >> “c:\Program Files\ibm\cognos\ccr_64\Server\FAP\fapstart.txt”
echo %date% %time% >> “c:\Program Files\ibm\cognos\ccr_64\Server\FAP\fapstart.txt”

Test the files by run them from a administrator command prompt. Check that the log file fapstart.txt is created.


Set the “IBM Cognos FAP service” to Manual.
Start TM1 architect and create a new TI process, enter below text, and save as FAPSTOP

Then create other TI process, enter below text, and save as FAPSTART

Ensure you use correct ‘ or ” at the difference places.

If you share your FAP folder as FAP$ , on the windows server, to the TM1 developer group, then they can check both the error.log file and your fapstart.txt log file.

More information:
https://www.tm1forum.com/viewtopic.php?t=12599

https://www.toolbox.com/tech/big-data/question/run-an-external-command-from-tm1-052112/  

https://www.ibm.com/support/pages/how-perform-fap-reset-sequence-re-synchronise-controller-data-publishing-tm1

https://www.ibm.com/support/pages/safe-method-restart-tm1-servers-ensure-it-does-not-break-controller-fap-publish