执行DTS包 [英] Execute DTS Packages

查看:55
本文介绍了执行DTS包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在企业管理器中创建了一个正常运行的DTS包,现在我希望能够在EM之外执行它。该软件包从SQL dbase导入数据
数据到Visual FoxPro dbase。我希望这个DTS

包每次在SQL dbase的
上生成一个Insert(某些critera)时执行。我认为在SQL

表上使用插入触发器是这样做的方法。我正在寻求建议...这是

最好的方法。


此外,如果是这样,在触发哪条路线是最好的...

1.使用dtsrun命令行实用程序或

2.设置COM对象来运行DTS包

我已经在SQL查询分析器中尝试了两种语法,并且在使用

语法时遇到了麻烦。任何人都可以发送两种方式的代码。谢谢。

美好的一天,


Brett

解决方案

不清楚你为什么要这样做...你在做什么?
你不能通过正常触发器做的DTS?这将有所帮助,如果你可以

解释更多.....


不确定你是否可以通过触发器运行包..可以设置一个工作

并调用一份工作......我也好奇....


我试过将SQL数据库连接到带有T-SQL的VFP表和

没有运气。我已经尝试了几个星期通过远程服务器链接两个

或T-SQL并直接使用触发器。到目前为止,这是我能够开始工作的原因。如果您有其他想法或任何帮助

将不胜感激。


Brett


< blockquote>你应该能够在你的触发器中使用sp_oacreate启动DTSRUN。

你试过这个吗?


有一个叫DTS的工作是另一个选项,然后使用msdb..sp_start_job或类似的东西在触发器中启动作业



我已经完成了这两个。


I have created a functioning DTS package inside Enterprise Manager and
now I want to be able to execute it outside of EM. The package imports
data from an SQL dbase to a Visual FoxPro dbase. I would like this DTS
package to execute everytime an Insert(of certain critera) is made on
the SQL dbase. I am thinking that using an Insert Trigger on the SQL
table is the way to go about this. I am seeking advice as to... is this
the best way to go about this.

Also, and if so, in a trigger which route is the best to take...
1. use dtsrun command line utility or
2. setup a COM object to run the DTS package

I have tried both in SQL query analyzer and am having troubles with the
syntax. Could anyone possibly send the code for both ways. Thanks.
Good Day to all,

Brett

解决方案

Its not clear why you would want to do this... What are you doing in
the DTS that you cant do thru normal trigger? It would help if you can
explain more.....

Not sure if you can run the package thru trigger.. May be set up a job
and invoke a job... I am also curious....


I have tried linking SQL database to the VFP tables with T-SQL and have
had no luck. I have tried for weeks to link the two via Remote Servers
or T-SQL and working with directly in triggers. So far this is what I
have been able to get to work. If you have other ideas or any help
would be appreciated.

Brett


You should be able to fire up DTSRUN using sp_oacreate in your trigger.
Have you tried this?

Having a job that calls the DTS is another option, then start the job
in your trigger with msdb..sp_start_job or something like that.
I have done both of these.


这篇关于执行DTS包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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