SQL Server 2008 development of timed jobs

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

--sql Server 2008 Timing Job Development

--1. Open SQL Server Management Studio and select SQL Server Agent in the Object Explorer list;

--2. Right-click SQL Server Agent, select Start (S), or, if started, omit this step;--3. Expand the SQL Server Agent list, right-click jobs and new Job; --3.1 on the General tab:

-Enter the job name, such as "My job";

--3.2 in the Steps tab: --3.2.1 Click "New", enter "step name", such as "Step 1", type default T-SQL script, optionally SSIS package, etc.;

--3.2.2 Select the database to be processed in the database column, enter the SQL code to execute in the blank edit bar on the right side of the command.

EXEC P_name

-for example, executing a p_name stored procedure

--You can also click "Open" under the command to open the. SQL script;

--3.2.3 input Run script, it is recommended to click "Analysis" to ensure that the script syntax is correct, and then click the "OK" button below;

--3.3 in the Schedule tab:

--3.3.1 Click "New", enter "plan name", such as "Plan 1", the plan type default is "Repeat", you can also choose to execute once, etc.;

--3.3.2 "Daily", "weekly" or "monthly" at "Frequency" and "execution", taking "daily" as an example, the interval time input interval is executed once a few days,

--The following can also be selected to perform once a day or a certain interval of time to repeat

--3.3.3 Select the start date and due date for the schedule to start in duration, and then tap the OK button; --Note to set the service to start automatically or the job will not run after restarting the server.

--How to start the Proxy service: --Start and run--enter services.msc--> find the SQL Server Agent service and double-click the Startup type to select Auto-ok

--At this point, the timed job has been created.

SQL Server 2008 development of timed jobs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.