Removes the specified server from the list of available target servers.
sp_delete_targetserver [@server_name =] 'server'
0 (success) or 1 (failure)
None
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.
Only members of the sysadmin fixed server role or the db_owner fixed database role can execute sp_delete_targetserver.
This example removes the server LONDON1 from the available job servers.
USE msdb
EXEC sp_delete_targetserver 'LONDON1'
sp_help_targetserver | Troubleshooting Multiserver Jobs |
sp_msx_defect | System Stored Procedures |