Export (0) Print
Expand All
Expand Minimize

sp_add_targetservergroup (Transact-SQL)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Adds the specified server group.

Applies to: SQL Server (SQL Server 2008 through current version).

Topic link icon 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)

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 ;

EXEC dbo.sp_add_targetservergroup
    'Servers Processing Customer Orders' ;
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft