Using this option you can change the built-in database server (PostgreSQL) of Log360 to MS SQL Server or another instance of a PostgreSQL Server.
Important points to remember
- Supported database migrations:
- PostgreSQL Server to MS SQL Server or another instance of PostgreSQL Server.
- MS SQL Server to PostgreSQL Server or another instance of MS SQL Server.
- Supported database versions:
- PostgreSQL: 9.2 to 9.5
- MS SQL: 2005 and above
- Take a backup of the database before you proceed.
- Copy the bcp.exe and bcp.rll files from the SQL Server installed directory and paste them in the Log360 bin folder (<Log360_installed_directory/bin). Instead of manually copying the files, you can also do this while configuring database migration directly from the user interface.
- Location of the bcp.exe file: <MSSQL_installed_folder>\Client SDK\ODBC\130\Tools\Binn\bcp.exe. For example, C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\bcp.exe.
- Location of the bcp.rll file: <MSSQL_installed_folder>\Client SDK\ODBC\130\Tools\Binn\Resources\1033\bcp.rll. For example, C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\Resources\1033\bcp.rll
- For migration to MS SQL, please install the corresponding SQL Native Client in the Log360 machine as per the MS SQL Server version.
- If firewall is enabled in the MS SQL Server machine, the TCP and UDP ports must be opened.
Steps to migrate database
- Log in to Log360 as an administrator.
- Navigate to Admin → General Settings → Database Settings → Database Configuration.
- Select Log360 under Component Name.
- From the Select Database Server menu, select the database server that you want to change to.
- If you select PostgreSQL Server, then:
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 PostgreSQL database server.
- Enter the Username and Password of a user who has permission to create a new database.
Check the box against Migrate Existing Data to copy the data from your old database to the new database.
- 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.
IMPORTANT: Leave this box unchecked only if you want to change the database of a fresh installation of Log360 or its components.