PGSQL to SQL Server migration for Applications Manager Plug-in


Note
The Migration is now possible only in a Windows version of Applications Manager. 
You need to be on Version 13210 of Applications Manager or above to do migration, so please check the build number in the Support tab.
 

Prerequisites

  1. Take backup of the PGSQL Database before starting Migration.
  2. Install the Applications Manager with same build number by selecting MS SQL Backend, start & stop it once.
  3. The MSSQL Build should not be running during Migration. But PGSQL build should be running, so please make sure that it is.
  4. Open Migration.properties file in OpManager\AppManager\conf folder in PGSQL AppManager and enter details of the Microsoft SQL Server like hostname, port, database name, username & password same as you have provided in step 2.
# -------------------------------------
# Target Database Details for migration
# -------------------------------------
am.importdb.type=mssql
am.importdb.host=APP-WIN7-64-1
# we don’t need to mention port if the target server is a SQLServer instance
am.importdb.port=1433
am.importdb.instance=-
am.importdb.name=AMDB_MSSQL
# For Domain authentication should be given as DomainName\\Username
am.importdb.user=sa
am.importdb.password=password

 

Steps for Migration

1.) In the  PGSQL AppManager execute the below under OpManager\AppManager\bin\Migration folder in command window (make sure you run as administrator).
       MigrateToMSSQL.bat Export 
     A specific Migration.zip file will be created in OpManager\AppManager\working\ location.
             AppManagerMigration.zip (Professional Edition)
             AdminServerMigration.zip (Admin Server)
             ManagedServer_X0000000.zip (Managed Server With ServerID X)
2.) Copy your specific zip file & unzip it under the C:\ drive of the Windows server where your MSSQL database is running.
3.) Now perform the Migration steps given by OpManager and restart your OpManager.
4.) Now in PGSQL AppManager, execute the below under OpManager\AppManager\bin\Migration folder in cmd window. 
             MigrateToMSSQL.bat Import
 This will import your data from PGSQL DB and insert into target DB (example: AMDB_MSSQL) in the SQL Server.
5.) Copy the below information the existing PGSQL AppManager to MSSQL AppManager installation
             OpManager/AppManager/working/mibs
             OpManager/AppManager/working/adventnet_ssh_privateKey_file.txt_*
6.) Stop the PGSQL AppManager and start the MS SQL AppManager. You will have all your existing monitors/configurations and reports in that with data stored in MS SQL server now.
 
NOTE
Currently we have the following options while migrating
a. Can exclude any table without migrating
b. Can specify row limit for tables which have more rows count.
 
(Event or AM_Disk_MinMaxAvgData or similar tables can have million of rows, so we can set a limit if a need arises). These options can be given in migration.conf under OpManager\AppManager\working\conf\PGSQL\ for PGSQL build.
 
Note
  • This step is not mandatory and may be required while very large database migration only.
  • After Migration, it is mandatory to copy and paste all the Prerequisites files needed for monitoring from PGSQL to the MSSQL build.