Migrating the Built-in database server (PostgreSQL) to MS SQL Server or another instance of a PostgreSQL Server

Supported database migrations

Supported database versions

Note: It is suggested to apply the Windows service packs and cumulative updates recommended by Microsoft while migrating to MS SQL Server.

To migrate the built-in PostgreSQL to a different database, follow the steps listed below.

Backing up PostgreSQL Data

  1. Stop the AD360 Server/Service.
  2. Invoke the <AD360 Home>\bin\backupDB.bat in command prompt to backup the data available in PostgreSQL database. By default, the backup file will be stored under <AD360 Home>\Backup\AD360_Backup<Backup_time> directory.

Configuring MS SQL Server

Common Settings to be performed in MS SQL Server

  1. Open SQL Server Configuration Manager.
  2. Goto SQL Server Services and ensure the service SQL Server Browse' is running.
  3. Goto SQL Server Network Configuration → Protocols for SQLEXPRESS (the given instance while configuring the MS SQL) → Enable TCP/IP. Then restart the SQL Server (SQLEXPRESS - the given instance) Service.
  4. Set the following configuration for the SQL Server Configuration Manager:
    • SQL Server Network Configuration → Protocols for <instances> → Enable everything.
    • SQL Native Client Configuration → Client Protocols → Enable all.

Providing credentials to other users in the domain

  1. Go to SQL Server Management Studio.
  2. Expand the following <MACHINE_NAME>\SQLEXPRESS → Security → Logins.
  3. Check whether the user provided in the AD360 Service is already in the list.

If not, right click the Logins, New Login and provide a corresponding user name. The New user must have the sysadmin server level role and database level role of db_owner.

Follow the steps to provide the sysadmin role permission:

Right click the user, click 'Properties'
Go to 'Server Roles' → Check sysadmin and click 'OK'

Note: Details about user roles: Refer the documents in the following links: For Server Level Roles: http://msdn.microsoft.com/en-us/library/ms188659.aspx For Database Level Roles: http://msdn.microsoft.com/en-us/library/ms189121.aspx For additional resources: http://www.mssqlcity.com/Articles/Adm/SQL70Roles.htm Server Role of the user should be 'sysadmin' and Database Role of the user should be 'db_owner'. The members of sysadmin server role can perform any activity in SQL Server and have completes control over all database functions. The members of db_owner database role can perform any activity in the database.

MS SQL Server in local computer

Copy the following files to <AD360 Home>\bin folder.

MS SQL Server in remote computer

Note: Please install the corresponding SQL Native Client / Command line Utilities in the AD360 machine as per the MS SQL Server version and CPU type of AD360 machine.

MS SQL Server Version Command line Utilities and Native Client
2008

Download

2008 R2 (x64)

Download

2008 R2 (x86)

Download

2012

Download

2014

Download

2016

Download

2017

Download

After installing the Command Line utilities, please copy the following files:

Copy the files to <AD360 Home>\bin folder.

Windows Firewall Settings

If the Firewall is enabled in MS SQL Server machine, the TCP and UDP Ports need to be opened.

UDP Port is normally 1434.

To check TCP Port settings, open SQL Configuration Manager:

tcp_ip

Steps to migrate database

  1. Log in to AD360 as an administrator.
  2. Navigate to Admin → General Settings → Database Settings → Database Configuration.
  3. Select AD360 under Component Name.
  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 field, 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 MS SQL Server, then:
    • In the DB Server Name/IP and Port field, enter the host name or IP address and the port number of the MS SQL database server.
    • In the DB Server Instance field, select the SQL Server instance you want to use.
    • If you have already moved the bcp.exe and bcp.rll files, the same will be visible in the Select bcp.exe File and Select bcp.rll File fields. If not, click Browse and select the bcp.exe and bcp.rll files from SQL Server installed directory.
    • 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 Authentication and enter the Username and Password.
    • If you want to use Windows authentication, select Windows Authentication, and enter the username and password of a Windows domain user account. To autofill the username and password of the user currently logged into the machine check the box against Use Default Windows Authentication.
    • Note: The user account used must have permission to create a database in the selected MS SQL Server.

  7. Check the box against Migrate Existing Data to copy the data from your old database to the new database.

    IMPORTANT: Leave this box unchecked only if you want to change the database of a fresh installation of AD360 or its components.

  8. Click Save.

Don't see what you're looking for?

  •  

    Visit our community

    Post your questions in the forum.

     
  •  

    Request additional resources

    Send us your requirements.

     
  •  

    Need implementation assistance?

    Try onboarding

     

Copyright © 2023, ZOHO Corp. All Rights Reserved.