sp_help_targetservergroup (Transact-SQL)

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Lists all target servers in the specified group. If no group is specified, SQL Server returns information about all target server groups.

Topic link icon Transact-SQL Syntax Conventions

Syntax


sp_help_targetservergroup  
    [ [ @name = ] 'name' ]  

Argument

[ @name= ] 'name'
Is the name of the target server group for which to return information. name is sysname, 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.

Examples

A. Listing information for all target server groups

This example lists information for all target server groups.

USE msdb ;  
GO  

EXEC dbo.sp_help_targetservergroup ;  
GO  

B. Listing information for a specific target server group

This example lists information for the Servers Maintaining Customer Information target server group.

USE msdb ;  
GO  

EXEC dbo.sp_help_targetservergroup   
    N'Servers Maintaining Customer Information' ;  
GO  

See Also

sp_add_targetservergroup (Transact-SQL)
sp_delete_targetservergroup (Transact-SQL)
sp_update_targetservergroup (Transact-SQL)
System Stored Procedures (Transact-SQL)