作为计划作业运行时,具有 COM Interop 的 SSIS 失败

发布于 2024-07-27 16:47:56 字数 989 浏览 6 评论 0原文

我有一个 SSIS 包,它利用 RightFax 的 COM API (rfcomapi.dll) 周围的 COM Interop (Interop.RFCOMAPILib.dll)。

Interop 程序集已经过 GAC 处理,以便我们可以在 SSIS 包中使用它。

该包在我的本地计算机上运行得很好。 但如果手动启动,它在服务器上也可以正常工作(意味着服务器上的所有配置都是正确的)


(来源:codinghorror.com)

但是当我们将包放在计划作业上(在我们能够手动运行它的同一台服务器上)并让作业启动包时,它会失败在下一行。

Dim faxServer As New FaxServerClass()

并出现以下错误

Error: 2009-07-16 15:32:01.39
    Code: 0x00000002
    Source: Send PO Notification Faxes and Mark as Processed 
    Description: The script threw an exception: Object reference not set to an instance of an object.
End Error

此行是整个包中第一次尝试从 COM Interop 程序集实例化类。

可能发生什么事? 线程问题还是什么?

I have an SSIS Package that utilizes a COM Interop (Interop.RFCOMAPILib.dll) around RightFax's COM API (rfcomapi.dll).

The Interop assembly has been GAC'd so that we can use it within the SSIS package

The package runs just fine on my local machine. But it also works just fine on the server if it is manually started (meaning all of the configuration on the server is correct)


(source: codinghorror.com)

But when we go to put the package on a scheduled job (on the same server that it we were able to manually run it on) and have the job start the package it fails on the following line.

Dim faxServer As New FaxServerClass()

and with the following error

Error: 2009-07-16 15:32:01.39
    Code: 0x00000002
    Source: Send PO Notification Faxes and Mark as Processed 
    Description: The script threw an exception: Object reference not set to an instance of an object.
End Error

This line is the first time in the entire package that a class is trying to be instantiated from the COM Interop assembly.

What could be going on? A threading issue or something?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

苍景流年 2024-08-03 16:47:56

事实证明,COM Interop 程序集在 64 位(服务器所在的位置)运行时出现问题,我们将其切换到 32 位,并且运行良好。

It turns out that the COM Interop assembly had issues running in 64bit (which the server was on) we switched it to 32bit and it ran fine.

心病无药医 2024-08-03 16:47:56

尝试此支持文章中的方法 3

更改 SSIS 包
ProtectionLevel 属性为
使用密码加密敏感数据。 这
设置使用密码
加密。 然后您可以修改
SQL Server 代理作业步骤命令行
包含此密码。

Try Method 3 from this support article.

Change the SSIS Package
ProtectionLevel property to
EncryptSensitiveWithPassword. This
setting uses a password for
encryption. You can then modify the
SQL Server Agent job step command line
to include this password.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文