How to delete a computer asset and remove all associated data.
Within SQL Management Studio, right click the Asset Manager database name and select "New Query".
Execute the query below, changing the “Computername” to the Computer that should be deleted.
--SQL Query to delete a computer asset
DECLARE @WorkstationID int
DECLARE @RetValue bit
SET @WorkstationID = (SELECT TOP 1 WorkstationID FROM Workstation WITH (NOLOCK) WHERE Hostname = 'Computername')
IF (@WorkstationID IS NOT NULL)
exec prcDeleteWorkstation @WorkstationID, -10, @RetValue out
The information in the script(s) provided is known to work successfully; however, they have not been officially tested by Quest Software Quality Control. If any of these instructions are changed and/or incorrectly used, intentionally or unintentionally, this solution becomes unsupported by Quest Software Support and Development.
Quest Software Support and Development recommend always making a backup of the current database prior to execution of any script(s) that may modify it.
For customization of the Asset Manager, please contact our Professional Services Organization.
© 2021 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Términos de uso Privacidad