Applications Manager DB Maintenance for PGSQL Backend

Applications Manager DB Maintenance for PGSQL Backend

Windows Installations

Note: Please take complete db backup using the <AppManager Home>\bin\BackupPGSQLDB.bat (or BackupPGSQLDB.sh) script without fail before following the below steps:
  1. Open services.msc, stop ManageEngine Applications Manager service or via command prompt with administrator permission.
    If you are using the command prompt, go to <AppManager_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')

  1. Open command prompt in the administrator mode, go to <AppManager_Home>\working\ folder and execute the below command to start PGSQL database:
    .\bin\startPGSQL.bat

Note: Please check if the DB port given in <AppManager_Home>\conf\AMServer.properties file is same as the <AppManager_Home>\working\bin\startPGSQL.bat file.

  1. Once the PGSQL database starts, open another command prompt in the administrator mode and connect your AppManager DB using the steps provided in the below link:
    https://pitstop.manageengine.com/portal/en/kb/articles/connecting-to-applications-managers-bundled-database 

  1. Once you have connected to the database, execute the below queries one by one:
    VACUUM FULL ANALYZE VERBOSE;


  1. Now, go to <AppManager_Home>\working\ folder and execute the below command to stop PGSQL database.
    .\bin\stopPGSQL.bat

  1. Open command prompt in the administrator mode, go to <AppManager_Home>\ 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')

  1. Go to <AppManager_Home> directory rename the logs folder to logs_old, create a new folder and name it as logs.

  2. Open services.msc, start ManageEngine Applications Manager service.

LINUX Installations

Note: Please take complete DB backup using the <AppManager Home>/bin/BackupPGSQLDB.sh script without fail before following the below steps.

  1. Use the command prompt to go to <AppManager_Home> directory and execute the below commands:
    sh shutdownApplicationsManager.sh
    sh shutdownApplicationsManager.sh -force

  2. Open command prompt in the administrator mode, go to <AppManager_Home>/working/ folder and execute the below command to start PGSQL database:
    .\bin\startPGSQL.sh

Note: Please check if the DB port given in <AppManager_Home>/conf/AMServer.properties file is same as in <AppManager_Home>/working/bin/startPGSQL.sh file.

  1. Once the PGSQL database starts, open another command prompt in the administrator mode and connect your AppManager DB using the steps provided in the below link:
    https://pitstop.manageengine.com/portal/en/kb/articles/connecting-to-applications-managers-bundled-database

  2. Once you have connected to the database, execute the below queries one by one:
    VACUUM FULL ANALYZE VERBOSE;

  3. To Re-index:
    Reindex database AMDB;


      • Related Articles

      • Maintenance of Applications Manager

        Applications Manager with MySQL database 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 ...
      • Installing Applications Manager in AWS

        Applications Manager can be installed in EC2 instances in both Windows and Linux platforms.  Applications Manager comes with bundled PostgreSQL. Installing Applications Manager in EC2 for Windows Go to EC2 console and launch an "Windows" instance ...
      • Prerequisites for upgrading Applications Manager for the version above 14844

        1.Complete the Applications Manager backup for the installation folder & database by referring to the steps in the link below: https://www.manageengine.com/products/applications_manager/help/data-backup.html 2. The required Service Pack should be ...
      • Installing Applications Manager in Microsoft Azure

        Applications manager can be installed in Azure Virtual Machines in both Windows and Linux platforms.  Applications Manager comes with bundled PostgreSQL. Installing Applications Manager in VM for Windows Go to Virtual Machines and create a "Windows" ...
      • Issues while upgrading Applications Manager with PostgreSQL backend database

        Problem 1: After installing Applications Manager versions 14850 and above with PostgreSQL backend, following error message is shown due to error initPGSQLDB.sh because of GLIBC_2.9 not found:  ./initdb: /lib64/libc.so.6: version `GLIBC_2.9' not found ...