Open services.msc, stop “ManageEngine Applications Manager” service or via command prompt with administrator permission. If using command prompt, navigate to <Applications Manager Home> directory and execute the below commands:
shutdownApplicationsManager.bat
shutdownApplicationsManager.bat -force
In Linux, navigate to <Applications Manager Home> directory and execute the below commands:
sh shutdownApplicationsManager.sh
sh shutdownApplicationsManager.sh -force
Execute repairMysqlDB.bat (.sh for Linux) file present under the <Applications Manager Home>/bin directory & then run optimizeMysqlDB.bat (.sh for Linux) file present in the same location via command prompt with administrator permission.
Rename the logs folder under <Appications Manager Home> directory as logs_old and then create a new logs folder.
For Windows, start “ManageEngine Applications Manager” service or via command prompt, navigate to <Applications Manager Home> directory and execute the below command:
startApplicationsManager.bat
In Linux, open command prompt, navigate to <Applications Manager Home> directory and execute the below command in Linux:
nohup sh startApplicationsManager.sh &
If Applications Manager cannot be started even after following the above steps to repair MySQL database, then perform the below steps:
Open the command prompt, go to the location <Applications Manager Home>\working\mysql\data\AMDB folder and execute the below commands one by one:
DIR *.MYD-* >> tables.txt
REN *.MYD-* *.MYD >> tables.txt
DIR *.MYD-* >> tables.txt
Restart Applications Manager from services and it may fail for the first time. Please wait for a couple of minutes and then restart again.
If you're still unable to start the Applications Manager, send us the support information file and the latest tables.txt file from step 1.
To repair the database:
DBCC CHECKDB WITH ALL_ERRORMSGS, NO_INFOMSGS;
To re-index/reduce size:
Open services.msc, stop “ManageEngine Applications Manager” service or via command prompt with administrator permission.
If you are using the command prompt, go to <Applications Manager Home> directory and execute the below commands:
shutdownApplicationsManager.bat
shutdownApplicationsManager.bat -force
(execute this until you get a message that says 'All processes have been shutdown')
Open command prompt in the administrator mode, go to <Applications Manager Home>\working folder, and execute the below command to start PostgreSQL database:
.\bin\startPGSQL.bat
Once the PostgreSQL database starts, open another command prompt in the administrator mode and connect your Applications Manager DB using the steps provided in the below link:
https://pitstop.manageengine.com/portal/en/kb/articles/connecting-to-applications-managers-bundled-database
Once you have connected to the database, execute the below queries one by one:
VACUUM FULL VERBOSE ANALYZE;
To Re-index:
Reindex database AMDB;
Now, go to <Applications Manager Home>\working\ folder and execute the below command to stop the PostgreSQL database.
.\bin\stopPGSQL.bat
Open command prompt in the administrator mode, navigate to <Applications Manager Home> directory, and then execute the below commands:
shutdownApplicationsManager.bat
shutdownApplicationsManager.bat -force
(Execute this until you get a message that says 'All processes have been shutdown')
Go to <Applications Manager Home> directory, rename the logs folder to logs_old, create a new folder, and name it as logs.
Open services.msc, start ManageEngine Applications Manager service.
Use the command prompt to go to <Applications Manager Home> directory and execute the below commands:
sh shutdownApplicationsManager.sh
sh shutdownApplicationsManager.sh -force
Open command prompt in the administrator mode, go to <Applications Manager Home>/working/ folder, and execute the below command to start the PostgreSQL database:
.\bin\startPGSQL.sh
Once the PostgreSQL database starts, open another command prompt in the administrator mode and connect your Applications Manager DB using the steps provided in the below link:
https://pitstop.manageengine.com/portal/en/kb/articles/connecting-to-applications-managers-bundled-database
Once you have connected to the database, execute the below queries one by one:
VACUUM FULL VERBOSE ANALYZE;
To Re-index:
Reindex database AMDB;
Now, go to <Applications Manager Home>/working/ folder and execute the below command to stop the PostgreSQL database.
./bin/stopPGSQL.sh
Open command prompt in the administrator mode, go to <Applications Manager Home> directory, and then execute the below commands:
sh shutdownApplicationsManager.sh
sh shutdownApplicationsManager.sh -force
(Execute this until you get a message that says 'All processes have been shutdown')
Go to <Applications Manager Home> directory rename the logs folder to logs_old, create a new folder, and name it as logs.
Go to <Applications Manager Home> directory and execute the below command:
nohup sh startApplicationsManager.sh &