Run the AF maintenance job
- Last UpdatedJun 04, 2025
- 1 minute read
- PI System
- PI Server 2024 R2
- PI Server
You can update the statistics in the PI AF SQL Server database using any of the following approaches:
-
Schedule the AF Maintenance job to run at a specific time via the SQL Server Management Studio
-
Manually run the AF Maintenance job via the SQL Server Management Studio
-
Manually run the MaintenanceJob stored procedure independent of the AF Maintenance job
Code example
The following is an example of the T-SQL command that can be used to execute the MaintenanceJob stored procedure:
-
EXEC [dbo].[usp_maintenanceJob] ;