Use piconfig to set the retention period
- Last UpdatedJan 13, 2023
- 1 minute read
- PI System
- PI Server
Use the piconfig utility to set the ConnectionDatabaseRetentionDuration parameter in the pitimeout table. The value is in hours: the minimum is 24, maximum is 17,520 (2 years), and default is 8,760 hours (1 year).
ConnectionDatabaseRetentionDuration controls how old an expired connection can be before it is removed from the database. For example, if this parameter is set to 24, any connection that expired more than 24 hours ago is removed from the database the next time the removal task runs (every 16 hours).
If a system has a high volume of connections (for example, a client connects and immediately disconnects multiple times over long period of time), setting this parameter to a low value might help reduce disk space used by connection history data.
The following example sets the retention period for the connection history to 72 hours (3 days).
C:\Program Files\PI\adm>piconfig.exe
* (Ls - ) PIconfig> @mode edit
* (Ed - ) PIconfig> @tabl pitimeout
* (Ed - PITIMEOUT) PIconfig> @istr name,value
* (Ed - PITIMEOUT) PIconfig> ConnectionDatabaseRetentionDuration, 72
*> ConnectionDatabaseRetentionDuration, 72
* (Ed - PITIMEOUT) PIconfig> @mode list
* (Ls - PITIMEOUT) PIconfig> @ostr name,value
* (Ls - PITIMEOUT) PIconfig> @istr name
* (Ls - PITIMEOUT) PIconfig> ConnectionDatabaseRetentionDuration
*> ConnectionDatabaseRetentionDuration
ConnectionDatabaseRetentionDuration,72
* (Ls - PITIMEOUT) PIconfig> @ends
* (Ls - PITIMEOUT) PIconfig> @quit
PIconfig 2 Data lines
8 Command line
0 Records in error...
1 Records Edited
1 Records Listed
For more information about using the piconfig utility, see Configure Data Archive tables using piconfig .