Udostępnij za pośrednictwem


catalog.create_environment_reference (SSISDB Database)

Creates an environment reference for a project in the Integration Services catalog.

Składnia

create_environment_reference [ @folder_name = ] folder_name
     , [ @project_name = ] project_name
     , [ @environment_name = ] environment_name
     , [ @reference_location = ] reference_location
  [  , [ @environment_folder_name = ] environment_folder_name ]
  [  , [ @reference_id = ] reference_id OUTPUT ]

Arguments

  • [ @folder\_name = ] folder_name
    The name of the folder of the project that is referencing the environment. The folder_name is nvarchar(128).

  • [ @project\_name = ] project_name
    The name of the project that is referencing the environment. The project_name is nvarchar(128).

  • [ @environment\_name = ] environment_name
    The name of the environment being referenced. The environment_name is nvarchar(128).

  • [ @reference\_location = ] reference_location
    Indicates whether the environment can be located in the same folder as the project (relative reference) or in a different folder (absolute reference). Use the value R to indicate a relative reference. Use the value A to indicate an absolute reference. The reference_location is char(1).

  • [ @environment\_folder\_name = ] environment_folder_name
    The name of the folder in which the environment that being referenced is located. This value is required for absolute references. The environment_folder_name is nvarchar(128).

  • [ @reference\_id = ] reference_id
    Returns the unique identifier for the new reference. This parameter is optional. The reference_id is bigint.

Return Code Value

0 (success)

Result Sets

None

Permissions

This stored procedure requires one of the following permissions:

  • READ and MODIFY permissions on the project, and READ permission on the environment

  • Membership to the ssis_admin database role

  • Membership to the sysadmin server role

Errors and Warnings

The following list describes some conditions that may raise an error or warning:

  • The folder name is not valid

  • The project name is not valid

  • The user does not appropriate permissions

  • 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.

Remarks

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.