It’s extremely easy to migrate Kepion Applications from one environment to another. In this article, we'll explain how to attach an Application database and set up the necessary permissions in the new environment.
1. Back up the database in SQL Server Management Studio in the source environment.
2. Restore the backup file to the target environment.
Tip: If you are migrating a database from a newer SQL instance to an older version, refer to this article for backup and restoration information.
3. Open Kepion Planning and go to System > Application.
4. Click Add Existing.
5. Enter the name or IP address of the SQL Server in the target environment, and click Discover.
6. Select your database and click Save.
Tip: If you can't discover any databases, check out this troubleshooting article for possible reasons why.
Now you should be able to find your application in the list below. If the application icon shows a green check mark, it means your application is online now.
7. Ensure your Application is selected and click Deploy generate an OLAP cube.
Once the deployment is done, you are good to go!
When you migrate Kepion Application databases from one environment to another, you need to ensure the Kepion SI and SSAS SI in the new environment have the right permissions.
For each Application database, apply the following query in SQL Server Management Studio:
Note: Replace <KEPION_APPLICATION_DATABASE>, <KEPION_SI> and <SSAS_SI> with the respective context.
IF NOT EXISTS (SELECT * FROM [sys].[database_principals] WHERE [type] = 'U' AND [name] = N'<KEPION_SI>')
CREATE USER [<KEPION_SI>] FOR LOGIN [<KEPION_SI>] WITH DEFAULT_SCHEMA = [dbo];
ALTER USER [<KEPION_SI>] WITH DEFAULT_SCHEMA = [dbo];
IF NOT EXISTS (SELECT * FROM [sys].[database_principals] WHERE [type] = 'U' AND [name] = N'<SSAS_SI>')
CREATE USER [<SSAS_SI>] FOR LOGIN [<SSAS_SI>] WITH DEFAULT_SCHEMA = [dbo];
ALTER USER [<SSAS_SI>] WITH DEFAULT_SCHEMA = [dbo];
EXEC sp_addrolemember N'db_datareader', N'<SSAS SI>'
EXEC sp_addrolemember N'db_owner', N'<KEPION_SI>'
Or you can manually map the Service Identities to each database through the User Mapping tab.
Right-click the login and select Properties.
Select db_owner for each database mapped to the Kepion SI and db_datareader for each one mapped to the SSAS SI. Ensure that the Default Schema for both is set to dbo.
Note: This process needs to be done for every database added to your environment after setup. For more information, refer to the Kepion Setup Guide.