Use plspl to create an orcale job

Source: Internet
Author: User

1. Due to permission issues, the first step should first log on with the sys account, path: tool-> DBMS debugging program-> job, create a job, as shown in the window

2. Enter the corresponding content in sequence. name indicates the job name. Note that you must add the username prefix, for example, oracle_ocm.cs. If the default prefix is sys, the job permission is still sys.

3. Enabled: Select PL/SQL block (for example) as the default type, and enter the SQL statement to be executed in the action field. Note that the statement must end with a good ending. You can leave the commit statement empty.

4. Schedule: set the time period of job execution and a series of time-related data.

By is the specified time. When the data is specified, the execution time is

5. Select default_job_class as the job class.

6. You can also use the corresponding SQL statement to write your homework, as shown below:

begin  sys.dbms_scheduler.create_job(job_name            => ‘ORACLE_OCM.CS‘,                                job_type            => ‘PLSQL_BLOCK‘,                                job_action          => ‘‘,                                start_date          => to_date(‘07-08-2014 00:00:00‘, ‘dd-mm-yyyy hh24:mi:ss‘),                                repeat_interval     => ‘Freq=Monthly;Interval=1‘,                                end_date            => to_date(null),                                job_class           => ‘DEFAULT_JOB_CLASS‘,                                enabled             => true,                                auto_drop           => false,                                comments            => ‘‘);end;

After using sys, you can use oracle_ocm to log on and modify the job.

 

 

I hope this article will help you.

 

 

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.