Scheduled task or service to work with a regular database in C #?
I have a web server and a database server and I would like to run a job that uses an existing C # DLL to access the database and do some calculations.
The easiest way to create a console application in C # and schedule it on a web server (application server) to work with a DB server?
I see SSIS as an option, but I don't know which is good, so I thought a console app scheduled as a task would be better.
What do you think?
a source to share
I'm a big fan of the console app + planned approach. It tends to be cleaner, easier to test, and easier to repeat if things go south. However, if you can write the calculations in pure SQL, you can simply run everything as a SQL job. Alternatively, you can use SQLCLR (.NET assemblies that live in SQL Server and are mostly sproc or UDFs) and also run everything entirely within the SQL engine.
a source to share
You don't need to write a separate console application for this if the task is very minor. you can write the page separately and write a batch file, that is, a scheduler, with the same to schedule it. You can also schedule it through the window UI. Also, if your work is a maintenance plan / step (e.g. re-indexing, db backup, defragmentation, history / log cleanup, etc.), then create a maintenance plan for it from your sql server under Manage msgstr "accessible folder.
a source to share