Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. In 
    Companyname
    , go to Setup > System and click History Report.
  2. The report shows the total size of History data in each table, and the individual records with the most History entries.
    Image RemovedExample History ReportImage Added

MS SQL Server

For an MS SQL server, follow these steps to check the history size for a table:

  1. In
    Companyname
    , go to [Setup Table] for the table in question and note the Table Name. The Table Name is above the Logical Table Name on the General tab.
    Image Removed Table Name fieldImage Added
  2. Run a query from SQL Server Management Studio (SSMS), replacing table_name with the value for your table:  select h.dbname from swtable h, swtable t where t.dbname='table_name' and t.historytableid=h.swtableid
  3. This returns the name of the history table corresponding to the table you chose. Using this information, you can find:
    • The number of history records, replacing history_table with the name of your history table:  select count(*) from history_table
    • The size of the history table in bytes, replacing history_table with the name of your history table:  sp_spaceused history_table

...

Show If
spacePermissionwiki

Companyname
 personnel can query history table size if they have access to the server command line and the appropriate server key. At the command line, run: sudo ls -la --sort=size /opt/server/Agiloft/mysql/data/sw2_std | grep hst_h | head -n 20

This query returns the top 20 largest history tables on the server, for all KBs on the server. From there, you can run additional queries to find the corresponding KB names, number of records, top offending records for a given history table, and more. Some of the tables might be recognizable by name.

You can also query the top five largest non-history tables in the database and a summary of activities. Download this script and run it on the command line on the server as follows: - python agiloft_stats.py

Hide If
displayprintable

Content by Label
showLabelsfalse
max7
showSpacefalse
cqllabel = "performance" and space = currentSpace()