Windows Service or SQL Job?

前端 未结 6 2015
别那么骄傲
别那么骄傲 2021-02-08 21:52

I have an archiving process that basically deletes archived records after a set number of days. Is it better to write a scheduled SQL job or a windows service to accomplish the

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-08 22:37

    In the past we've had a number of SQL Jobs run. Recently, however, we've been moving to calling those processes from .Net code as a client application run from a windows schedule task, for two reasons:

    1. It's easier to implement features like logging this way.
    2. We have other batch jobs that don't run in the database, and therefore must be in windows scheduled tasks. This way all the batch jobs of any type will be listed in one place.

提交回复
热议问题