Lists all target servers.
sp_help_targetserver [[@server_name =] 'server_name']
0 (success) or 1 (failure)
If server_name is not specified, sp_help_targetserver returns this result set.
Column name | Data type | Description |
---|---|---|
server_id | int | Server identification number. |
server_name | nvarchar(30) | Server name. |
location | nvarchar(200) | Location of the specified server. |
time_zone_adjustment | int | Time zone adjustment, in hours, from Greenwich mean time (GMT). |
enlist_date | datetime | Date of the specified server’s enlistment. |
last_poll_date | datetime | Date the server was last polled for jobs. |
status | int | Status of the specified server. |
unread_instructions | int | Whether the server has unread instructions. (If all rows have been downloaded, this column is 0.) |
local_time | datetime | Local date and time on the target server, which is based on the local time on the target server as of the last poll of the master server. |
Enlisted_by_nt_user | nvarchar(100) | MicroSoft®Windows NT® user that enlisted the target server. |
poll_interval | int | Frequency with which the target server polls the Master SQL Server Agent in order to download jobs and upload job status. |
Permissions to execute this procedure default to the sysadmin fixed server role and the db_owner fixed database role, who can grant permissions to other users.
This example lists information for all servers, and then only for the LONDON1 target server.
USE msdb
EXEC sp_help_targetserver
EXEC sp_help_targetserver 'LONDON1'
sp_add_targetservergroup | sp_update_targetservergroup |
sp_delete_targetserver | sysdownloadlist |
sp_delete_targetservergroup | System Stored Procedures |