Plsql Setting Up Oracle Jobs

Source: Internet
Author: User

--1. Learning job in Plsql--Learning Job--Build Tables CREATE TABLE Test_job (para_date date);    Commit  INSERT into test_job values (sysdate);  Commit Select* fromTest_job; --Create a storage process create or replace procedure Test_jobproce asbegin INSERT INTO test_job values (sysdate);   End Test_jobproce; --Create Job--declare test_job_really number is executed by default after the job is established; Begin Dbms_job.submit (test_job_really,'Test_jobproce;', Sysdate,'sysdate+1/1440');  Commit    End ---Stop Job 25 is an established job test_job_really begin Dbms_job.broken ( -,true);  Commit  End --Start Job begin Dbms_job.run ( -);  Commit   End --Delete Job begin Dbms_job.remove ( -);  Commit   End --View Execution ResultsSelect* fromtest_job ORDER BY test_job.para_date Desc; --View JobSelect* fromSys.user_jobs--use the following SQL query to see if the job is still running, provided the job execution time cannot be too shortSelect* fromdba_jobs_running--In addition to the submit parameter, the remaining parameters are:--Run Job Dbms_job.run (v_job); --stop a job, inside parameter true also but False,next_date (stop at a certain moment) also is sysdate (stop immediately). Dbms_job.broke (V_job,true, next_date); --Delete a job dbms_job.remove (v_job); Dbms_job.what (V_job,'Sp_fact_charge_code;'); --Modify a job name to modify the next run time Dbms_job.next_date (v_job,sysdate);

Plsql Setting Up Oracle Jobs

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.