catalog.set_environment_reference_type(SSISDB 数据库)catalog.set_environment_reference_type (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 目录中某个项目的现有环境引用关联的引用类型和环境名称。Sets the reference type and environment name associated with an existing environment reference for a project in the Integration ServicesIntegration Services catalog.

语法Syntax

catalog.set_environment_reference_location [ @reference_id = reference_id  
    , [ @reference_type = ] reference_type  
 [  , [ @environment_folder_name = ] environment_folder_name ]  

参数Arguments

[ @reference_id = ] reference_id[ @reference_id = ] reference_id
要更新的环境引用的唯一标识符。The unique identifier of the environment reference that is to be updated. reference_id 为 bigint。The reference_id is bigint.

[ @reference_type = ] reference_type[ @reference_type = ] reference_type
指示环境是可以位于与项目相同的文件夹中(相对引用),还是位于其他文件夹中(绝对引用)中。Indicates whether the environment can be located in the same folder as the project (relative reference) or in a different folder (absolute reference). 使用值 R 指示相对引用。Use the value R to indicate a relative reference. 使用值 A 指示绝对引用。Use the value A to indicate an absolute reference. reference_type 为 char(1)。The reference_type is char(1).

[ @environment_folder_name = ] environment_folder_name[ @environment_folder_name = ] environment_folder_name
环境所在的文件夹。The folder in which the environment is located. 此值对于绝对引用是必需的。This value is required for absolute references. environment_folder_name 为 nvarchar(128)。The environment_folder_name is nvarchar(128).

返回代码值Return Code Value

0(成功)0 (success)

结果集Result Sets

NoneNone

权限Permissions

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

  • 针对项目的 READ 和 MODIFY 权限,以及针对环境的 READ 权限READ and MODIFY permissions on the project, and READ permission 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:

  • 文件夹名称、环境名称或引用 ID 无效The folder name, environment name, or reference ID is not valid

  • 用户没有相应的权限The user does not appropriate permissions

  • 通过使用 reference_location 参数中的 A 字符指定绝对引用,而未使用 environment_folder_name 参数指定该文件夹的名称。An absolute reference is specified by using the A character in the reference_location parameter, but the name of the folder was not specified with the environment_folder_name parameter.

RemarksRemarks

项目可以具有相对或绝对的环境引用。A project can have relative or absolute environment references. 相对引用通过名称引用环境,并要求它与项目位于相同文件夹中。Relative references refer to the environment by name and require that it resides in the same folder as the project. 绝对引用通过名称和文件夹引用环境,可能引用与项目不在同一文件夹中的环境。Absolute references refer to the environment by name and folder, and may refer to environments that reside in a different folder than the project. 项目可以引用多个环境。A project can reference multiple environments.

重要

如果指定了相对引用,则不会使用 environment_folder_name 参数值,并且环境文件夹名称将自动设置为 NULL。If a relative reference is specified, the environment_folder_name parameter value is not used, and the environment folder name is automatically set to NULL. 如果指定了绝对引用,则必须在 environment_folder_name 参数中提供环境文件夹名称。If an absolute reference is specified, the environment folder name must be provided in the environment_folder_name parameter.