The 3 November 2022 release, is the last version that supports Microsoft SQL Server for your Horizzon Server database. The next version will only support PostgreSQL databases. If you still use Microsoft SQL Server, you must migrate your database to PostgreSQL 14 to be able to use future versions. The 3 November 2022 release is the last version you can use to migrate.
If you have a PostgreSQL version newer than 14, and want to use that version, you must allow the use of this newer version via the configuration file. But please be aware that 14 is the only officially supported version. For more information and instructions, please refer to Bizzdesign Horizzon release-specific required actions , Releases 2022, 3 November 2022 release.
The instructions on this page only apply to the on-premise installation of a Windows-based Horizzon.
Updating to the latest software release
Update Enterprise Studio and Horizzon Server to the latest available release that supports Microsoft SQL Server as well as PostgreSQL (3 November 2022 release). For detailed information about updating, please refer to Updating to a new Bizzdesign Horizzon release.
Prerequisites
During the migration process, the database file size can expand greatly. It is therefore recommended to have at least 100GB of free space on your Microsoft SQL Server when your current database is 10GB. Microsoft SQL Server will add a lot of logging to your existing database, so make sure that you have enough disk space before continuing.
Prior to the migration, please also make sure that both the database and the database log are allowed to expand:
- Open SQL Server Management Studio and connect to the database server.
- Right-click the Horizzon Server database and click Properties.
- In Select a page, click Files, and make sure that both the database and the log can expand unlimited.
- Click OK to save the changes and close SQL Management Studio.
Preparing the migration
For performing the migration, it is preferred that you use a licensed version of Microsoft SQL Server. If you are using SQL Express, the migration might fail, depending on the size of your database. If you are using SQL Server Express and your database is under 500 MB, you can perform the migration. If your database is over 500 MB, please contact Bizzdesign Support.
- Make a backup of your Microsoft SQL Server database and test if the backup is valid and can be restored. This is required; during the database migration, changes are made to the Microsoft SQL Server database. If something goes wrong, you will need to be able to revert to this backup of the Microsoft SQL Server database.
- Download PostgreSQL from https://www.postgresql.org/ install it in full. Make sure you set a strong password for the administrative user and remember this password. It is required to log in to the database server.
Log in to pgAdmin 4 (the management tool for Postgres), create a new database and set the database owner. By default, the owner is postgres , but you can create other users in pgAdmin if desired.
- Stop the Horizzon Server and Horizzon Worker services by running the stopServer.bat and stopWorker.bat files located in the bat folder of the Horizzon Server installation.
Performing the migration
First, the Horizzon Server will be configured so that it connects to the newly created PostgreSQL database. After that, the conversion is performed and set up.
- Open the application.conf file located in the HorizzonServerHome\conf folder.
In the "Configure database connection" section, add the # in front of the Microsoft SQL Server lines, remove the # in front of the the PostgreSQL lines, and fill out the proper credentials.
# Configuration of PostgreSQL database db { default { driver = org.postgresql.Driver url = "jdbc:postgresql://localhost:5432/database-name" username = "Username" password = "StrongPassword" } }
Replacelocalhost
with your database location, anddatabase-name
with the name of the newly created database. ReplaceUsername
with the owner that is set in pgAdmin for this database, andStrongPassword
with the password that is set for the owner account.- Save the changes.
- Open the Command Prompt and navigate to the bat folder of the Horizzon installation directory. If you use the default settings, it will be:
C:\HorizzonServerHome\bat>
Depending on how you connected to your previous database, run one of the commands below to start the migration. Copy and paste one of the commands into the Command Prompt, add the SQL Server database credentials, and press Enter.
Connection via SQL Server Authenticationaugust database-merger -u "username" -p "password" -s "jdbc:sqlserver://localhost;databaseName=database-name" --ignore sysdiagrams
Replaceusername
,password
anddatabase-name
with the SQL Server database name and credentials.
Connection via Windows Authenticationaugust database-merger -s "jdbc:sqlserver://localhost;databaseName=database-name;integratedSecurity=true" --ignore sysdiagrams
Replacedatabase-name
with the SQL Server database name.
If the migration is successful, it should look similar to this:C:\HorizzonServerHome\bat>august database-merger -u "username" -p "password" -s "jdbc:sqlserver://localhost;databaseName=database-name" --ignore sysdiagrams [info] p.a.d.HikariCPConnectionPool - Creating Pool for datasource 'default' Copying contents of audit_events with 12 records Copying contents of authorization_code with 0 records Copying contents of branch_histories with 2 records Copying contents of branches with 2 records Copying contents of checkouts with 0 records Copying contents of clients with 0 records Copying contents of collaborations with 1 records Copying contents of commits with 1 records Copying contents of commits_binary with 1 records Copying contents of configuration with 50 records Copying contents of group_members with 0 records Copying contents of groups with 0 records Copying contents of increment_claims with 0 records Copying contents of increments with 0 records Copying contents of invites with 1 records Copying contents of invites_all_invited_only_for_user with 1 records Copying contents of invites_effective_for_user with 1 records Copying contents of invites_for_groups with 0 records Copying contents of invites_for_users with 1 records Copying contents of invites_selected_scopes with 1 records Copying contents of jwks with 1 records Copying contents of portal_copies with 0 records Copying contents of portal_workingcopies with 1 records Copying contents of portal_workingcopy_languages with 3 records Copying contents of portal_workingcopy_object_names with 6 records Copying contents of portal_workingcopy_objects with 2 records Copying contents of prepared_working_copies with 0 records Copying contents of produced_collaboration_events with 0 records Copying contents of produced_commit_events with 0 records Copying contents of produced_group_events with 0 records Copying contents of produced_group_invitations_events with 0 records Copying contents of produced_group_members_events with 0 records Copying contents of produced_user_events with 0 records Copying contents of produced_user_invitations_events with 0 records Copying contents of properties with 4 records Copying contents of queue with 0 records Copying contents of refresh_tokens with 2 records Copying contents of repositories with 1 records Copying contents of users with 1 records
- Run the generateSchedule.bat file (located in the Horizzon ServerHome\ bat folder). After finishing a new file schedule.ps1 is present in the bat folder.
- Right-click the schedule.ps1 file and select Run with PowerShell . This file is used for scheduling tasks in the Horizzon Server database, which will be processed by the Horizzon Worker.
Start the Horizzon Server and Horizzon Worker services by running the startServer.bat and startWorker.bat files located in the bat folder of the Horizzon Server installation.
The migration process is done and Horizzon Server will now use the new database.