本文介绍了Sql代理还是Windows服务?何时需要?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据库db1,它有自己用c#开发的应用程序。还有其他几个应用程序,每个应用程序都有自己的数据库。这些其他应用程序将数据存储在自己的数据库中,并使用db1中创建的存储过程在db1中记录一些文档。 db1应用程序的用户需要接受其他应用程序/数据库存储的文档;当他接受它时,会自动在db1中存储文档的应用程序的数据库中执行一些CRUD操作。 Db1不需要知道其他应用程序,反之亦然,因为在将来开发新应用程序时修改db1是不合适的。我的问题是如何自动执行这些CRUD操作?:我在考虑1.在mssql中创建一个工作来执行该操作;开发新应用程序时,会创建一个作业来获取其文档的状态,然后在其数据库中执行操作。

2.为每个应用程序创建Windows服务应用程序,定期检查它存储在db1中的文档的状态,然后执行CRUD操作 - 该服务将在服务器上运行。

3.创建单个Windows服务,获取所有文档的状态,执行CRUD对数据库列表的操作。开发新应用程序时,会将其数据库添加到列表中。



欢迎任何其他建议。



我尝试过:



我不知道选择哪个选项:哪个最好

I have a database db1 which has its own application developed with c#. There are several other applications, which each has its own database. These other applications store data in their own databases and record some documents in db1 using a stored procedure created in db1. The user of the db1 application needs to accept the document stored by the other application/database; when he accepts it, automatically some CRUD actions are performed in the database of the application that stored the document in db1. Db1 needs not to be aware of the other applications but the other way round because it is improper to modify db1 when new applications are developed in future. My question is how do I perform these CRUD actions automatically?: I was thinking of 1. Creating a job in mssql to perform that; when new applications are developed, a job is created for it to fetch the status of its document then perform the action in its database.
2. Creating windows service application for each of the applications, which periodically checks the status of the document it stored in db1, then perform the CRUD actions- this service will run on the server.
3. Creating a single windows service, which fetches the status of all documents, the perform CRUD actions on list of databases. When new applications are developed, their database is added to the list.

Any other suggestions are welcomed.

What I have tried:

I don’t know which option to choose: which is best

推荐答案


这篇关于Sql代理还是Windows服务?何时需要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 11:37