--- title: "sp_update_targetservergroup (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "03/14/2017" ms.prod: "sql-non-specified" ms.reviewer: "" ms.suite: "" ms.technology: - "database-engine" ms.tgt_pltfrm: "" ms.topic: "language-reference" f1_keywords: - "sp_update_targetservergroup_TSQL" - "sp_update_targetservergroup" dev_langs: - "TSQL" helpviewer_keywords: - "sp_update_targetservergroup" ms.assetid: 4ac65ed6-e07e-40e4-a282-13bfd92dfa41 caps.latest.revision: 31 author: "JennieHubbard" ms.author: "jhubbard" manager: "jhubbard" --- # sp_update_targetservergroup (Transact-SQL) [!INCLUDE[tsql-appliesto-ss2008-xxxx-xxxx-xxx_md](../../includes/tsql-appliesto-ss2008-xxxx-xxxx-xxx-md.md)] Changes the name of the specified target server group. || |-| |**Applies to**: [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] ([!INCLUDE[ssKatmai](../../includes/sskatmai-md.md)] through [current version](http://go.microsoft.com/fwlink/p/?LinkId=299658)).| ![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md) ## Syntax ``` sp_update_targetservergroup [@name =] 'current_name' , [@new_name =] 'new_name' ``` ## Arguments [ **@name =**] **'***current_name***'** The name of the target server group. *current_name* is **sysname**, with no default. [ **@new_name =**] **'***new_name***'** The new name for the target server group. *new_name* is **sysname**, with no default. ## Return Code Values **0** (success) or **1** (failure) ## Permissions To run this stored procedure, users must be granted the **sysadmin** fixed server role. ## Remarks **sp_update_targetservergroup** must be run from the **msdb** database. ## Examples 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 ``` ## See Also [sp_add_targetservergroup (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-add-targetservergroup-transact-sql.md) [sp_delete_targetservergroup (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-delete-targetservergroup-transact-sql.md) [sp_help_targetservergroup (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-help-targetservergroup-transact-sql.md) [System Stored Procedures (Transact-SQL)](../../relational-databases/system-stored-procedures/system-stored-procedures-transact-sql.md)