通过SQLServer代理作业执行包时无数据输出 [英] No data output when executing package through SQLServer Agent job

查看:142
本文介绍了通过SQLServer代理作业执行包时无数据输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部...

提前非常感谢任何帮助。

Any assistance is greatly appreciated in advance.

我有一个包(在一个项目中)执行SQL转换,然后使用C#脚本使用XSL样式表创建XML输出文件。 当程序包在SQLAgent计划批处理作业中执行时,会发生最奇怪的行为。 
SQLAgent执行不会生成其中一个XML元素;但是当项目包在项目内独立执行时,一切运行良好。 我已经删除了SQLAgent作业(运行多个步骤)并从头开始重新创建,我有
创建了一个仅包含一个包的SQLAgent作业,但仍然只生成了一个元素。

I have a package (within a project) that executes a SQL transform and then uses a C# script to create an XML output file using a XSL style sheet.  The strangest behavior occurs when the package executes within a SQLAgent scheduled batch job.  The SQLAgent execution does not produce one of the XML elements; but when the package is executed as a stand alone from within the project everything works well.  I have deleted the SQLAgent job (which runs multiple steps) and recreated from scratch, I have created a SQLAgent job with only the one package and still just the one elements does not generate.

有没有人见过类似的行为? 如何调试和排除故障? 我如何更正?

Has anyone ever seen similar behavior?  How do I debug and troubleshoot?  How do I correct?

执行SQLAgent作业时< LINES>元素 不生成 。 当我从SSMS / IntegrationServices Catalog / SSISDB / Project中右键单击该包并选择execute;
然后< LINES> element  生成 。 

When executing the SQLAgent job the <LINES> element does not generate.  When I right click the package from within SSMS/IntegrationServices Catalog/SSISDB/Project and select execute; then the <LINES> element does generate

< ORDERLIST>< ORDER>< LINES<> < PAYMENTS>< COUPONS>< ADJUSTMENTS>

有没有人见过类似的行为? 如何调试和排除故障? 我如何更正?

Has anyone ever seen similar behavior?  How do I debug and troubleshoot?  How do I correct?

joemac

推荐答案

您好joemac,

Hi joemac,

您的SSIS运行时环境是参数驱动的。因此,右键单击包执行方法可能会获取一些默认参数。虽然SQL Server代理可以选择不同的参数,但它可以连接到不同的数据库,
等。

Your SSIS run-time environment is parameter driven. So it is possible that right-click package execute method is picking up some default parameters. Though SQL Server Agent could be picking different parameters, it could connect to a different database, etc.

XSLT转换需要输入XML文件才能转换为最终输出XML文件。

XSLT Transformation requires input XML file before it is converted to the final output XML file.

因此,您可以开始比较两种SSIS包启动方式的临时输入XML文件。

So you can start with comparison of that temporary input XML file for both ways of SSIS package launching.


这篇关于通过SQLServer代理作业执行包时无数据输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆