| title | sp_add_targetservergroup (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 03/03/2017 | ||
| ms.prod | sql-non-specified | ||
| ms.reviewer | |||
| ms.suite | |||
| ms.technology |
|
||
| ms.tgt_pltfrm | |||
| ms.topic | language-reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | acb69343-d766-46ff-b771-0c7655c5231a | ||
| caps.latest.revision | 32 | ||
| author | JennieHubbard | ||
| ms.author | jhubbard | ||
| manager | jhubbard |
[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx_md]
Adds the specified server group.
Transact-SQL Syntax Conventions
sp_add_targetservergroup [ @name = ] 'name'
[ @name=] 'name'
The name of the server group to create. name is sysname, with no default. name cannot contain commas.
0 (success) or 1 (failure)
None
Target server groups provide an easy way to target a job at a collection of target servers. For more information, see sp_apply_job_to_targets.
Only members of the sysadmin fixed server role can execute this procedure.
The following example creates the target server group named Servers Processing Customer Orders.
USE msdb ;
GO
EXEC dbo.sp_add_targetservergroup
'Servers Processing Customer Orders' ;
GO
sp_apply_job_to_targets (Transact-SQL)
sp_delete_targetservergroup (Transact-SQL)
sp_help_targetservergroup (Transact-SQL)
sp_update_targetservergroup (Transact-SQL)
System Stored Procedures (Transact-SQL)