SQL Server timed job creation

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

--- 2000 Enterprise Manager -- manage -- SQL Server proxy -- Right-click a job -- create a job -- enter the job name in "general" -- "Step" -- New -- "Step name "name -- select "Transact-SQL script (tsql) in" type) "--" Database "select the database for command execution --" command "and enter the statement to be executed: -- OK -- "scheduling" item -- create scheduling -- enter the scheduling name in "name" -- select your job execution schedule in "scheduling type" -- if you select "recurring" -- point" change "to set your schedule to one day and then start the SQL Agent service, and set it to automatic start. Otherwise, your job will not be executed as follows: my computer -- control panel -- Administrative Tools -- service -- Right-click SQLServerAgent -- properties -- start type -- select "auto start" -- OK. export Author: htl258 (Tony) -- Date: 2010-04-29 19:07:45 -- version: Microsoft SQL Server 2008 (RTM)-10.0.1600.22 (Intel x86) -- Jul 9 2008 14:43:38 -- Copyright (c) 1988-2008 Microsoft Corporation -- Developer Edition on Windows NT 5.1 <x86> (build 2600: Service Pack 3) -- Blog: http://blog.csdn.net/htl258 -- Subject: SQL Server 2008 timing job formulation (sql2005 refer to this method) ------------------------------------------------------------------------ SQL Server 2008 timing job formulation-1. open SQL Server Management studio and select SQL Server proxy in the object Resource Manager List. -- 2. right-click SQL Server proxy and select start (s). If it has been started, skip this step. -- 3. expand the SQL Server proxy list and right-click job> New job. -- 3.1 on the General tab, enter the job name, for example, my job "; -- 3.2 in the [STEP] tab: -- 3.2.1 click [new], enter [step name], such as "Step 1", type default T-SQL script, you can also choose SSIS package; -- 3.2.2 select the database for job processing in the database column, and enter the SQL statement to be executed in the blank edit column on the right of the command.Code , Exec p_name -- for example: execute a p_name stored procedure -- you can also click open under the command to open. SQL script; -- 3.2.3 after entering the run script, we recommend that you click [Analysis] to ensure that the script syntax is correct, and then click the [OK] button below; -- 3.3 in the [plan] tab: -- 3.3.1 click New and enter the plan name, for example, "Plan 1". The default plan type is "repeated execution". You can also choose to execute the plan once; -- 3.3.2 select "Daily", "Weekly", or "Monthly" in "Frequency"> "execution". Take "Daily" as an example. Run the task once every several days, -- You can also select one-time execution every day or repeated execution at intervals -- 3.3.3 select the start date and end date of the execution plan in duration ], click OK. -- set the service to auto start. Otherwise, the job will not run after the server is restarted. -- Start proxy service: -- start --> Run --> enter services. MSC --> Find the SQL Server proxy service and double-click --> Start type and select automatic --> OK -- now, the scheduled job has been created.

Related Article

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.