You are trying to remove a Discover server from the Data Loss Prevention(DLP) Enforce Server and getting the following error:
Red Banner Error:
Server server_name cannot be deleted because at least one Discover Target is assigned to it. You must first assign this Discover Target to another server or delete it.
Go to the Discover Target list and move or delete any targets assigned to the Discover server you wish to delete.
Note: To successfully delete a Discover target all associated incidents must be deleted as well.
If no Discover Targets can be found assigned to the Discover Server, run the following SQL query against the database as the protect user. This will identify the name of the Discover Target linked to the Detection Server.
Note: The query below assumes that the name of the Detection server you want to delete in the Enforce Console is "Example Discover Server Name" (in red). Replace the server name with the name of your Discover Server.
select TT1.name
from scanassignment TT1
inner join scanassignmentserver TT2 ON TT1.scanassignmentid = TT2.scanassignmentid
inner join informationmonitor TT3 ON TT2.informationmonitorid = TT3.informationmonitorid
where
TT3.monitorname = 'Example Discover Server Name'
and TT1.isdeleted=0
and TT3.isdeleted=0;