| title | sp_help_targetservergroup (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 08/09/2016 | ||
| ms.prod | sql | ||
| ms.prod_service | database-engine | ||
| ms.reviewer | |||
| ms.technology | system-objects | ||
| ms.topic | language-reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | ec3a4a68-b591-431c-9518-053ede522d0c | ||
| author | stevestein | ||
| ms.author | sstein |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]
Lists all target servers in the specified group. If no group is specified, [!INCLUDEssNoVersion] returns information about all target server groups.
Transact-SQL Syntax Conventions
sp_help_targetservergroup
[ [ @name = ] 'name' ]
[ @name = ] 'name'
Is the name of the target server group for which to return information. name is sysname, with a default of NULL.
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.
This example lists information for all target server groups.
USE msdb ;
GO
EXEC dbo.sp_help_targetservergroup ;
GO
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
sp_add_targetservergroup (Transact-SQL)
sp_delete_targetservergroup (Transact-SQL)
sp_update_targetservergroup (Transact-SQL)
System Stored Procedures (Transact-SQL)