title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sp_update_targetservergroup (Transact-SQL) |
Changes the name of the specified target server group. |
markingmyname |
maghan |
randolphwest |
08/28/2023 |
sql |
system-objects |
reference |
|
|
|
[!INCLUDE SQL Server]
Changes the name of the specified target server group.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sp_update_targetservergroup
[ @name = ] N'name'
, [ @new_name = ] N'new_name'
[ ; ]
The name of the target server group. @name is sysname, with no default.
The new name for the target server group. @new_name is sysname, with no default.
0
(success) or 1
(failure).
To run this stored procedure, users must be granted the sysadmin fixed server role.
sp_update_targetservergroup
must be run from the msdb
database.
The following example changes the name of the target server group Servers Processing Customer Orders
to Local Servers Processing Customer Orders
.
USE msdb;
GO
EXEC dbo.sp_update_targetservergroup
@name = N'Servers Processing Customer Orders',
@new_name = N'Local Servers Processing Customer Orders';
GO