Lists all target servers in the specified group. If no group is specified, Microsoft® SQL Server™ returns information on all target server groups.
sp_help_targetservergroup [[@name =] 'name']
0 (success) or 1 (failure)
Column name | Data type | Description |
---|---|---|
servergroup_id | int | Identification number of the server group |
name | sysname | Name of the server group |
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 all target server groups first, followed by all other target servers in the Servers Maintaining Customer Information target server group.
USE msdb
EXEC sp_help_targetserver
EXEC sp_help_targetserver 'Servers Maintaining Customer Information'
sp_add_targetservergroup | sp_delete_targetservergroup |
sp_update_targetservergroup | System Stored Procedures |