SQL Server 2000 regular execution of SQL statements

Source: Internet
Author: User

If the data table you maintain depends on the data tables of other modules and supports data of other modules, and these tables are updated in real time, therefore, you cannot update a data table by calling SQL statements on the page. You can only update the data table regularly and automatically. I don't know whether stored procedures can be implemented, but SQL Server 2000 Job Scheduling does have this function. How can I make some SQL statements run regularly and perform the following operations in sequence:

 

Enterprise Manager
  -- Manage
  -- SQLServer proxy
  -- Right-click a job
  -- Create a job
  -- Enter the job name in "general"
  -- "Step"
  -- New
  -- Enter the step name in "Step name"
  -- Select "Transact-SQL" in "type"Script (tsql )"  
  -- "Database": select the database for Command Execution
  -- Enter the statement to be executed in "command:
            
    Insert/Delete...
 
  -- OK
  -- "Scheduling" item
  -- Create Scheduling
  -- Enter the scheduling name in "name"
  -- Select your job execution schedule in "scheduling type"
  -- If you select "recurring"
  -- Click "change" to set your schedule

(We can see that the highest frequency is to set the occurrence cycle to 1 minute in the "daily frequency". That is to say, this method can ensure the real-time performance of 1 minute, for applications with low real-time requirements, this is enough)  

Finally, the SQLStart the agent service and set it to automatic start. Otherwise, your job will not be executed. Set the SQL Agent service automatic start method: My computer -- control panel -- Management Tools -- service -- Right-clickSQLServerAgent -- properties -- start type -- select "auto start" -- OK.

After the settings are complete, you can see the name of the new job in the "job" in the enterprise manager. If the "enable" Status of the job is "no ", click "right-click"-"Start Job" on the job line.

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.