This article is a mirror article of machine translation, please click here to jump to the original article.

View: 7948|Reply: 1

SQL Server schedules tasks – jobs

[Copy link]
Posted on 4/13/2019 4:00:26 PM | | | |
This post was last edited by Kongcida on 2019-4-13 17:02


preface

In some scenarios, we need to use timed execution tasks. For example: regular statistics, regular backup of databases, regular sending of emails, regular cleaning of data, etc. Record the database job execution today.

environment

>SQL Server2008


tools

>Microsoft SQL Server Management Studio




Text

step1: Open the SQL Server management tool and connect to the local database.




step2: Right-click the job - > Create a new job. The New Job dialog box pops up.






step3: in the New Job dialog box. In the General tab, fill in the name, owner, category, and description of the job.




step4: In the Steps tab, click New. In the pop-up New Job Step dialog box, fill in the Step Name, Database, and Command -> OK.





As shown in the picture above, in the command here, I filled in the "exec  proc_ExpenseSummary”。 Refers to the execution of a stored procedure called "proc_ExpenseSummary". You can also fill in the SQl statement you want to execute here. For example, "Update...............”。 In this step, the tasks to be performed are already created. In the next step, start to create the frequency and time of the planned execution of this task


step5: In the Plans tab, create New. In the pop-up New Job Plan dialog box, set the Name, Frequency, and Execution Time -> OK.






step6Finally, in the New Job dialog box -- > OK. That's it.





Epilogue

Database job planning is still very common. The next article will document Creating a Windows Task Scheduler.










Score

Number of participants1MB+1 contribute+1 Collapse reason
Csmiao + 1 + 1 Oh no!

See all ratings





Previous:Customizing the ModelBinder method for compatible form strings
Next:Visual Studio 2019 Enterprise Edition offline installation tutorial
Posted on 4/23/2019 8:29:28 AM |
Support sharing, learn! - Tue Apr 23 2019 08:29:28 GMT+0800 (China Standard Time)
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com