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
Last published date
Overview
Product section
Resolution
- Log into the Web Help Desk Server
- Go to:
for PostgreSQL 9, C:\Program Files\WebHelpDesk\pgsql9\bin. For PosgreSQL 13, C:\Program Files\WebHelpDesk\pgsql13\pgAdmin 4\runtime - Run
pgAdmin3 for PosgreSQL 9, pgAdmin4 for PosgreSQL 13. - Connect to the WHD database
- 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;
- In the PostgreSQL, edit
ASSET_SEQ PROPERTIESandSET DEFINITION to 1. (Go to Sequences and right-click on asset_seq and, choose properties, click the Definition tab) - Restart the Web Help Desk Service.