Tools

How to delete assets from a PostgreSQL database in WHD

How to delete assets from the PostgreSQL database in Web Help Desk.

First published date

10/31/2018 5:48 PM

Last published date

9/16/2025 5:57 PM

Overview

This article describes how to delete assets from the Web Help Desk PostgreSQL database.

Product section

Web Help Desk

Resolution

  1. Log into the Web Help Desk Server
  2. Go to:
     for PostgreSQL 9, C:\Program Files\WebHelpDesk\pgsql9\bin. For PosgreSQL 13, C:\Program Files\WebHelpDesk\pgsql13\pgAdmin 4\runtime
  3. Run pgAdmin3 for PosgreSQL 9, pgAdmin4 for PosgreSQL 13.
  4. Connect to the WHD database
  5. Run the following queries through the SQL button:
-- Scripts are not supported under any SolarWinds support program or service.
-- Scripts are provided AS IS without warranty of any kind. SolarWinds further
-- disclaims all warranties including, without limitation, any implied warranties
-- of merchantability or of fitness for a particular purpose. The risk arising
-- out of the use or performance of the scripts and documentation stays with you.
-- In no event shall SolarWinds or anyone else involved in the creation,
-- production, or delivery of the scripts be liable for any damages whatsoever
-- (including, without limitation, damages for loss of business profits, business
-- interruption, loss of business information, or other pecuniary loss) arising
-- out of the use of or inability to use the scripts or documentation. UPDATE job_ticket SET asset_id=NULL; UPDATE MODEL SET ASSET_TYPE_ID=NULL; UPDATE MODEL SET MANUFACTURER_ID=NULL; UPDATE ASSET SET MODEL_ID=NULL; DELETE FROM asset_custom_field; DELETE FROM asset_bulk_action_child; DELETE FROM asset_bulk_action_parent; DELETE FROM asset_client; DELETE FROM asset_generic_attachment; DELETE FROM asset_history; DELETE FROM asset_reservation_asset; DELETE FROM asset_type; DELETE FROM asset_type_custom_field; DELETE FROM job_ticket_asset; DELETE FROM po_item; DELETE FROM part; DELETE FROM manufacturer; DELETE FROM asset; DELETE FROM computer_identity; DELETE FROM nodes; DELETE FROM model;
  1. In the PostgreSQL, edit ASSET_SEQ PROPERTIES and SET DEFINITION to 1. (Go to Sequences and right-click on asset_seq and, choose properties, click the Definition tab)
  2. Restart the Web Help Desk Service.