Use SQL backup and restore to migrate to Azure Managed Instance
- Last UpdatedNov 13, 2025
- 2 minute read
- PI System
- PI Server 2024 R2
- PI Server
Back up and restore is a way to migrate on-premises PI AF data to Azure Managed Instance. Before getting started, review the official documentation for an overview of the Azure SQL Managed Instance back up and restore process: Migration guide: SQL Server to Azure SQL Managed Instance and Quickstart: SQL backup and restore to Azure Blob Storage.
Prerequisite
AF Server 2024 R2 is required to use Azure SQL Managed Instance. You must upgrade to AF Server 2024 R2 before completing the steps in this topic. See PI AF server upgrades.
-
Upgrade the current AF Server to AF Server 2024 R2. See PI AF server upgrade.
-
Perform a full database backup of your on premise AF database. See Create a full database backup.
-
Complete the following steps to restore your backup:
-
Copy your local backup to Microsoft Azure Blob Storage. See SQL Server backup to URL for Microsoft Azure Blob Storage.
-
Create a credential using shared access signature. See Grant limited access to Azure Storage resources using shared access signatures (SAS).
-
Restore your backup from Azure Blob Storage. See Restore database.
-
-
Update the AF Application Service connect string in the AFServiceconfig.exe file to point to the Azure SQL Managed Instance database. See Modify the AFService.exe.config file.
-
After modifying the connect string, restart any PI client applications that point to the AF server.
-
Open PowerShell or another command line utility.
-
Switch to the %PIHOME64%\AF directory.
-
Enter afdiag /resetidentitycolumnseeds, then press Enter.
The Identity column seeds are updated in the PI AF SQL Server tables.
Note: Resetting the Identity column seeds prevents issues with database check-in's.