English 中文(简体)
按数据负荷启动的ql工作
原标题:schedule sql job triggered by data load

我拥有2005年Sql服务器数据库,其中某些数据将每天从外部系统(Oracle)更新。 具体来说,一些表格每天将装满负荷,我需要安排一份工作,直到最后一张桌复读后才开始。 我如何能够这样做? 我是否应当使用一个表格储存数据负荷的具体信息,并定期从中读取,作为板块工作的第一步? 感谢!

问题回答

外部数据库的最后一点是更新目前的运行。 当你完成工作时,她会安排上下班=现在。 当你开始工作时(如果两个班子在X年期间试图与某个人不同,就会检查其身份;如果情况不同,则你的工作就会失败。

You need mechanism to know that external system finished updating your data.

Guess it is some table (SYNC_TBL for instance) in SQL Server that external system inserts to or updates some record to notify end of update by external system.

If You need to:

  • start your job as soon as updating is finished - put trigger on SYNC_TBL table and execute job using sp_start_job.
  • start your job some time after updating is finished - schedule job to run every 15 minutes and check SYNC_TBL in the first step to see whether your job should proceed or not

Note that You need to have another check on external system side: updating data probably should not start again until job finishes its execution. You can use column Processed BIT in SYNC_TBL to mark whether data is processed by your job or not.





相关问题
SQL Server database is not visible

I have installed ASP.NET application with database on our server. ASP.NET application created database using connection string below. The problem is that I do not see database in SQL Server Management ...

Most efficient way to store number 11.111 in SQL Server

What datatype is the most efficient to store a number such as 11.111. The numbers will have up 2 digits before the point and up to three after. Currently the column is a bigint , I am guessing that ...

表格和数据表

是否需要在提瓜表之后更新表格统计数据,还是自动更新?

Inconsistent Generate Change Script

I add a column of type tinyint and being set to not allow nulls in a table and generate the change scripts. The table has data in it at this time. The script has code that creates a temp table and ...

Performance of Sql subqueriesfunctions

I am currently working on a particularly complex use-case. Simplifying below :) First, a client record has a many-to-one relationship with a collection of services, that is, a single client may have ...

selecting one value out of an xml column

I have a particularly troublesome xml column to query data from. The schema is fixed by the Quebec Ministry of Revenue so "it is what it is" The important part of the query looks like this: with ...

Selecting records during recursive stored procedure

I ve got a content management system that contains a hierarchical structure of categories, with sub-categories subject to different ordering options at each level. Currently, that s retrieved by a (...

热门标签