开发者

Job To Send Email Every Evening in SQL Server

I have figured out the sql statement to email information that I specify. What I cannot figure out is how to create a sql server job that will开发者_Python百科 send me this email at specific periods of time. Does anyone know how to do this?


In Management Studio:

  1. Open Object Explorer (F8).
  2. Connect to your server.
  3. Expand the server node.
  4. Expand SQL Server Agent.
  5. Right-click jobs, select New Job...
  6. Give the job a unique name.
  7. Go to the Steps tab.
  8. Click New...
  9. Give the step a name and enter your command (e.g. EXEC someproc;).
  10. Click OK.
  11. Go to the Schedules tab.
  12. Click New...
  13. Give the schedule a name (e.g. Nightly).
  14. Change "Frequency" to Occurs: "daily".
  15. Change "Daily Frequency" to Occurs once at: [desired time].
  16. Click OK.
  17. Click OK.

To make sure it works, you can right-click the Jobs node, select Refresh, then right-click the job you just created, and select "Start Job at Step..."


Create a new SQL Server job. Add a step to execute the SQL statement. Add a new schedule to run as you need. If you right-click the jobs in Management Studio, a rather self-explanatory GUI/wizard will open to create a new job.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜