在以SQLServer 2019为目标时,Visual Studio 2019 SSIS项目出现80040153错误



Visual Studio Community 2019 16.8.1,SQL Server 2019

我在VS 2019中创建了一个新的SSIS项目。然后我创建了一个Connection Manager,并成功地针对数据库测试了连接。

当用简单的query执行SQL Task时,我会得到以下错误:

[Execute SQL Task] Error: Executing the query "" failed with the following error: "Retrieving the COM class factory for component with CLSID {0EB5013B-538B-456B-AF1B-96DD1004026B} failed due to the following error: 80040153 Invalid value for registry (Exception from HRESULT: 0x80040153 (REGDB_E_INVALIDVALUE)).". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

如果我打开使用Visual Studio 2017创建的SSIS项目,并设置相同的Connection ManagerExecute SQL Taskquery,它将成功运行。

由于query与VS 2017 SSIS项目配合使用,我相信系统配置正确。

我已在Visual Studio中卸载并重新安装了SQL Server Integration Serives Projects扩展,然后删除并重新创建了SSIS项目。

.dtproj文件中有一个条目。

<Configurations>
<Configuration>
<Name>Development</Name>
<Options>
<OutputPath>bin</OutputPath>
<ConnectionMappings />
<ConnectionProviderMappings />
<ConnectionSecurityMappings />
<DatabaseStorageLocations />
<TargetServerVersion>SQLServer2017</TargetServerVersion>
<AzureMode>false</AzureMode>
<LinkedAzureTenantId />
<LinkedAzureAccountId />
<LinkedAzureSSISIR />
<LinkedAzureStorage />
<RemoteExecutionFolder />
<ParameterConfigurationValues>
<ConfigurationSetting>
<Id>LastModifiedTime</Id>
<Name>LastModifiedTime</Name>
<Value xsi:type="xsd:dateTime">2019-07-04T21:20:58.4351661Z</Value>
</ConfigurationSetting>
</ParameterConfigurationValues>
</Options>
</Configuration>
</Configurations>

在VS 2017 SSIS项目中,它被设置为SQLServer2017。在VS 2019 SSIS项目SQLServer2019。如果我的目标是VS 2019 SSIS项目中的2017,则错误将清除。

我从SSMS运行了查询SELECT @@VERSION,它报告:

Microsoft SQL Server 2019 (RTM-GDR) (KB4517790) - 15.0.2070.41 (X64) Oct 28 2019 19:56:59 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Pro 10.0 <X64> (Build 18363: ) (Hypervisor)

为什么目标SQLServer2019抛出错误,但目标SQLServer2017成功运行?

在命令提示符下,您需要运行regsvr32 SQLTaskConnections.dll来注册DLL。这将允许在.dtproj文件中定位SQLServer2019

最新更新