Script to reset a grid engine - please note your configuration will differ so things might need adapted:Â
In this case the script is running against a server list, servers.txt, it calls this script against the servers.txt file which is declared as %1%.
- Tasklist -s %1% >tasklist.txt
- ren tasklist.txt %1%bfc.txt
- net stop datasynapse
- taskkill -s %1% /im invoke.exe
- taskkill -s %1% /im enginesv.exe
- taskkill -s %1% /im engine.exe
- rd \\%1%\c$\”program files”\datasynapse\engine\data /s /q
- md \\%1%\c$\”program files”\datasynapse\engine\data
- rd \\%1%\c$\”program files”\datasynapse\engine\profiles /s /q
- md \\%1%\c$\”program files”\datasynapse\engine\profiles
- rd \\%1%\c$\”program files”\datasynapse\engine\work /s /q
- md \\%1%\c$\”program files”\datasynapse\engine\work
- rd \\%1%\c$\”program files”\datasynapse\engine\resources\gridlib /s /q
- md \\%1%\c$\”program files”\datasynapse\engine\resources\gridlib
- copy \\servername\sharename\intranet.dat \\%1%\c$\”program files”\datasynapse\engine /y
- copy \\servername\sharename\dsengineboot.dat \\%1%\c$\”program files”\datasynapse\engine /y
- sc \\%1% start datasynapse
- tasklist -s %1% >tasklist2.txt
- ren tasklist2.txt %1%afc.txt
It does the following:
- Export tasklist to filename, then rename it the name of the server.
- Stop datasynapse service,
- Kill processes,
- Delete configuration files/log files and copy over over new files,
- Start datasynapse service to register to the other grid.


