sp_help_targetservergroup (T-SQL)

Lists all target servers in the specified group. If no group is specified, Microsoft® SQL Server™ returns information on all target server groups.

Syntax

sp_help_targetservergroup [[@name =] 'name']

Argument
[@name =] 'name'
Is the name of the target server group for which to return information. name is varchar(100), with a default of NULL.
Return Code Values

0 (success) or 1 (failure)

Result Sets
Column name Data type Description
servergroup_id int Identification number of the server group
name sysname Name of the server group

Permissions

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.

Examples

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'

  

See Also
sp_add_targetservergroup sp_delete_targetservergroup
sp_update_targetservergroup System Stored Procedures

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.