Database Migration

Using this option you can change the built-in database server (PostgreSQL) of Log360 MSSP to MS SQL Server or another instance of a PostgreSQL Server.

Important points to remember

Prerequisites for MSSQL migration

  1. Copy the bcp.exe and bcp.rll files from the installed SQL Server directory and paste them in the Log360 MSSP bin folder (<Log360_MSSP_installed_directory/bin).
    • Location of the bcp.exe file: <MSSQL_installed_folder>\Client SDK\ODBC\...\Tools\Binn\bcp.exe. For example, C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\...\Tools\Binn\bcp.exe.
    • Location of the bcp.rll file: <MSSQL_installed_folder>\Client SDK\ODBC\...\Tools\Binn\Resources\1033\bcp.rll. For example, C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\...\Tools\Binn\Resources\1033\bcp.rll
  2. For migration to MS SQL, please install the corresponding SQL Native Client in the Log360 MSSP machine as per the MS SQL Server version.
  3. MS SQL Server Version Native Client
    2008 Download
    2012 Download
    2014 Download
    2017 Download
    2019 Download

    Note - MS SQL server version 2022 is also supported by Log360 MSSP.

  4. If firewall is enabled in the MS SQL Server machine, the TCP and UDP ports must be opened.
  5. If the MS SQL server you wish to migrate to has Force encryption enabled, follow the steps mentioned below.
    • Convert your certificate to .cer format.
      1. Open IIS Manager.
      2. In the middle pane, click Server Certificates.
      3. Open the certificate you want to use, and click the Details tab.
      4. Click Copy to file.
      5. Click Next in the Certificate Export Wizard that appears.
      6. On the Export Private Key screen, select No, do not export the private key, and click Next.
      7. On the Export File Format screen, select either DER encoded binary X.509 (.CER) or Bstr ase-64 encoded X.509 (.CER), and click Next.
      8. Enter a name for the file and click Next, and then Finish.
    • Open Command Prompt and navigate to <Installation directory>\jre\bin. Use the command below to associate the certificate with the Java KeyStore.
    • keytool -import -v -trustcacerts -alias myserver -file pathofthecert\certname.cer -keystore "..\lib\security\cacerts" -keypass changeit -storepass changeit -noprompt
    • where pathofthecert is the location where the certificate has been stored and certname is the certificate name.
    • The certificate will be added to your Java KeyStore.

Prerequisites for PostgreSQL migration

  1. Open the remote machine where the product is installed & navigate to Product Home\ pgsql\ data\ pg_hba.conf
  2. Open pg_hba.conf file and add an entry of the host IP address and its subnet mask as 0.0.0.0/0 (Refer Pic).
  3. Database Migration

  4. Navigate to Product Home\ pgsql\ data \ postgresql.conf.
  5. Open postgresql.conf and change the Listen_addresses as '*' & remove the # in the start of the line. (Refer Pic)
  6. Database Migration

Database backup for External PostgreSQL

Repeat the steps 1 to 3 from above whenever you update the PostgreSQL server.

Steps for Migration:

Note: Take a Backup/Snapshot of Log360 MSSP before proceeding with the steps (Important)

  1. Open the Command Prompt and navigate to (Here, Log360MSSP home is the location where Log360 MSSP is installed).
  2. Stop Log360 MSSP by running shutdown.bat.
  3. Run the ChangeDB.bat.
  4. From the Server Type menu, select the database server you plan to switch to.
  5. If you select PostgreSQL Server, then:
    • In the Host Name 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 with the necessary permissions to create a new database.

    Database Migration

  6. If you select MS SQL Server, then:
    • Move the bcp.exe and bcp.rll files into the bin folder manually.
    • In the Host Name and Port field, enter the host name or IP address and the port number of the MS SQL database server.
    • In the Select Server Instance field, select the SQL Server instance you want to use.
    • For Authentication, you can use either 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.
    • Database Migration

    • If you want to use Windows authentication, select Windows Authentication, and enter the username and password of a Windows domain user account.
    • Database Migration

    • Note: The user account used must have permission to create a database in the selected MS SQL Server.
  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 are changing the database of a fresh installation of Log360 MSSP.

  9. If the MS SQL server you wish to migrate to has Force encryption enabled, check the box next to SSL connection.
  10. Click Test Connection and wait for the connection to be established.
  11. Database Migration

  12. Once Test Connection has been established successfully, click Configure DB to initiate migration.
  13. Database Migration

Copyright © 2023, ZOHO Corp. All Rights Reserved.