sp_delete_targetserver
Removes the specified server from the list of available target servers.
Syntax
sp_delete_targetserver [ @server_name = ] 'server'
Arguments
[@server_name =] 'server'
Is name of the server to remove as an available target server. server is nvarchar(30), with no default.
Return Code Values
0 (success) or 1 (failure)
Result Sets
None
Remarks
The @clear_downloadlist and @post_defection parameters also exist in sp_delete_targetserver, but are reserved for internal use only.
The normal way to delete a target server is to call sp_msx_defect at the target server. Use sp_delete_targetserver only when a manual defection is necessary.
Permissions
Only members of the sysadmin fixed server role or the db_owner fixed database role can execute sp_delete_targetserver.
Examples
This example removes the server LONDON1 from the available job servers.
USE msdb
EXEC sp_delete_targetserver 'LONDON1'