Step 4: Test and confirm data replication
- Last UpdatedNov 21, 2025
- 1 minute read
- PI System
- PI Server 2024 R2
- PI Server
After replication, you must complete the transition to the new cloud-managed database platform. These final steps involve confirming data replication, editing the connect string to point to the new database, and resetting the identity seed columns on the replicated database.
Definition: The AFService.exe.config file is a standard ADO.NET connection string that defines the location of the Microsoft Azure, Amazon RDS or SQL Server PI AF database, and the security mode used to connect to the database.
This file can be edited to reflect your PI AF database configuration and other settings.
It is important that only authorized users have access to this file, as well as the
account used to run the PI AF Application Service.
-
Query both the on-prem SQL Server AF database and the new database to confirm that data replication was successful.
-
To complete the transition to the new cloud-managed database platform, stop the AF Service and then edit the AFService.exe.config file to point to the new database.
-
Perform the following steps to reset the identity seed columns on the migrated database:
Important: The /ResetIdentityColumnSeeds parameter must be run after a successful PI AF database migration to Azure SQL Database, and after updating the AFService.exe.config connect string.
-
As an administrator, open a Windows command prompt and change the directory to \PIPC\AF.
-
Enter afdiag /ResetIdentityColumnSeeds
-
-
Start the AF Service.
-
Remove the subscription. See the Microsoft topic: Delete a Push Subscription.