--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