当字段 = 特定值时启动 SQL Server 作业
我不知道这是否可能,所以我很感激任何关于如何实现这一点的想法,甚至是 Sql Server 2005 之外的想法。我有一个连接到远程主机的链接服务器,并且有一个夜间运行的简单导入作业。问题在于,需要导入的大型机上的表只是一个临时报告文件,每次用户运行该报告时都会被覆盖,有时会使用不同的参数,因此数据总是在变化。其中一个请求是 SQL 作业仅在特定用户运行报表时运行。它作为字段存储在导入来源所在的同一主机报告表中。在大型机上设置计划运行不是一个选项,因为我们无法控制它,而让所有者设置它的成本会很高,不要问我为什么。 任何阻止我强迫用户在特定时间运行大型机报告的想法都会有所帮助。
I don't know if this is even possible, so i would appreciate any ideas, even those outside of Sql Server 2005, on how this might be accomplished. I have a linked server set up to a remote mainframe and I have a simple import job that runs overnight. The problem is that the table on the mainframe that the import needs to come from is just a temporary report file that gets overwritten each time a user runs that report, sometimes with different parameters, so the data is always changing. One request was that the SQL job would run only when a specific user runs the report. This is stored as a field in the same mainframe report table that the import is coming from. Setting up a scheduled run on the mainframe is not an option since we don't control it an having the owners set it up would be costly, don't ask me why.
Any ideas that will keep me from forcing the user to run the mainframe report at a specific time would be helpful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,从这方面你唯一能做的就是定期拉取并检测变化。您可以尝试设置一个仅查询报告版本、时间戳和作者的作业。该作业每 5 分钟运行一次,并在检测到更改时触发导入作业。不优雅,但可能已经足够好了。
Well, the only thing that you could do from this side is to pull periodically and detect a change. You may try to set up a job that queries only report version, time-stamp and the author. The job runs every 5 minutes and triggers the import job when it detect changes. Not elegant, but it may be good enough.