The so-called SQL Server job is to execute the specified script at the required time, and if you need to execute a stored procedure or 3200-character SQL statement at regular intervals in SQL Server , you can use management -sql Server Agent -jobs to implement.
(1) Open SQL Server, you can see the job in the SQL Server Agent
(2) We create a new job, I use my own test database is a revenue-earning job, so named Bankincome
(3) Steps to set up a job
Specify the database, set up batch statements, and, of course, click Analyze for review
(4) Set up scheduled execution, equivalent to the cycle execution interval in Windows services
(5) Start the job, I this is a calculation of the income of the job, the specific details are not disclosed. Look at the effect, the start is successful.
NOTE: TheSQL Server Agent service must function correctly, and the NT login user who started it will be consistent with the NT login user who started the SQL Server database;
Writing this article has been thinking about database jobs and Windows services using scenarios for data manipulation and the pros and cons. Want to know more in-depth students to give advice.
SQL Server jobs-Take your experience