Release 7.0 enables clients to host Aptify database into cloud managed database offerings such as Azure Managed SQL Instance. The first step towards Azure enablement is to migrate the on-premises database to cloud. This document provides step-by-step instruction to migrate the existing database from a SQL Server instance to Azure SQL Managed Instance using Azure Data Studio. For more information on migration to Azure SQL Managed Instance refer to https://docs.microsoft.com/en-us/azure/azure-sql/migration-guides/managed-instance/sql-server-to-managed-instance-guide.
...
- An Azure Subscription
- A Contributor role for Azure subscription.
Ensure that APTIFYSA user exists in the database. <link to AptifySA user creation to be provided later>
Note If you do not create APTIFYSA user, you will not be able to login to database or Smart Client with Azure instance.
- Execute below queries by connecting to SSMS and selecting database to be migrated.
EXEC sp_changedbowner 'sa'ALTER DATABASE [dbase] SET trustworthy ON
- ALTER ASSEMBLY AptifyRecordHistorySecurity WITH PERMISSION_SET = UNSAFE;
- ALTER ASSEMBLY AptifyDecryptionTool WITH PERMISSION_SET = UNSAFE;
- ALTER ASSEMBLY AptifyHTMLUtility WITH PERMISSION_SET = UNSAFE;
Open store procedure spGetCurrentUserTypes from the Object Explorer. In the right-hand panel remove the double dots prefixed to vwGroupMembers.
Note After completion of migration undo the changes done in spGetCurrentUserTypes on On-premises database instance only.
...
- Open Azure Portal by typing URL- https://portal.azure.com/ in the address bar.
- Go to Resource groups page.
Click Create to create a new resource group.
Note icon false If you have already created a resource group for migration, search and select the same.
- On Create a resource group page enter the values for fields Subscription, Resource group, and Region.
- Click Review + create button. The newly created resource group appears in the Resource groups page.
- Go to SQL Managed Instances service and click Create to create a SQL managed instance for the new resource group.
- On the Create Azure SQL Managed Instance, select the values for Subscription, Resource group and enter the Managed Instance name.
- Click Review + create button. The newly created managed instance appears in the list of services.
- Upload the on-premises database backup to blob storage before migration. There are two ways to upload backup on Azure: Directly through SQL Server Management Studio (SSMS) using URL or by uploading database backup on storage account through Azure portal.
- Directly through SQL Server Management Studio (SSMS) using URL
- Login to SSMS, open Object Explorer.
- Directly through SQL Server Management Studio (SSMS) using URL
...