Submit a ticketCall us

AnnouncementsFace your biggest database issues head-on

Our new eCourse helps you navigate SQL Server performance blocks by teaching you how to recognize and deal with the three DBA Disruptors: Performance Hog, Blame Shifter, and Query Blocker. Register today to learn how to defend your environment and fend off menacing disruptions.

Register for your free eCourse.

Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > Truncate large SAM HardwareItem tables

Truncate large SAM HardwareItem tables

Table of contents
Created by Malik Haider, last modified by carolyn.mazenko on Aug 17, 2018

Views: 1,603 Votes: 0 Revisions: 10

Updated August 16, 2018


This article describes how to truncate APM_HardwareItem tables holding large historical data for SAM, which only contain device hardware statuses. Truncating these tables will involve re-polling the current status of the hardware and re-populating the table. 


The original name of SolarWinds SAM was APM so you may still see references to "APM" in SAM log files and database elements.


Truncating tables can reduce the database size significantly and help the application and database perform faster including loading data on the website.   


This article is part of the Quick Orion database health check guide that SolarWinds strongly recommends for use in checking current database health and settings. 


table_name rows size_in_kb
APM_HardwareItem_Detail 1381684300 11860320
APM_HardwareItem_Hourly 69985120 4248400
APM_HardwareItem_Daily 34829770 2279760




SAM 6.2 and later


  1. Create a backup of your Orion database. Refer to Backing Up, Restoring, and Migrating Your Orion Database.
  2. Run the following SQL query through Database Manager. Refer to Run an SQL query in Orion Database Manager on Windows Server 2008.

Truncate table  APM_HardwareItem_Detail
Truncate table  APM_HardwareItem_HourlyData
Truncate table  APM_HardwareItem_Hourly
Truncate table  APM_HardwareItem_DailyData
Truncate table  APM_HardwareItem_Daily

  1. Click Execute Query.
  2. Shrink the Orion Database  to reclaim the unused free space.




Last modified