Database migration

Using this option, you can change the built-in database server (PostgreSQL) of AD360 to an Microsoft SQL Server or another instance of a PostgreSQL Server (pgSQL).

Important points to remember

  • Supported database migrations:
    • pgSQL Server to Microsoft SQL Server or another instance of pgSQL Server.
    • Microsoft SQL Server to pgSQL Server or another instance of Microsoft SQL Server.
  • Supported database versions:
    • PostgreSQL: 9.6 to 15.8
    • Microsoft SQL: 2012 and above
  • Take a backup of the database before you proceed.
  • It is suggested to apply the Windows service packs and cumulative updates recommended by Microsoft while migrating to Microsoft SQL Server.

Prerequisites

For Microsoft SQL

For External pgSQL

  • In the machine where pgSQL is installed, go to <postgresql_installdir>/data and open the posgresql.conf file. Search for wal_level entry. Uncomment the entry and change its value to archive.
  • Copy all the files in <postgresql_installdir>/lib and <postgresql_installdir>/bin folders and paste them in <product_home>/pgsql/lib and <product_home>/pgsql/bin folders respectively. <product_home> refers to the home directory of AD360 or the integrated products for which you're configuring the auto backup scheduler.
  • Restart the external pgSQL server.
  • Repeat the steps 1 to 3 from above whenever you update the pgSQL server.

Steps to migrate a database

  1. Open Command Prompt and navigate to <AD360 home\bin> where AD360 home is the location where the instance of AD360 is installed.
  2. Stop AD360 by running shutdown.bat.
  3. Run ChangeDB.bat.
  4. From the Select Database Server menu, select the database server that you want to change to.
  5. If you select PostgreSQL Server, then:
    • In the DB Server Name/IP and Port fields, enter the host name or IP address and the port number of the PostgreSQL database server.
    • Enter the Username and Password of a user who has permission to create a new database.
  6. If you select Microsoft SQL Server, then:
    • In the DB Server Name/IP and Port fields, enter the host name or IP address and the port number of the Microsoft SQL database server.
    • In the Select Server Instance field, select the SQL Server instance you want to use.
    • For Authentication, you can either use Windows credentials or a SQL Server user account.
    • If you want to use a SQL Server user account, then select SQL Server in the Authentication field, then enter the Username and Password.
    • If you want to use Windows Authentication, select Windows in the Authentication field, then enter the Username and Password of a Windows domain user account.
      Note
      • The user account entered must have permission to create a database in the selected Microsoft SQL Server.
      • The bcp.exe and bcp.rll files must be manually moved to the AD360 bin folder as mentioned in the prerequisites section.
    • If the Microsoft SQL server you wish to migrate to has Force encryption on, select the check box against SSL connection.
  7. Check the box next to Migrate Existing Data to copy the data from your old database to the new database.
  8. IMPORTANT Leave this box unchecked only if you want to change the database of a fresh installation of AD360 or its components.
  9. Click Configure DB.