Reducing the DB size ( for builds released after 4412)

Reducing the DB size ( for builds released after 4412)

Steps to reduce the size of the MYSQL(builds Above 4412),

NOTE: Please take a backup of the ADManager Plus (or) take a backup of the DB and the specs.xml

1. Shut down ADManager Plus
         1. If the product runs as an application, click on Start --› All Programs --› ADManager Plus --› Stop ADManager Plus.
         2. If the product runs as a windows service, click on Start --› Run --› type "services.msc" --› Stop "ManageEngine ADManager Plus".

2.In the command prompt , Navigate to the location "<Installation Dir>/ManageEngine/ADManager Plus/bin". Now type and execute BackupDB.bat.(All tables except the result tables of User,computer,groups,contacts are taken as backup)

NOTE: Verify the Backup file in the Backup location

3.Now open the file reinitialize.bat(open it in notepad) from the location "<Installation Dir>/ManageEngine/ADManager Plus/bin".

4.Find the word "rem" in the file reinitialize.bat and then delete it and save & close the notepad.

5.In the Command prompt ,Navigate to the location "<Installation Dir>/ManageEngine/ADManager Plus/bin".Now type and execute reinitialize.bat.
NOTE: reinitialize will drop all the tables stored in the database.

6.Now goto the location  "<Installation Dir>/ManageEngine/ADManager Plus/mysql/data" , rename the files ibdata1,ib_logfile0,ib_logfile1 as ibdata1_bak,ib_logfile0_bak , ib_logfile1_bak .

7.Now in the command prompt Navigate to the location "<Installation Dir>/ManageEngine/ADManager Plus/bin" , type restoreDB.bat and provide a space and enter the file location of the backup.

For Example:  restoreDB.bat "C:\Users\Desktop\111116-0450.zip"

8. After restoration , New mysql data files will be created in the same name ibdata1,ib_logfile0 and ib_logfile1 in the "../mysql/data" location.

9.Now Start ADManager Plus and check the settings.

Steps to reduce the size of the PGSQL :

Note :  Please take a backup of the ADManager Plus folder (or) take a backup of the DB and the specs.xml

 1. Shut down ADManager Plus

         1. If the product runs as an application, click on Start --› All Programs --› ADManager Plus --› Stop ADManager Plus.

         2. If the product runs as a windows service, click on Start --› Run --› type "services.msc" --› Stop "ManageEngine ADManager Plus".

 2.In the command prompt , Navigate to the location "<Installation Dir>\ManageEngine\ADManager Plus\bin". Now type and execute stopDB.bat, stopADSM.bat, once done type BackupDB.bat.(All tables except the result tables of User,computer,groups,contacts are taken as backup) to take a backup of the ADManager Plus PGSQL database configuration.

3.  Verify the Backup file in the Backup location and copy the same to bin directory  "<Installation Dir>\ManageEngine\ADManager Plus\bin"

4. Execute restoreDB.bat "above Backup File" (eg: restoreDB.bat 130904-1000) in the command prompt.

Please follow these steps in case backup does not complete and check for the issue again,

1. Login to the machine where ADManager Plus is installed,

2. Open a command prompt(Run As Admin)-->Redirect it to <Installation Folder>\ADManager Plus\mysql\bin

3. Execute the below command to connect to ADManager Plus DB : "mysql.exe -u root -P 33306 adsm"

4. Execute these commands as well which would help you in clearing all the temp tables if any,

select * from tabledetails where table_name like '%ADSM%ReportResult_%';

select * from tabledetails where table_name like '%ADSM%Details_%';

delete from tabledetails where table_name like '%ADSM%ReportResult_%';

delete from tabledetails where table_name like '%ADSM%Details_%';

5. Now type exit; which would disconnect you from the DB

6. Now try to take a backup
          • Related Articles

          • Using Encrypted password for PgSQL

            1. Stop the ADManager Plus, if it started already(Start->All Programs->ADManager Plus->Stop ADManager Plus). 2. Please check if you already have the file named encrypt.bat in the bin folder ("<Installation Dir>\ManageEngine\ADManager Plus\bin") ...
          • Moving MYSQL to another drive in the same server

            Steps to change the mysql folder location to another drive in the same machine: NOTE: Strictly take a backup of the entire ADManager Plus Installation folder ,before performing any changes.  1. Shut down ADManager Plus          1. If the product runs ...