Skip to content

Latest commit

 

History

History
87 lines (62 loc) · 2.36 KB

sp-help-targetservergroup-transact-sql.md

File metadata and controls

87 lines (62 loc) · 2.36 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_help_targetservergroup (Transact-SQL)
sp_help_targetservergroup lists all target servers in the specified group.
markingmyname
maghan
randolphwest
05/14/2024
sql
system-objects
reference
sp_help_targetservergroup_TSQL
sp_help_targetservergroup
sp_help_targetservergroup
TSQL

sp_help_targetservergroup (Transact-SQL)

[!INCLUDE SQL Server]

Lists all target servers in the specified group. If no group is specified, [!INCLUDE ssNoVersion] returns information about all target server groups.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

sp_help_targetservergroup [ [ @name = ] N'name' ]
[ ; ]

Arguments

[ @name = ] N'name'

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 set

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. List 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. List 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

Related content