Skip to main content
Nintex Community Menu Bar

Problem

In some cases, customer may want to move from an old DB server, to a new, or rename the Schema name. This includes moving the Kryon RPA DBs.

Depending on what the change is, there are several things that need to be updated on the appServer side, after the DBs have been migrated to the new DB server(s).

Solution

📘 InstructionsCustomer wants to change the whole DB Server:Firstly, have the customer confirm that both the RPA and Authentication Databases have been moved to the new DB server and that they and the user that will be used to connect have the needed permissions. Second, have the customer set the same user and password which is used for the previous one. Last, but not least, have the customer confirm that the SQL instance is accessible from the Application Server and running over the same port.

Once the above is verified, you can proceed with updating the connection strings:

Open 'C:\Kryon\DBConnection.config'

In the connection string, update Data Source to the new DB Server and save the file.

Run the 'C:\Kryon\ReplaceAllDBConnection.bat' script

Open in Notepad: 'C:\Kryon\Services\Kryon Authentication Server 64bit\appsettings.Production.json'

Make sure the DB Connection string on line 13 was updated correctly by the ReplaceAll script ran earlier

If it is not, append the Data Source and save the file.

Open 'C:\Kryon\installer-assets\config\prod\scripts\config.prod.properties.json'

Scroll down to lines 31-34

Change Data Source and Server(on the first string) to the new DB server in every connection string line

Scroll down to line 36

Change 'MSSQL_SERVER': 'new DB server'

In case if port needs to be changed to nonstandard port e.g. 1443 then update Line 41'MSSQL_PORT': '1443',

b. Save the file

For the Aerobase/Keycloack Schemas as well, the following extra steps have to be performed:

Open 'C:\Kryon\IDP\Aerobase\Configuration\overrides.rb'

Find line 10

Change mssql['server'] = 'old DB server' to mssql['server'] = 'new DB Server'Note: In case if port needs to be changed to nonstandard port e.g. 1443 then add a Line below mssql['server'] ='new DB Server'mssql['port'] = '1443'

Reference article : Aerobase Configurations Explained

Save the file

Open CMD and run the following command: aerobase-ctl reconfigure

Wait for the command to finish

Finally, after all of the above has been done, you need to run ConfigureAll to finalize the reconfiguration:

Open Powershell as Administrator and navigate to: C:\Kryon\installer-assets\config\prod\scripts

Run .\configureAll.ps1 -h 'installDrive':\Kryon'

Wait for the script to finish

Clear Redis and Re-start the Kryon services.

Customer wants to change the name of the schema and use the new name for Kryon:Open 'C:\Kryon\DBConnection.config'

In the connection string, update Initial Catalog=Kryon to Initial Catalog=NewSchemaName and save the file.

Run the 'C:\Kryon\ReplaceAllDBConnection.bat' script

Open in Notepad: 'C:\Kryon\Services\Kryon Authentication Server 64bit\appsettings.Production.json'

Make sure the DB Connection string on line 13 was updated correctly by the ReplaceAll script ran earlier

If it is not, append Initial Catalog=Kryon to Initial Catalog='NewSchemaName' and save the file.

Open 'C:\Kryon\installer-assets\config\prod\scripts\config.prod.properties.json'

Scroll down to lines 31-34

Change Initial Catalog=Kryon to Initial Catalog='NewSchemaName' in every connection string line

Scroll down to line 36

Change 'MSSQL_DATABASE': 'Kryon' to 'MSSQL_DATABASE': 'NewSchemaName'

Save the file

Open Powershell and navigate to C:\Kryon\installer-assets\config\prod\scripts

Run .\configureAll.ps1 -h 'C:\Kryon'

Wait for it to finish, clear the Redis Cache and re-start the services afterwards.

If the customer wants to change the name of the Aerobase/Keycloack Schemas as well, the following extra steps have to be performed:

Open 'C:\Kryon\IDP\Aerobase\Configuration\overrides.rb'

Find line 10

Change keycloak_server['db_database'] = 'Kryon_Authentication' to keycloak_server['db_database'] = ''NewAuthenticationSchemaDBName'

Save the file

Open CMD and run the following command: aerobase-ctl reconfigure

Wait for the command to finish

Clear Redis and re-start the Services

Customer wants to change several things relating the connection to the DB:Depending on the needed changes, extra fields, relating to them must be changed in the configuration files and connection string mentioned in the previous two procedures.

The only exception being when changing the password of the DB user, which requires to be encrypted.
Be the first to reply!

Reply