catalog.rename_environment(SSISDB 数据库)catalog.rename_environment (SSISDB Database)

适用范围:SQL Server,包括 Linux Azure SQL 数据库yesAzure SQL 数据仓库no并行数据仓库 APPLIES TO: yesSQL Server, including on Linux yesAzure SQL Database yesAzure SQL Data Warehouse noParallel Data Warehouse

适用对象: yesSQL ServeryesAzure SQL 数据库noAzure SQL 数据仓库no并行数据仓库APPLIES TO: yesSQL Server noAzure SQL Database noAzure SQL Data Warehouse noParallel Data Warehouse

Integration ServicesIntegration Services 目录中重命名环境。Renames an environment in the Integration ServicesIntegration Services catalog.

语法Syntax

catalog.rename_environment [ @folder_name = ] folder_name  
    , [ @environment_name = ] environment_name  
    , [ @new_environment_name= ] new_environment_name  

参数Arguments

[ @folder_name = ] folder_name [ @folder_name = ] folder_name
包含环境的文件夹的名称。The name of the folder that contains the environment. folder_namenvarchar(128)The folder_name is nvarchar(128).

[ @environment_name = ] environment_name [ @environment_name = ] environment_name
环境的原始名称。The original name of the environment. environment_name 为 nvarchar(128) 。The environment_name is nvarchar(128).

[ @new_environment_name = ] new_environment_name[ @new_environment_name = ] new_environment_name
环境的新名称。The new name of the environment. new_environment_namenvarchar(128)The new_environment_name is nvarchar(128).

返回代码值Return Code Value

0(成功)0 (success)

结果集Result Sets

NoneNone

权限Permissions

此存储过程需要下列权限之一:This stored procedure requires one of the following permissions:

  • 针对环境的 MODIFY 权限MODIFY permissions on the environment

  • ssis_admin 数据库角色的成员资格Membership to the ssis_admin database role

  • sysadmin 服务器角色的成员资格Membership to the sysadmin server role

错误和警告Errors and Warnings

下面的列表描述了一些可能引发错误或警告的情况:The following list describes some conditions that may raise an error or warning:

  • 原始环境名称无效The original environment name is not valid

  • 新名称已用于现有环境The new name has already been used on an existing environment

RemarksRemarks

当您重命名环境时,项目中的环境引用不会自动更新。Environment references from projects are not automatically updated when you rename the environment. 必须相应地更新环境引用。Environment references must be updated accordingly. 即使通过更改环境名称损坏了环境引用,此存储过程也会成功。This stored procedure will succeed even if environment references are broken by changing the environment name. 在此存储过程完成之后,必须更新环境引用。Environment references must be updated after this stored procedure completes.

备注

当一个环境引用无效时,对使用这些引用的包进行验证和执行将失败。When an environment reference is not valid, validation and execution of the corresponding packages that use those references will fail.