Let your SQLSERVER automatically an action – “operations and scheduling”

Recently I produce a WEB system for a client but encountered a problem.The customers want a table of data automatic return to the initial state in the daily time 00:00:01.And then re-use of the WEB program operation it.After much deliberation, the WEB program can not be used to complete the object.of course, we can consider another way.I could consider complete it in the first time to run the WEB program.So, I used SQL operations, which bring their own mechanism.To add a job first of all to SA privileges or windows login permissions, and open the sql server agent services.Specific steps are as follows ” 1, open the sql server service manager, select the sql server agent, and “When the OS run-time to start service” choices.And then the Start button to start the service.Sometimes, there will be an error.You can try the following solution:Control Panel – Administrative Tools – SQLSERVERAGENT – Properties – Login – Select “Local System Account” (or fill in the correct account information) – confirmed.2, add the job:Enterprise Manager – Management – SQL SERVER Agent – Job – Right – New job (according to the prompts) – Step – New (according to the prompts) – Dispatch – New scheduling, If the need to set up the job a daily basis, then choose “recurring”, and click the Change for the implementation of scheduling time to set.Only introduced in this Q.”Enterprise Manager” in the stupid action, if want to generate the script is actually very simple.Just according to methods described in this article, after the establishment of operations, re-use Enterprise Manager to generate SQL script that can be.Specific steps are:Enterprise Manager – Management – SQL SERVER Agent – Job – select job – right click – all of the tasks – generate SQL scripts

Leave a Reply