How can I execute a stored procedure every one hour by using .net code?
(Stored procedure should be executed automatically for every one hr)
How can I execute a stored procedure every one hour by using .net code?
(Stored procedure should be executed automatically for every one hr)
.net processes are too expensive in terms of memory for such tasks.
If you really need to run a .net application, look out for scheduled tasks. Windows task scheduler is good for such tasks.
First you need to write a Windows service and set it to run every hour.
Calling a stored procedure from c# code can be done Like this.
I haven't posted any code myself becuase I can't find any code in your question as well. A little effort will get you a long way
As commented, best option is to create an SQL agent job. From Microsoft MSDN, to create a SQL Server Agent job: