Network Management

Delete credentials stored in the database used in deploying an agent

This article details how to delete credentials stored in a database used in deploying an agent. Great when you do not want to store credentials on the database after installing a Windows Server Agent. Remove unused agent deployment.

First published date

10/15/2018 1:29 PM

Last published date

9/8/2022 2:13 PM

Overview

A guide on how to delete credentials stored in a database that was used in deploying an agent. This solution applies for scenarios wherein you do not want to store credentials on database after installing a Windows Server agent.

Product section

Network Performance Monitor

Resolution

Note: Create a backup of your Orion database before making any changes

First, verify that that credential is not in use.

  1. Open Database Manager on the polling server. 
  2. Click Add default server.
  3. Expand the SQL server and right-click your SolarWinds Orion database to select 'New Query'
  4. Run this query to determine if the node credentials are in use with other nodes. Replace Local Admin with the name of your credential as it appears in the [Credential] table.
-- 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.

DECLARE @CredName nvarchar(max)
SET @CredName = 'Local Admin'
SELECT n.Caption FROM NodesData n
JOIN NodeSettings ns ON ns.NodeID = n.NodeID
JOIN CredentialProperty cp ON cp.CredentialID = ns.SettingValue
JOIN Credential c ON c.ID = cp.CredentialID
WHERE ns.SettingName = 'WMICredential'
AND n.ObjectSubType = 'WMI'
AND c.Name = @CredName
  1. Results provided in this query indicates that the credential is in use for WMI-managed nodes.
 
  1. Connect to your SolarWinds Orion server remotely.
  2. Open Database Manager.
  3. Click Add default server.
  4. Expand SOLARWINDS_ORION.
  5. Select and expand SolarWindsOrion
  6. Open the Credential Table [dbo].[Credential] from the list and click Execute query.
  7. Click Enable table editing.
  8. Select and right-click the row of the desired credential that needs to be deleted.
  9. Confirm to delete the selected row(s).
  10. Check if the credential is still listed on the drop down menu when you select Windows Servers: Agent