Manage APSPoints Database dialog box
- Last UpdatedMar 07, 2023
- 7 minute read
- PI System
- PI AutoPointSync 1.2.8
- Interfaces
Clicking the Manage Databases command opens the Manage APSPoints Database dialog box. Before actually opening the dialog box, the PI APS Configuration Utility checks for indices on the tables in the APSPoints database for the selected interface. These indices improve synchronization speed, particularly when large numbers of points are managed by PI APS. Prior to PI APS version 1.2, these indices were not automatically created by PI APS. Therefore, APSPoints databases that were created by earlier versions of PI APS do not have these indices. If the PI APS Configuration Utility finds that the indices do not exist in the APSPoints database, the Database Indices dialog box is opened.
Clicking Yes causes the PI APS Configuration Utility to add the missing indices to the APSPoints database. Following index creation or clicking No, the actual Manage APSPoints Database dialog box opens.
Available Points
The Purge button in this area deletes all available points in the APSPoints database. At the start of each synchronization scan, the Synchronization Engine deletes all available points. During the search for points not in PI Server, the Synchronization Engine adds available points to the APSPoints database for data source tags that have no corresponding PI point. That is, the Available Points table in the APSPoints database is reconstructed during each synchronization scan. Therefore, manually deleting the records in this APSPoints table is usually unnecessary.
However, available points in the APSPoints database can become stale between synchronization scans if one or more of the following conditions are met:
-
Tags on the data source are removed
-
PI points are created for the interface using any tool other than PI APS
-
Configuration settings that affect selection of available points change (either the general Tag Selection feature or a connector-specific feature for data source tag selection).
Rather than initiate another synchronization scan to update the available points, optionally click the Purge button in this area to delete all available points in the APSPoints database. This eliminates the possibility of using stale available points until the next synchronization scan reconstructs the available points.
Hidden Points
The Purge button in this area deletes all hidden points in the APSPoints database. During the next synchronization scan, all previously hidden points are treated as available points.
Note: Change the rule for points not in PI Server to Store in Available Points database before purging hidden points.
Remember that hidden points were originally available points that you chose to hide. If the hidden points are purged, PI APS cannot automatically reconstruct them because it has no way to determine which of the available points should be hidden. During the next synchronization scan, the previously hidden points that correspond to valid data source tags are either created in PI Server or stored as available points.
If the PI APS Configuration Utility unhides a hidden point or creates a PI point for a hidden point, the hidden point is deleted from the APSPoints database. These are the only cases other than the Purge button in this area where PI APS deletes a hidden point from the APSPoints database. Hidden points can become invalid if 1) tags on the data source are removed, 2) points are created for the interface using any tool other than PI APS, or 3) configuration settings that affect selection of available points change (either the general Tag Selection feature or a connector-specific feature for data source tag selection). The Synchronization Engine does not verify that hidden points are valid when a synchronization scan occurs for the interface. Therefore, invalid hidden points can accumulate in the APSPoints database. The Purge button in this area can assist in eliminating invalid hidden points.
The following procedures for eliminating invalid hidden points require the Store in Available Points database rule for points not in PI Server. Initiate a synchronization scan and check the available points.
If the list of available points is empty, click Purge to delete all hidden points. Immediately initiate another synchronization scan. The available points found by this synchronization scan are the previously hidden points that are valid. In this case, all available points can be re-categorized back to hidden points.
If the list of available points is not empty, determine whether all available points can be created as PI points or hidden so that the procedure for an empty list of available points can be used. If the list of available points cannot be emptied, use the following procedures.
If both available and hidden points exist, eliminating the invalid hidden points is more difficult. One approach is to click Purge to delete all hidden points and initiate another synchronization scan. The previously valid hidden points are regenerated as available points mixed with the previously available points. The available points that correspond to the previously hidden points must be manually selected and hidden.
If the invalid hidden points can be identified by other means and the number of them is small, another approach is to unhide the invalid hidden points and purge the available points instead.
PI Point Edits
The Purge button in this area deletes all attribute differences for existing points that were stored in the APSPoints database during the last synchronization. On each synchronization scan, the Sync Engine deletes or updates the records for all existing points in the PI Point Edits table. That is, the PI Point Edits table in the APSPoints database is reconstructed during each synchronization scan. Therefore, manually deleting the records in this APSPoints table is usually unnecessary.
However, records in the PI Point Edits table can become stale between synchronization scans if 1) attributes of data source tags change, 2) data source tags are removed, or 3) existing points are edited or deleted. Rather than initiating another synchronization scan to update the PI Point Edits table, optionally click the Purge button in this area to delete all records in the PI Point Edits table. This eliminates the possibility of using stale point edit data until the next synchronization scan reconstructs the PI Point Edits table.
PI Point Deletes
The Purge button in this area deletes all records in the PI Point Deletes table in the APSPoints database. No points in PI Server are affected by this operation.
At the start of each synchronization scan, the Synchronization Engine deletes all records in the PI Point Deletes table. During the search for point edits, the Synchronization Engine adds records to this table for all deleted points (existing points whose corresponding data source tag no longer exists). That is, the PI Point Deletes table in the APSPoints database is reconstructed during each synchronization scan. Therefore, manually deleting the records in this APSPoints table is usually unnecessary.
However, records in the PI Point Deletes table can become stale between synchronization scans if 1) data source tags are removed, or 2) existing points are edited or deleted. Rather than initiating another synchronization scan to update the PI Point Deletes table, optionally click the Purge button in this area to delete all records in the PI Point Deletes table. This eliminates the possibility of using stale deleted points until the next synchronization scan reconstructs the PI Point Deletes table.
Existing Points
The Existing Points table in the APSPoints database contains the per-point synchronization settings for the PI points for the interface instance. This table is updated by PI APS and requires no routine maintenance. However, tools other than PI APS can remove a PI point from the interface by actually deleting the PI point or by changing the PointSource or interface ID attribute to disassociate the PI point from the interface instance. PI APS does not detect a PI point removed from the interface by other tools. Therefore, the per-point synchronization settings for the removed PI point are orphaned in the Existing Points table in the APSPoints database.
The Clean button validates each per-point synchronization settings record in the Existing Points table in the APSPoints database. Per-point synchronization settings for points that are no longer associated with the interface instance are purged from the APSPoints database. This operation requires retrieval of the PI point for each per-point synchronization settings record to determine if the point exists and has a PointSource and interface ID for the interface instance. For an interface with thousands of existing points, this operation can take some time.
Note: Clean the Existing Points table following removal of points for the interface using any tool other than PI APS.
Compact Database File
For performance reasons, databases generally do not reorganize the database file to recover space as it is freed and the APSPoints database is no exception. In normal operation, the database can become fragmented and the APSPoints.mdb file containing the database grows. At the end of every synchronization scan, the Synchronization Engine copies the APSPoints database into a new file. Since only the current database information is copied, the new file contains no unused space and, therefore, is the minimum size needed to store the APSPoints database. If the new file is created successfully, the old APSPoints.mdb file is removed and the new file is renamed to APSPoints.mdb.
The Compact button provides the same function from the PI APS Configuration Utility. The PI APS Configuration Utility does not compact the APSPoints database during its normal operation. Specifically, the Purge and Clean buttons in this dialog box do not automatically compact the APSPoints database after deleting rows. Therefore, the APSPoints.mdb file still contains the space that was occupied by the deleted rows and the size of the file does not decrease. Click Compact to compress the APSPoints.mdb file.