Wednesday, March 21, 2012

How to run a stored procedure by schedule

Is there a way to run a stored procedure based on schedule like every 8p.m everyday?schedule a Job, in this job executes your Stored Procedure:

in the option tree of Enterprise management, you selects: Management -> SQL Server Agent -> Jobs, create a new job, in the second tab select :

Type = Transact-SQL Script
DataBase = the database of the Stored Procedure
Command = You Stored Procedure

In the next tab "schedule" select the option "Recurring" and press button "Change"
and it programs your schedule.

Note: The SQL Server Agent has to be working.

No comments:

Post a Comment