Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Adds the specified server group.
Transact-SQL syntax conventions
sp_add_targetservergroup [ @name = ] 'name'
[ ; ]
The name of the server group to create. @name is sysname, with no default. @name can't 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.
You can grant EXECUTE
permissions on this procedure, but these permissions might be overridden during a SQL Server upgrade.
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
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today