Windows Service or SQL Job?

前端 未结 6 2081
别那么骄傲
别那么骄傲 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条回答
  •  温柔的废话
    2021-02-08 22:37

    Please note that regardless of how you do it, for this task you do not want a service. Services run all day, and will consume a bit of the server's ram all day.

    In this, you have a task you need to run, and run once a day, every day. As such, you'd either want a job in SQL Server or as Joel described an application (console or winforms) that was setup on a schedule to execute and then unload from the server's memory space.

提交回复
热议问题