संपादित करें

इसके माध्यम से साझा किया गया


sp_add_targetservergroup (Transact-SQL)

Applies to: SQL Server

Adds the specified server group.

Transact-SQL syntax conventions

Syntax

sp_add_targetservergroup [ @name = ] 'name'
[ ; ]

Arguments

[ @name = ] 'name'

The name of the server group to create. @name is sysname, with no default. @name can't contain commas.

Return code values

0 (success) or 1 (failure).

Result set

None.

Remarks

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.

Permissions

This stored procedure is owned by the db_owner role. You can grant EXECUTE permissions for any user, but these permissions may be overridden during a SQL Server upgrade.

Examples

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