ARIS Community - We Love BPM

reorg command not working through bat file

Fran Roberts's picture
by Fran Roberts in Administration & User Management posted on 2017-06-01

Hi there,

I have a batch file that runs every evening to back up all databases, and do a reorg and systemdb backup.  The Reorg command however will not work correctly when it runs from the batch file, the other commands work correctly (backup etc.).  I have also executed "reorg all" on the server administrator tool and there it works correctly.  Please can anyone help?

 

echo.|date|find "current" >t#e.bat
echo set date=%%5> the.bat
call t#e.bat
del t?e.bat > nul


set test=%date%
set newtest=%date:/=-%

set mm=%date:~5,2%

set dd=%date:~8,2%
set yyyy=%date:~0,4%

set BATCH_DATE=%yyyy%-%mm%-%dd%
SET BACKUPFOLDER=C:\ArisBackup
SET SERVER=*************
SET ARISPATH=C:\SoftwareAG\ARIS9.8
SET USERNAME=system
SET PASSWORD=************
SET PORT=80
SET TENANT=default


cd /d %BACKUPFOLDER%
md %BATCH_DATE%
SET BACKUPDIR=%BACKUPFOLDER%\%BATCH_DATE%
SET ARISDIR="%ARISPATH%\javaclient"  
SET LOGFILE="%BACKUPDIR%\arisbackup.log"
SET CFGLOG="%BACKUPDIR%\ariscfgbackup.log"
set path = %path%;%ARISPATH%\tools\ArisAdm

cd /d %ARISPATH%\tools\ArisAdm

arisadm90 -l %LOGFILE% -s %SERVER%:%PORT% -t %TENANT% -u %USERNAME% %PASSWORD% backup all %BACKUPDIR%
arisadm90 -l %CFGLOG% -s %SERVER%:%PORT% -t %TENANT% -u %USERNAME% %PASSWORD% backupsystemdb "%BACKUPDIR%"
arisadm90 -l %CFGLOG% -s %SERVER%:%PORT% -t %TENANT% -u %USERNAME% %PASSWORD% reorg all "%BACKUPDIR%"

cd /d %ARISPATH%\tools\scriptrunner
scriptrunner.bat DeleteModels.cfg

 

I get this error in my logfile for the reorg of databases:

[01/06/2017 12:40:55] ArisAdm -l C:\ArisBackup\2017-06-01\ariscfgbackup.log -s zabrysvisarapp:80 -t -u backupsystemdb C:\ArisBackup\2017-06-01
[01/06/2017 12:40:56] (backupsystemdb C:\ArisBackup\2017-06-01 )
[01/06/2017 12:41:07] OK
[01/06/2017 12:41:09] ArisAdm -l C:\ArisBackup\2017-06-01\ariscfgbackup.log -s zabrysvisarapp:80 -t -u reorg all C:\ArisBackup\2017-06-01
[01/06/2017 12:41:10] (reorg all C:\ArisBackup\2017-06-01 )
[01/06/2017 12:41:10] reorganizing WIP<aris>
[01/06/2017 12:41:10] Error: Unknown command

 

4151 Views
0 Likes
4 Comments
Sorry there are no tags
There are no attachments
Rune Becker posted on 2017-06-01

Dear Fran,

Does this error also occur when you replace the EXE call of arisadm90 with call arisadm.bat?

That batch file is located in the folder C:\SoftwareAG\ARIS9.8\server\bin\work\work_abs_s\tools\arisadm.

Cheers
Rune

Fran Roberts posted on 2017-06-01

Hi Rune,

I then get "arisadm.bat" is not recognized as an internal or external command, operable program or batch file.... 

Kind regards,

Fran

Rune Becker posted on 2017-06-01

Have you used call to start arisadm.bat? I think that command is needed when a batch file starts another one.

Cheers
Rune

Amol Patil posted on 2017-06-02

Hi Fran,

This is because, the command don't expect a directory path at the end. Remove the "%BACKUPDIR%" and try again.

Regards,

Amol Patil