catalog.validate_package(SSISDB 数据库)catalog.validate_package (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 目录中的包。Asynchronously validates a package in the Integration ServicesIntegration Services catalog.


catalog.validate_package [ @folder_name = ] folder_name  
    , [ @project_name = ] project_name  
    , [ @package_name = ] package_name  
    , [ @validation_id = ] validation_id OUTPUT  
 [  , [ @use32bitruntime = ] use32bitruntime ]  
 [  , [ @environment_scope = ] environment_scope ]  
 [  , [ @reference_id = ] reference_id ]  


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

[ @project_name = ] project_name [ @project_name = ] project_name
包含此包的项目的名称。The name of the project that contains the package. project_namenvarchar(128)The project_name is nvarchar(128).

[ @package_name = ] package_name [ @package_name = ] package_name
包的名称。The name of the package. package_name 为 nvarchar(260) 。The package_name is nvarchar(260).

[ @validation_id = ] validation_id [ @validation_id = ] validation_id
返回验证的唯一标识符 (ID)。Returns the unique identifier (ID) of the validation. validation_id 为 bigint 。The validation_id is bigint.

[ @use32bitruntime = ] use32bitruntime [ @use32bitruntime = ] use32bitruntime
指示是否应使用 32 位运行时在 64 位操作系统上运行包。Indicates if the 32-bit runtime should be used to run the package on a 64-bit operating system. 在 64 位操作系统上运行时,使用值 1 以便使用 32 位运行时执行此包。Use the value of 1 to execute the package with the 32-bit runtime when running on a 64-bit operating system. 在 64 位操作系统上运行时,使用值 0 以便使用 64 位运行时执行此包。Use the value of 0 to execute the package with the 64-bit runtime when running on a 64-bit operating system. 此参数可选。This parameter is optional. use32bitruntime 为 bit 。The use32bitruntime is bit.

[ @environment_scope = ] environment_scope [ @environment_scope = ] environment_scope
指示由验证考虑的环境引用。Indicates the environment references that are considered by the validation. 如果值为 A,则验证中包括与项目关联的所有环境引用。When the value is A, all environment references associated with the project are included in the validation. 值为 S 时,只包括一个环境引用。When the value is S, only a single environment reference is included. 当值为 D 时,不包括环境引用,并且每个参数必须有文字默认值才能通过验证。When the value is D, no environment references are included and each parameter must have a literal default value in order to pass validation. 此参数可选。This parameter is optional. 默认情况下使用字符 DThe character D is used by default. environment_scope 为 char(1) 。The environment_scope is char(1).

[ @reference_id = ] reference_id [ @reference_id = ] reference_id
环境引用的唯一 ID。The unique ID of the environment reference. 如果 environment_scope 为 S,仅当在验证中包含单个环境引用时,才需要此参数。This parameter is required only when a single environment reference is included in the validation, when environment_scope is S. reference_id 为 bigint 。The reference_id is bigint.

返回代码值Return Code Values

0(成功)0 (success)

结果集Result Sets



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

  • 针对项目的 READ 权限,如果适用,则包含针对引用环境的 READ 权限READ permissions on the project and, if applicable, READ permissions on the referenced environments

  • 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 project name or package name is not valid

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

  • 验证中包含的一个或多个引用环境不包含引用的变量One or more of the referenced environments included in the validation do not contain referenced variables

  • 包验证失败The validation of the package fails

  • 所引用的环境不存在The environment that is referenced does not exist

  • 在验证中包含的引用环境中找不到引用的变量Referenced variables cannot be found in the referenced environments included in the validation

  • 包参数中引用了变量,但验证中不包括任何引用的环境Variables are referenced in the package parameters, but no referenced environments have been included in the validation


验证有助于识别可能阻止包成功运行的问题。Validation helps identify issues that may prevent the package from running successfully. 使用 catalog.validationscatalog.operations 视图以监视验证状态。Use the catalog.validations or catalog.operations views to monitor for validation status.