当字段 = 特定值时启动 SQL Server 作业

发布于 2024-08-14 00:55:17 字数 299 浏览 5 评论 0原文

我不知道这是否可能,所以我很感激任何关于如何实现这一点的想法,甚至是 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 技术交流群。

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

发布评论

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

评论(1

眉目亦如画i 2024-08-21 00:55:17

好吧,从这方面你唯一能做的就是定期拉取并检测变化。您可以尝试设置一个仅查询报告版本、时间戳和作者的作业。该作业每 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.

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