doc-exports/docs/dws/dev/dws_04_0555.html
Lu, Huayi e6fa411af0 DWS DEV 830.201 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-05-16 07:24:04 +00:00

572 lines
70 KiB
HTML

<a name="EN-US_TOPIC_0000001233563205"></a><a name="EN-US_TOPIC_0000001233563205"></a>
<h1 class="topictitle1">DBMS_JOB</h1>
<div id="body1494377960801"><div class="section" id="EN-US_TOPIC_0000001233563205__s62d2d12234d74377ba4eff5cde96cebf"><h4 class="sectiontitle">Related Interfaces</h4><p id="EN-US_TOPIC_0000001233563205__a9f597f79261b4d7aaeb94d443bf79de3"><a href="#EN-US_TOPIC_0000001233563205__tfc5e1df8936049a4a4bd468c501148ff">Table 1</a> lists all interfaces supported by the <strong id="EN-US_TOPIC_0000001233563205__en-us_topic_0027042974_b62416104165056">DBMS_JOB</strong> package.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001233563205__tfc5e1df8936049a4a4bd468c501148ff"></a><a name="tfc5e1df8936049a4a4bd468c501148ff"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233563205__tfc5e1df8936049a4a4bd468c501148ff" frame="border" border="1" rules="all"><caption><b>Table 1 </b>DBMS_JOB</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233563205__r1021baaac66741fd8becba4b370f5607"><th align="left" class="cellrowborder" valign="top" width="27.35%" id="mcps1.3.1.3.2.3.1.1"><p id="EN-US_TOPIC_0000001233563205__a921c81508b734666b50998fed97ed9ce">Interface</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="72.65%" id="mcps1.3.1.3.2.3.1.2"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p698814148179">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001233563205__rbffa0f84875a440b957886503ce1bdbb"><td class="cellrowborder" valign="top" width="27.35%" headers="mcps1.3.1.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001233563205__ace3ab8a4d5a3444abac4bbeddc7ce5aa"><a href="#EN-US_TOPIC_0000001233563205__l85682661a1bd46af81ba9226235eef0d">DBMS_JOB.SUBMIT</a></p>
</td>
<td class="cellrowborder" valign="top" width="72.65%" headers="mcps1.3.1.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p798881471715">Submits a job to the job queue. The job number is automatically generated by the system.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__rc4bbdda4b0a446078f74659d3d144557"><td class="cellrowborder" valign="top" width="27.35%" headers="mcps1.3.1.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p298871410176"><a href="#EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_li49938144177">DBMS_JOB.ISUBMIT</a></p>
</td>
<td class="cellrowborder" valign="top" width="72.65%" headers="mcps1.3.1.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001233563205__aef876d09186742e497f92bcde81123ec">Submits a job to the job queue. The job number is specified by the user.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__r07ee1db5b1a047f69ee0ef1245949769"><td class="cellrowborder" valign="top" width="27.35%" headers="mcps1.3.1.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001233563205__afefd8b25dcfc466fa927b48de3744d72"><a href="#EN-US_TOPIC_0000001233563205__l9193c99447214da584e9154fe77012d3">DBMS_JOB.REMOVE</a></p>
</td>
<td class="cellrowborder" valign="top" width="72.65%" headers="mcps1.3.1.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001233563205__acbdb37b3f97a403e9953316531ac2ac1">Removes a job from the job queue by job number.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__r2e1f09c3256245f2aa4fed455cff31e7"><td class="cellrowborder" valign="top" width="27.35%" headers="mcps1.3.1.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p29897145171"><a href="#EN-US_TOPIC_0000001233563205__le217bb90067e4bd5ae3182f23c3ce60d">DBMS_JOB.BROKEN</a></p>
</td>
<td class="cellrowborder" valign="top" width="72.65%" headers="mcps1.3.1.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001233563205__a08e15a61a4284c57ade427db19009ac5">Disables or enables job execution.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__rad2e599457b6480bbb6bf5f0269ab461"><td class="cellrowborder" valign="top" width="27.35%" headers="mcps1.3.1.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001233563205__a13a9ab770fbf47049cb3aafa8fe463f0"><a href="#EN-US_TOPIC_0000001233563205__l408aea6e0872490ea15e558542cf46d2">DBMS_JOB.CHANGE</a></p>
</td>
<td class="cellrowborder" valign="top" width="72.65%" headers="mcps1.3.1.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001233563205__af8bbda2925954a88bf1f2fd0f133208a">Modifies user-definable attributes of a job, including the job description, next execution time, and execution interval.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__r206b028870784b1fa70ff685690be1e1"><td class="cellrowborder" valign="top" width="27.35%" headers="mcps1.3.1.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001233563205__a486019f3375541fca44bbb676c29c726"><a href="#EN-US_TOPIC_0000001233563205__lcdae9678ae524e92b48962c7caf0d531">DBMS_JOB.WHAT</a></p>
</td>
<td class="cellrowborder" valign="top" width="72.65%" headers="mcps1.3.1.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p698971411716">Modifies the job description of a job.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__rb9def7a9189d41fdabdf2659ae1230a3"><td class="cellrowborder" valign="top" width="27.35%" headers="mcps1.3.1.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001233563205__a19dcfd872ec142f99b93a0c37d263777"><a href="#EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_li5112157173">DBMS_JOB.NEXT_DATE</a></p>
</td>
<td class="cellrowborder" valign="top" width="72.65%" headers="mcps1.3.1.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001233563205__aec20a24827b24b1896c575171df5438a">Modifies the next execution time of a job.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__r4e60c1bcef304a8ab28da6a87e9ecc8d"><td class="cellrowborder" valign="top" width="27.35%" headers="mcps1.3.1.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001233563205__a80cdb4e7c4cc4fb884f3330a21ee1c72"><a href="#EN-US_TOPIC_0000001233563205__l9403a7623efd44968cda762baf5b3819">DBMS_JOB.INTERVAL</a></p>
</td>
<td class="cellrowborder" valign="top" width="72.65%" headers="mcps1.3.1.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001233563205__a01e8011069d348709d026e9222d14d25">Modifies the execution interval of a job.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__row119096115617"><td class="cellrowborder" valign="top" width="27.35%" headers="mcps1.3.1.3.2.3.1.1 "><p id="EN-US_TOPIC_0000001233563205__p161902068565"><a href="#EN-US_TOPIC_0000001233563205__li10457452125617">DBMS_JOB.CHANGE_OWNER</a></p>
</td>
<td class="cellrowborder" valign="top" width="72.65%" headers="mcps1.3.1.3.2.3.1.2 "><p id="EN-US_TOPIC_0000001233563205__p51904615617">Modifies the owner of a job.</p>
</td>
</tr>
</tbody>
</table>
</div>
<ul id="EN-US_TOPIC_0000001233563205__u607fc384d9fe4fb7a9b7e37038632fc5"><li id="EN-US_TOPIC_0000001233563205__l85682661a1bd46af81ba9226235eef0d"><a name="EN-US_TOPIC_0000001233563205__l85682661a1bd46af81ba9226235eef0d"></a><a name="l85682661a1bd46af81ba9226235eef0d"></a>DBMS_JOB.SUBMIT<p id="EN-US_TOPIC_0000001233563205__a41d04ba14e9343cb88f90260adb9ebb0"><a name="EN-US_TOPIC_0000001233563205__l85682661a1bd46af81ba9226235eef0d"></a><a name="l85682661a1bd46af81ba9226235eef0d"></a>The stored procedure <strong id="EN-US_TOPIC_0000001233563205__b84235270693213">SUBMIT</strong> submits a job provided by the system.</p>
<p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p699021415175">A prototype of the DBMS_JOB.SUBMIT function is as follows:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__sb8d36799192d489ca54634c6480562d3"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">DMBS_JOB</span><span class="p">.</span><span class="n">SUBMIT</span><span class="p">(</span>
<span class="n">what</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">TEXT</span><span class="p">,</span>
<span class="n">next_date</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="k">TIMESTAMP</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="n">sysdate</span><span class="p">,</span>
<span class="n">job_interval</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">TEXT</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="s1">'null'</span><span class="p">,</span>
<span class="n">job</span><span class="w"> </span><span class="k">OUT</span><span class="w"> </span><span class="nb">INTEGER</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
<div class="note" id="EN-US_TOPIC_0000001233563205__nc6eddb299e6044d28ab2bb0409be8258"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001233563205__af57463010e6742cfb09b3d993dbbdd50">When a job is created (using DBMS_JOB), the system binds the current database and the username to the job by default. This function can be invoked by using <strong id="EN-US_TOPIC_0000001233563205__b84235270694122">call</strong> or <strong id="EN-US_TOPIC_0000001233563205__b84235270694126">select</strong>. If you invoke this function by using <strong id="EN-US_TOPIC_0000001233563205__b84235270694139">select</strong>, there is no need to specify output parameters. To invoke this function within a stored procedure, use <strong id="EN-US_TOPIC_0000001233563205__b84235270694248">perform</strong>.</p>
</div></div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233563205__tde9b3e49552d4cca9516e9b260bffb9b" frame="border" border="1" rules="all"><caption><b>Table 2 </b>DBMS_JOB.SUBMIT interface parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233563205__r476842259e384e689f08f379593f3da0"><th align="left" class="cellrowborder" valign="top" width="14.050000000000004%" id="mcps1.3.1.4.1.5.2.6.1.1"><p id="EN-US_TOPIC_0000001233563205__a8cf87edb47864314a839bb1102434a19">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="8.480000000000002%" id="mcps1.3.1.4.1.5.2.6.1.2"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p685019219183">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.790000000000003%" id="mcps1.3.1.4.1.5.2.6.1.3"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p26135218181">Input/Output Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.71%" id="mcps1.3.1.4.1.5.2.6.1.4"><p id="EN-US_TOPIC_0000001233563205__a9f732051c48143a0a2e8fe62135b83c9">Can Be Empty</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="52.970000000000006%" id="mcps1.3.1.4.1.5.2.6.1.5"><p id="EN-US_TOPIC_0000001233563205__aeb23914785f248c3bf1ec6b9a63c8744">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001233563205__r511d7b4f39394c85b04399669b858613"><td class="cellrowborder" valign="top" width="14.050000000000004%" headers="mcps1.3.1.4.1.5.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__a7ca9e21fb8514e9eb7859cc1e50fcf48">what</p>
</td>
<td class="cellrowborder" valign="top" width="8.480000000000002%" headers="mcps1.3.1.4.1.5.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__ad412fc5e16a6471bb55ca16af6dcf7cb">text</p>
</td>
<td class="cellrowborder" valign="top" width="13.790000000000003%" headers="mcps1.3.1.4.1.5.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p957081619192">IN</p>
</td>
<td class="cellrowborder" valign="top" width="10.71%" headers="mcps1.3.1.4.1.5.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__ad8552bbb5d8a4f94934cff523d2142d2">No</p>
</td>
<td class="cellrowborder" valign="top" width="52.970000000000006%" headers="mcps1.3.1.4.1.5.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__ae86b933ffc584ea8ad05ceaefe44da6c">SQL statement to be executed. One or multiple DMLs, anonymous blocks, and SQL statements that invoke stored procedures, or all three combined are supported.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__ra096c2cc5d2842c6a733f3665696c27c"><td class="cellrowborder" valign="top" width="14.050000000000004%" headers="mcps1.3.1.4.1.5.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__a9d5589130e38421f8e4f55ce28e47289">next_date</p>
</td>
<td class="cellrowborder" valign="top" width="8.480000000000002%" headers="mcps1.3.1.4.1.5.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__af760f57fd9fd4baaa6d701904aea195c">timestamp</p>
</td>
<td class="cellrowborder" valign="top" width="13.790000000000003%" headers="mcps1.3.1.4.1.5.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__a7d67bc2944bd4881848abb5595aea7f2">IN</p>
</td>
<td class="cellrowborder" valign="top" width="10.71%" headers="mcps1.3.1.4.1.5.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__a2aba918e131846f580aafa499f28559d">No</p>
</td>
<td class="cellrowborder" valign="top" width="52.970000000000006%" headers="mcps1.3.1.4.1.5.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__a432c933809f94f6a80b7e7e905ca676a">Specifies the next time the job will be executed. The default value is the current system time (sysdate). If the specified time has past, the job is executed at the time it is submitted.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__r0735175758164cd3b832701c605753a0"><td class="cellrowborder" valign="top" width="14.050000000000004%" headers="mcps1.3.1.4.1.5.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p799141415179">interval</p>
</td>
<td class="cellrowborder" valign="top" width="8.480000000000002%" headers="mcps1.3.1.4.1.5.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p157081610197">text</p>
</td>
<td class="cellrowborder" valign="top" width="13.790000000000003%" headers="mcps1.3.1.4.1.5.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__adc0766fd1e064a9fafd244f1b746f1e2">IN</p>
</td>
<td class="cellrowborder" valign="top" width="10.71%" headers="mcps1.3.1.4.1.5.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p786686410718">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="52.970000000000006%" headers="mcps1.3.1.4.1.5.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__af176be401d904fff893356e1781d5056">Calculates the next time to execute the job. It can be an interval expression, or sysdate followed by a numeric value, for example, <strong id="EN-US_TOPIC_0000001233563205__b84235270695417">sysdate+1.0/24</strong>. If this parameter is left blank or set to <strong id="EN-US_TOPIC_0000001233563205__b8423527069552">null</strong>, the job will be executed only once, and the job status will change to <strong id="EN-US_TOPIC_0000001233563205__b84235270695549">'d'</strong> afterward.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__r54ada03c3ed04636a424cbb51ab33114"><td class="cellrowborder" valign="top" width="14.050000000000004%" headers="mcps1.3.1.4.1.5.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__ab8314f34fab84e4aac7e907d61611736">job</p>
</td>
<td class="cellrowborder" valign="top" width="8.480000000000002%" headers="mcps1.3.1.4.1.5.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__a9a87002098434ca7924971f936911f72">integer</p>
</td>
<td class="cellrowborder" valign="top" width="13.790000000000003%" headers="mcps1.3.1.4.1.5.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__a64c16ef02b67456192374214cf44cb19">OUT</p>
</td>
<td class="cellrowborder" valign="top" width="10.71%" headers="mcps1.3.1.4.1.5.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__a9db96331c4be4170a08d69e3bdf351b3">No</p>
</td>
<td class="cellrowborder" valign="top" width="52.970000000000006%" headers="mcps1.3.1.4.1.5.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__a67a60e6236bd42f083f38da8fa0fce40">Specifies the job number. The value ranges from 1 to 32767. When <strong id="EN-US_TOPIC_0000001233563205__b8423527069589">dbms.submit</strong> is invoked using <strong id="EN-US_TOPIC_0000001233563205__b84235270695827">select</strong>, this parameter can be skipped.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="EN-US_TOPIC_0000001233563205__a1e056896f3ea4611bc32496c459692fb">For example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__s1b3f20021b0e4b6bb36e2ceb0d8158c5"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">select</span><span class="w"> </span><span class="n">DBMS_JOB</span><span class="p">.</span><span class="n">SUBMIT</span><span class="p">(</span><span class="s1">'call pro_xxx();'</span><span class="p">,</span><span class="w"> </span><span class="n">to_date</span><span class="p">(</span><span class="s1">'20180101'</span><span class="p">,</span><span class="s1">'yyyymmdd'</span><span class="p">),</span><span class="s1">'sysdate+1'</span><span class="p">);</span>
<span class="k">select</span><span class="w"> </span><span class="n">DBMS_JOB</span><span class="p">.</span><span class="n">SUBMIT</span><span class="p">(</span><span class="s1">'call pro_xxx();'</span><span class="p">,</span><span class="w"> </span><span class="n">to_date</span><span class="p">(</span><span class="s1">'20180101'</span><span class="p">,</span><span class="s1">'yyyymmdd'</span><span class="p">),</span><span class="s1">'sysdate+1.0/24'</span><span class="p">);</span>
<span class="k">CALL</span><span class="w"> </span><span class="n">DBMS_JOB</span><span class="p">.</span><span class="n">SUBMIT</span><span class="p">(</span><span class="s1">'INSERT INTO T_JOB VALUES(1); call pro_1(); call pro_2();'</span><span class="p">,</span><span class="w"> </span><span class="n">add_months</span><span class="p">(</span><span class="n">to_date</span><span class="p">(</span><span class="s1">'201701'</span><span class="p">,</span><span class="s1">'yyyymm'</span><span class="p">),</span><span class="mi">1</span><span class="p">),</span><span class="w"> </span><span class="s1">'date_trunc(''day'',SYSDATE) + 1 +(8*60+30.0)/(24*60)'</span><span class="w"> </span><span class="p">,:</span><span class="n">jobid</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
<ul id="EN-US_TOPIC_0000001233563205__u7f5508645609437f9c52e716cb5ce102"><li id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_li49938144177"><a name="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_li49938144177"></a><a name="en-us_topic_0059779362_li49938144177"></a>DBMS_JOB.ISUBMIT<p id="EN-US_TOPIC_0000001233563205__ae3bbd0f27d2f4c0892286a03defb7c11"><a name="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_li49938144177"></a><a name="en-us_topic_0059779362_li49938144177"></a><strong id="EN-US_TOPIC_0000001233563205__b84235270610410">ISUBMIT</strong> has the same syntax function as <strong id="EN-US_TOPIC_0000001233563205__b84235270610415">SUBMIT</strong>, but the first parameter of <strong id="EN-US_TOPIC_0000001233563205__b84235270610424">ISUBMIT</strong> is an input parameter, that is, a specified job number. In contrast, that last parameter of <strong id="EN-US_TOPIC_0000001233563205__b84235270610447">SUBMIT</strong> is an output parameter, indicating the job number automatically generated by the system.</p>
<p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p699361418171">For example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__sb838484374e24a50b07f086578820a44"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CALL</span><span class="w"> </span><span class="n">dbms_job</span><span class="p">.</span><span class="n">isubmit</span><span class="p">(</span><span class="mi">101</span><span class="p">,</span><span class="w"> </span><span class="s1">'insert_msg_statistic1;'</span><span class="p">,</span><span class="w"> </span><span class="n">sysdate</span><span class="p">,</span><span class="w"> </span><span class="s1">'sysdate+3.0/24'</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001233563205__l9193c99447214da584e9154fe77012d3"><a name="EN-US_TOPIC_0000001233563205__l9193c99447214da584e9154fe77012d3"></a><a name="l9193c99447214da584e9154fe77012d3"></a>DBMS_JOB.REMOVE<p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p14921268203"><a name="EN-US_TOPIC_0000001233563205__l9193c99447214da584e9154fe77012d3"></a><a name="l9193c99447214da584e9154fe77012d3"></a>The stored procedure <strong id="EN-US_TOPIC_0000001233563205__b84235270610624">REMOVE</strong> deletes a specified job.</p>
<p id="EN-US_TOPIC_0000001233563205__ac8694b31c0d4419b8987f21b978bef2c">A prototype of the DBMS_JOB.REMOVE function is as follows:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__s865d1876e94f488f8eb82764ab3d7a3e"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">REMOVE</span><span class="p">(</span><span class="n">job</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">INTEGER</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233563205__t683b779427c143148b7ab9e9ba526bf8" frame="border" border="1" rules="all"><caption><b>Table 3 </b>DBMS_JOB.REMOVE interface parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233563205__r6809dd1a4c03459fb90e4cb2b6da4999"><th align="left" class="cellrowborder" valign="top" width="10.12%" id="mcps1.3.1.5.2.4.2.6.1.1"><p id="EN-US_TOPIC_0000001233563205__aa4dbce694426439d9d605174ef748142">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.1.5.2.4.2.6.1.2"><p id="EN-US_TOPIC_0000001233563205__a88b8ac5fd5c04715974e42bf41757d58">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.2%" id="mcps1.3.1.5.2.4.2.6.1.3"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p740218106212">Input/Output Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.36%" id="mcps1.3.1.5.2.4.2.6.1.4"><p id="EN-US_TOPIC_0000001233563205__af595042ea56c4ab39659e926568a2f53">Can Be Empty</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45.32%" id="mcps1.3.1.5.2.4.2.6.1.5"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p599401410176">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001233563205__r8d0a15b7bd36411ebf48b89b02ac1e6f"><td class="cellrowborder" valign="top" width="10.12%" headers="mcps1.3.1.5.2.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__ae4a586f9bb86463b811c5407d5f02c33">job</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.1.5.2.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p163816101226">integer</p>
</td>
<td class="cellrowborder" valign="top" width="15.2%" headers="mcps1.3.1.5.2.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p153841020221">IN</p>
</td>
<td class="cellrowborder" valign="top" width="19.36%" headers="mcps1.3.1.5.2.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__a86e50d6437704fdf81ad9220da0596f3">No</p>
</td>
<td class="cellrowborder" valign="top" width="45.32%" headers="mcps1.3.1.5.2.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__ad7548d6365c043c993a11e8a612ac8ed">Specifies the job number.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p399431417178">For example:</p>
<pre class="screen" id="EN-US_TOPIC_0000001233563205__s4a9ce7f2ed6f4e528f90a28010217ccc">CALL dbms_job.remove(101);</pre>
</li><li id="EN-US_TOPIC_0000001233563205__le217bb90067e4bd5ae3182f23c3ce60d"><a name="EN-US_TOPIC_0000001233563205__le217bb90067e4bd5ae3182f23c3ce60d"></a><a name="le217bb90067e4bd5ae3182f23c3ce60d"></a>DBMS_JOB.BROKEN<p id="EN-US_TOPIC_0000001233563205__aeb855ea59e924da8801c8c569e1828a6"><a name="EN-US_TOPIC_0000001233563205__le217bb90067e4bd5ae3182f23c3ce60d"></a><a name="le217bb90067e4bd5ae3182f23c3ce60d"></a>The stored procedure <strong id="EN-US_TOPIC_0000001233563205__b84235270610102">BROKEN</strong> sets the broken flag of a job.</p>
<p id="EN-US_TOPIC_0000001233563205__ae97017ac59bf4f61a5dd289c9874bc80">A prototype of the DBMS_JOB.BROKEN function is as follows:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__s1cc36fb7a1c04bd595200b5e214dc5a0"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">DMBS_JOB</span><span class="p">.</span><span class="n">BROKEN</span><span class="p">(</span>
<span class="n">job</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">INTEGER</span><span class="p">,</span>
<span class="n">broken</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">BOOLEAN</span><span class="p">,</span>
<span class="n">next_date</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="k">TIMESTAMP</span><span class="w"> </span><span class="k">DEFAULT</span><span class="w"> </span><span class="n">sysdate</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233563205__t575d27db616a4446ba385b4f6226214d" frame="border" border="1" rules="all"><caption><b>Table 4 </b>DBMS_JOB.BROKEN interface parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233563205__re13795582ab342438b87d319b04994f6"><th align="left" class="cellrowborder" valign="top" width="12.97%" id="mcps1.3.1.5.3.4.2.6.1.1"><p id="EN-US_TOPIC_0000001233563205__a26c220b859c4450cbf7db71b52062061">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.19%" id="mcps1.3.1.5.3.4.2.6.1.2"><p id="EN-US_TOPIC_0000001233563205__a766026af3e4c4f0ba840c17b24cabd6c">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11.76%" id="mcps1.3.1.5.3.4.2.6.1.3"><p id="EN-US_TOPIC_0000001233563205__aa8628fbb39ae4ea2834583ab0b653b26">Input/Output Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.3.1.5.3.4.2.6.1.4"><p id="EN-US_TOPIC_0000001233563205__a5cf4e423140c404fafb823aec14fd4fe">Can Be Empty</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.559999999999995%" id="mcps1.3.1.5.3.4.2.6.1.5"><p id="EN-US_TOPIC_0000001233563205__a63f4b1dccc5842d399e370430052e022">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001233563205__r9d7b4139ff3c4903a75d06bebaf8976c"><td class="cellrowborder" valign="top" width="12.97%" headers="mcps1.3.1.5.3.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__a8ebd2c7b1bc14c38b1db315182dbbdf0">job</p>
</td>
<td class="cellrowborder" valign="top" width="14.19%" headers="mcps1.3.1.5.3.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__a0cc87a624e2f4d3a91e0eac7a0da4ec5">integer</p>
</td>
<td class="cellrowborder" valign="top" width="11.76%" headers="mcps1.3.1.5.3.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__a3d10f30c08884adc8e2269a43cc93209">IN</p>
</td>
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.1.5.3.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__ab0cc911890f34b0fb55ef20697acb788">No</p>
</td>
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.1.5.3.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p299514147178">Specifies the job number.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__r3742c9e8a7784f7b8aa8772beb2b096c"><td class="cellrowborder" valign="top" width="12.97%" headers="mcps1.3.1.5.3.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__ab86f04e4cccc4fad9ad28173834d1a0e">broken</p>
</td>
<td class="cellrowborder" valign="top" width="14.19%" headers="mcps1.3.1.5.3.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__af9add48d0b964d9189ca03221102668f"><span id="EN-US_TOPIC_0000001233563205__text9717182172715">boolean</span></p>
</td>
<td class="cellrowborder" valign="top" width="11.76%" headers="mcps1.3.1.5.3.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__a54921ea496e2441086da024edf2f01db">IN</p>
</td>
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.1.5.3.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__a364573d47fa34d858c6c81fac1f678c6">No</p>
</td>
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.1.5.3.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__a60c24daf5f684a0cb1f61b6dedaabeb2">Specifies the status flag, <strong id="EN-US_TOPIC_0000001233563205__b842352706101236">true</strong> for broken and <strong id="EN-US_TOPIC_0000001233563205__b842352706101233">false</strong> for not broken. Setting this parameter to <strong id="EN-US_TOPIC_0000001233563205__b841965791101655">true</strong> or <strong id="EN-US_TOPIC_0000001233563205__b1829224773101655">false</strong> updates the current job. If the parameter is left blank, the job status remains unchanged.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__re3fced34c4f444d984c2a01221c794e1"><td class="cellrowborder" valign="top" width="12.97%" headers="mcps1.3.1.5.3.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__a2b82748bf5024d4f818697e440c96dce">next_date</p>
</td>
<td class="cellrowborder" valign="top" width="14.19%" headers="mcps1.3.1.5.3.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p23679165237">timestamp</p>
</td>
<td class="cellrowborder" valign="top" width="11.76%" headers="mcps1.3.1.5.3.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p536717161235">IN</p>
</td>
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.1.5.3.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__a4ad80ca4a11842b4a44bb2d397f1f7d5">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.1.5.3.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p139962147178">Specifies the next execution time. The default is the current system time. If <strong id="EN-US_TOPIC_0000001233563205__b842352706102350">broken</strong> is set to <strong id="EN-US_TOPIC_0000001233563205__b84235270610249">true</strong>, <strong id="EN-US_TOPIC_0000001233563205__b99440916102754">next_date</strong> is updated to <strong id="EN-US_TOPIC_0000001233563205__b842352706102455">'4000-1-1'</strong>. If <strong id="EN-US_TOPIC_0000001233563205__b2128429207102528">broken</strong> is <strong id="EN-US_TOPIC_0000001233563205__b842352706102535">false</strong> and <strong id="EN-US_TOPIC_0000001233563205__b842352706102613">next_date</strong> is not empty, <strong id="EN-US_TOPIC_0000001233563205__b1958507888102631">next_date</strong> is updated for the job. If <strong id="EN-US_TOPIC_0000001233563205__b27583509110273">next_date</strong> is empty, it will not be updated. This parameter can be omitted, and its default value will be used in this case.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p999641419177">For example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__sac7d8ff090cd4bdeaf79b2e54f9952fb"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CALL</span><span class="w"> </span><span class="n">dbms_job</span><span class="p">.</span><span class="n">broken</span><span class="p">(</span><span class="mi">101</span><span class="p">,</span><span class="w"> </span><span class="k">true</span><span class="p">);</span>
<span class="k">CALL</span><span class="w"> </span><span class="n">dbms_job</span><span class="p">.</span><span class="n">broken</span><span class="p">(</span><span class="mi">101</span><span class="p">,</span><span class="w"> </span><span class="k">false</span><span class="p">,</span><span class="w"> </span><span class="n">sysdate</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001233563205__l408aea6e0872490ea15e558542cf46d2"><a name="EN-US_TOPIC_0000001233563205__l408aea6e0872490ea15e558542cf46d2"></a><a name="l408aea6e0872490ea15e558542cf46d2"></a>DBMS_JOB.CHANGE<p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p313652519239"><a name="EN-US_TOPIC_0000001233563205__l408aea6e0872490ea15e558542cf46d2"></a><a name="l408aea6e0872490ea15e558542cf46d2"></a>The stored procedure <strong id="EN-US_TOPIC_0000001233563205__b84235270610300">CHANGE</strong> modifies user-definable attributes of a job, including the job content, next-execution time, and execution interval.</p>
<p id="EN-US_TOPIC_0000001233563205__aba3b7ac6978840ceb18283996b2aa54b">A prototype of the DBMS_JOB.CHANGE function is as follows:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__s9e3058f2752d427c86d82bf06588f4b8"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">DMBS_JOB</span><span class="p">.</span><span class="n">CHANGE</span><span class="p">(</span>
<span class="n">job</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">INTEGER</span><span class="p">,</span>
<span class="n">what</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">TEXT</span><span class="p">,</span>
<span class="n">next_date</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="k">TIMESTAMP</span><span class="p">,</span>
<span class="nb">interval</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">TEXT</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233563205__t06dea1bb99644737ac32bbef332abe85" frame="border" border="1" rules="all"><caption><b>Table 5 </b>DBMS_JOB.CHANGE interface parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233563205__rf9005d76f8584be2b21840277e4e2107"><th align="left" class="cellrowborder" valign="top" width="9.120000000000001%" id="mcps1.3.1.5.4.4.2.6.1.1"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p799711145171">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="9.31%" id="mcps1.3.1.5.4.4.2.6.1.2"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p77549574233">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.44%" id="mcps1.3.1.5.4.4.2.6.1.3"><p id="EN-US_TOPIC_0000001233563205__a2c03796ca5574fdd9c70aa7f9ddbb07e">Input/Output Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.85%" id="mcps1.3.1.5.4.4.2.6.1.4"><p id="EN-US_TOPIC_0000001233563205__acfc938e56f8c4acda89daa896b98ef77">Can Be Empty</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="52.28%" id="mcps1.3.1.5.4.4.2.6.1.5"><p id="EN-US_TOPIC_0000001233563205__ab5da364613d24cfe845449df977d0b33">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001233563205__rcc70de7ac7cd49be90c7be3ca8e426e6"><td class="cellrowborder" valign="top" width="9.120000000000001%" headers="mcps1.3.1.5.4.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__aa0037f6f69b34563a10c919831030282">job</p>
</td>
<td class="cellrowborder" valign="top" width="9.31%" headers="mcps1.3.1.5.4.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p575417578231">integer</p>
</td>
<td class="cellrowborder" valign="top" width="14.44%" headers="mcps1.3.1.5.4.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__a74d236f24e4e4e8794a8ff6c1c6020cc">IN</p>
</td>
<td class="cellrowborder" valign="top" width="14.85%" headers="mcps1.3.1.5.4.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__a6fc72d5e5c044137a1aa920d749b6c2c">No</p>
</td>
<td class="cellrowborder" valign="top" width="52.28%" headers="mcps1.3.1.5.4.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__a3cb983100a1c4fb297d5f45c1eef9a73">Specifies the job number.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__rd7eefa64e6384106a738427facf65567"><td class="cellrowborder" valign="top" width="9.120000000000001%" headers="mcps1.3.1.5.4.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__a2e4094cca5094b2cb1701061068c9944">what</p>
</td>
<td class="cellrowborder" valign="top" width="9.31%" headers="mcps1.3.1.5.4.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p117545575232">text</p>
</td>
<td class="cellrowborder" valign="top" width="14.44%" headers="mcps1.3.1.5.4.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p117543578232">IN</p>
</td>
<td class="cellrowborder" valign="top" width="14.85%" headers="mcps1.3.1.5.4.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__a3cd6171c660c42d7b60a60fc9a4ede18">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="52.28%" headers="mcps1.3.1.5.4.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p29987145175">Specifies the name of the stored procedure or SQL statement block that is executed. If this parameter is left blank, the system does not update the <strong id="EN-US_TOPIC_0000001233563205__b842352706103658">what</strong> parameter for the specified job. Otherwise, the system updates the <strong id="EN-US_TOPIC_0000001233563205__b1099797297103734">what</strong> parameter for the specified job.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__r80939d96257c4c5aa77da24110c9e690"><td class="cellrowborder" valign="top" width="9.120000000000001%" headers="mcps1.3.1.5.4.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p59981143177">next_date</p>
</td>
<td class="cellrowborder" valign="top" width="9.31%" headers="mcps1.3.1.5.4.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__a3cad63999a4948409c1496a5ee5d3b77">timestamp</p>
</td>
<td class="cellrowborder" valign="top" width="14.44%" headers="mcps1.3.1.5.4.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__a74d0fbad2f8a4cb4821b78d5747fdaff">IN</p>
</td>
<td class="cellrowborder" valign="top" width="14.85%" headers="mcps1.3.1.5.4.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__ae4c0f59ee92d4477a9d6db095e47b6cf">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="52.28%" headers="mcps1.3.1.5.4.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__ad8a7697280204c1fb0eecbbedc4a72f6">Specifies the next execution time. If this parameter is left blank, the system does not update the <strong id="EN-US_TOPIC_0000001233563205__b1981389683103841">next_date</strong> parameter for the specified job. Otherwise, the system updates the <strong id="EN-US_TOPIC_0000001233563205__b431083721103841">next_date</strong> parameter for the specified job.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__r6a34984ce64949b6966d896b09ee193d"><td class="cellrowborder" valign="top" width="9.120000000000001%" headers="mcps1.3.1.5.4.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__aa724235842364deab7107d7b3fb55a33">interval</p>
</td>
<td class="cellrowborder" valign="top" width="9.31%" headers="mcps1.3.1.5.4.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__ae0a91076a62f4a7eb1be77334f684086">text</p>
</td>
<td class="cellrowborder" valign="top" width="14.44%" headers="mcps1.3.1.5.4.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p775417572235">IN</p>
</td>
<td class="cellrowborder" valign="top" width="14.85%" headers="mcps1.3.1.5.4.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__a1791040bbdc041389f42cec47616c91f">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="52.28%" headers="mcps1.3.1.5.4.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__a8f62ed8b9e11439cbf5f459245df913f">Specifies the time expression for calculating the next time the job will be executed. If this parameter is left blank, the system does not update the <strong id="EN-US_TOPIC_0000001233563205__b91188118104014">interval</strong> parameter for the specified job. Otherwise, the system updates the <strong id="EN-US_TOPIC_0000001233563205__b160698628210412">interval</strong> parameter for the specified job after necessary validity check. If this parameter is set to <strong id="EN-US_TOPIC_0000001233563205__b1065304213">null</strong>, the job will be executed only once, and the job status will change to <strong id="EN-US_TOPIC_0000001233563205__b834944953">'d'</strong> afterward.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="EN-US_TOPIC_0000001233563205__acd523d5f28c640b896eca3a3214fcb7a">For example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__s68382d685f4b4f35aad37edfc63cda6d"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CALL</span><span class="w"> </span><span class="n">dbms_job</span><span class="p">.</span><span class="n">change</span><span class="p">(</span><span class="mi">101</span><span class="p">,</span><span class="w"> </span><span class="s1">'call userproc();'</span><span class="p">,</span><span class="w"> </span><span class="n">sysdate</span><span class="p">,</span><span class="w"> </span><span class="s1">'sysdate + 1.0/1440'</span><span class="p">);</span>
<span class="k">CALL</span><span class="w"> </span><span class="n">dbms_job</span><span class="p">.</span><span class="n">change</span><span class="p">(</span><span class="mi">101</span><span class="p">,</span><span class="w"> </span><span class="s1">'insert into tbl_a values(sysdate);'</span><span class="p">,</span><span class="w"> </span><span class="n">sysdate</span><span class="p">,</span><span class="w"> </span><span class="s1">'sysdate + 1.0/1440'</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001233563205__lcdae9678ae524e92b48962c7caf0d531"><a name="EN-US_TOPIC_0000001233563205__lcdae9678ae524e92b48962c7caf0d531"></a><a name="lcdae9678ae524e92b48962c7caf0d531"></a>DBMS_JOB.WHAT<p id="EN-US_TOPIC_0000001233563205__ab44c7088ec454c16bc32f8dfdadbd44e"><a name="EN-US_TOPIC_0000001233563205__lcdae9678ae524e92b48962c7caf0d531"></a><a name="lcdae9678ae524e92b48962c7caf0d531"></a>The stored procedure <strong id="EN-US_TOPIC_0000001233563205__b842352706104359">WHAT</strong> modifies the procedures to be executed by a specified job.</p>
<p id="EN-US_TOPIC_0000001233563205__acd2c280b9f87417f80659d89c0790860">A prototype of the DBMS_JOB.WHAT function is as follows:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__s9a004fb07795402f93b13324d3beb88d"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">DMBS_JOB</span><span class="p">.</span><span class="n">WHAT</span><span class="p">(</span>
<span class="n">job</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">INTEGER</span><span class="p">,</span>
<span class="n">what</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">TEXT</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233563205__td35f93725a0e431ebe9969f91b4d74d5" frame="border" border="1" rules="all"><caption><b>Table 6 </b>DBMS_JOB.WHAT interface parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_row5041561718"><th align="left" class="cellrowborder" valign="top" width="8.12%" id="mcps1.3.1.5.5.4.2.6.1.1"><p id="EN-US_TOPIC_0000001233563205__afd1507504e2748ce98e8a0ca25d96d3c">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11.01%" id="mcps1.3.1.5.5.4.2.6.1.2"><p id="EN-US_TOPIC_0000001233563205__a1e529ceedd8e4fe19af5286db71071d5">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.620000000000001%" id="mcps1.3.1.5.5.4.2.6.1.3"><p id="EN-US_TOPIC_0000001233563205__a116d545fe2a244b8b64e02929b466264">Input/Output Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.55%" id="mcps1.3.1.5.5.4.2.6.1.4"><p id="EN-US_TOPIC_0000001233563205__a710e640865f548e387e6029400cd848a">Can Be Empty</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45.7%" id="mcps1.3.1.5.5.4.2.6.1.5"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p110111541715">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001233563205__r550bd49b4d70420785fe7e0cc9a47c5f"><td class="cellrowborder" valign="top" width="8.12%" headers="mcps1.3.1.5.5.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p180151520177">job</p>
</td>
<td class="cellrowborder" valign="top" width="11.01%" headers="mcps1.3.1.5.5.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__a0c2b33a3089e424db829482e087df247">integer</p>
</td>
<td class="cellrowborder" valign="top" width="15.620000000000001%" headers="mcps1.3.1.5.5.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__a97a74e21206b47d49cd3c6a4bd681c82">IN</p>
</td>
<td class="cellrowborder" valign="top" width="19.55%" headers="mcps1.3.1.5.5.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__a65128c401fa44caa8331cd39e968e5fb">No</p>
</td>
<td class="cellrowborder" valign="top" width="45.7%" headers="mcps1.3.1.5.5.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p205154175">Specifies the job number.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_row2011513173"><td class="cellrowborder" valign="top" width="8.12%" headers="mcps1.3.1.5.5.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p6115153173">what</p>
</td>
<td class="cellrowborder" valign="top" width="11.01%" headers="mcps1.3.1.5.5.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__a6fced4083ebb457fa8da13ae56567855">text</p>
</td>
<td class="cellrowborder" valign="top" width="15.620000000000001%" headers="mcps1.3.1.5.5.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__acef24188616b4ffc91a8917e7eabacb7">IN</p>
</td>
<td class="cellrowborder" valign="top" width="19.55%" headers="mcps1.3.1.5.5.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__a0500d6de3cf549aeb5a09486213b6873">No</p>
</td>
<td class="cellrowborder" valign="top" width="45.7%" headers="mcps1.3.1.5.5.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p1318151172">Specifies the name of the stored procedure or SQL statement block that is executed.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="EN-US_TOPIC_0000001233563205__n43f3b88690624d4b8d053e6e6141ace1"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001233563205__ul16154943104112"><li id="EN-US_TOPIC_0000001233563205__li1154154324120">If the value specified by the <strong id="EN-US_TOPIC_0000001233563205__b84235270610483">what</strong> parameter is one or multiple executable SQL statements, program blocks, or stored procedures, this procedure can be executed successfully; otherwise, it will fail to be executed.</li><li id="EN-US_TOPIC_0000001233563205__li1215413433411">If the <strong id="EN-US_TOPIC_0000001233563205__b278114462105610">what</strong> parameter is a simple statement such as insert and update, a schema name must be added in front of the table name.</li></ul>
</div></div>
<p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p13112151179">For example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__s0e7cc07066eb42d79efa7772db4a7c43"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CALL</span><span class="w"> </span><span class="n">dbms_job</span><span class="p">.</span><span class="n">what</span><span class="p">(</span><span class="mi">101</span><span class="p">,</span><span class="w"> </span><span class="s1">'call userproc();'</span><span class="p">);</span>
<span class="k">CALL</span><span class="w"> </span><span class="n">dbms_job</span><span class="p">.</span><span class="n">what</span><span class="p">(</span><span class="mi">101</span><span class="p">,</span><span class="w"> </span><span class="s1">'insert into tbl_a values(sysdate);'</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_li5112157173"><a name="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_li5112157173"></a><a name="en-us_topic_0059779362_li5112157173"></a>DBMS_JOB.NEXT_DATE<p id="EN-US_TOPIC_0000001233563205__ae7858af4808b411784d846262a3668e9"><a name="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_li5112157173"></a><a name="en-us_topic_0059779362_li5112157173"></a>The stored procedure <strong id="EN-US_TOPIC_0000001233563205__b842352706105828">NEXT_DATE</strong> modifies the next-execution time attribute of a job.</p>
<p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p182115151718">A prototype of the DBMS_JOB.NEXT_DATE function is as follows:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__sf94cb56a46f64219a13a358539492d29"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">DMBS_JOB</span><span class="p">.</span><span class="n">NEXT_DATE</span><span class="p">(</span>
<span class="n">job</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">INTEGER</span><span class="p">,</span>
<span class="n">next_date</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="k">TIMESTAMP</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233563205__t1814a1dcc4b04fcf8f2529ef1c6c590d" frame="border" border="1" rules="all"><caption><b>Table 7 </b>DBMS_JOB.NEXT_DATE interface parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_row9251519172"><th align="left" class="cellrowborder" valign="top" width="13.558644135586443%" id="mcps1.3.1.5.6.4.2.6.1.1"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p4271551719">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.1985801419858%" id="mcps1.3.1.5.6.4.2.6.1.2"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p42972412518">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.988701129887009%" id="mcps1.3.1.5.6.4.2.6.1.3"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p92917247254">Input/Output Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.10828917108289%" id="mcps1.3.1.5.6.4.2.6.1.4"><p id="EN-US_TOPIC_0000001233563205__a739d78a06e2740678ad5d8b7b15dfb6b">Can Be Empty</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.14578542145785%" id="mcps1.3.1.5.6.4.2.6.1.5"><p id="EN-US_TOPIC_0000001233563205__a79e464d322c54c6bb852e65a02915eba">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_row6216155171"><td class="cellrowborder" valign="top" width="13.558644135586443%" headers="mcps1.3.1.5.6.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p12121561714">job</p>
</td>
<td class="cellrowborder" valign="top" width="14.1985801419858%" headers="mcps1.3.1.5.6.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p229624162515">integer</p>
</td>
<td class="cellrowborder" valign="top" width="12.988701129887009%" headers="mcps1.3.1.5.6.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p132962417258">IN</p>
</td>
<td class="cellrowborder" valign="top" width="17.10828917108289%" headers="mcps1.3.1.5.6.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__a75d64f47168640ffb81105cd575c5f0d">No</p>
</td>
<td class="cellrowborder" valign="top" width="42.14578542145785%" headers="mcps1.3.1.5.6.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p121315131714">Specifies the job number.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_row6391551717"><td class="cellrowborder" valign="top" width="13.558644135586443%" headers="mcps1.3.1.5.6.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p113615111717">next_date</p>
</td>
<td class="cellrowborder" valign="top" width="14.1985801419858%" headers="mcps1.3.1.5.6.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p529524172512">timestamp</p>
</td>
<td class="cellrowborder" valign="top" width="12.988701129887009%" headers="mcps1.3.1.5.6.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p82917248250">IN</p>
</td>
<td class="cellrowborder" valign="top" width="17.10828917108289%" headers="mcps1.3.1.5.6.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__ab8915de4bc034ce1a738eaa2504b33bb">No</p>
</td>
<td class="cellrowborder" valign="top" width="42.14578542145785%" headers="mcps1.3.1.5.6.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p1738151173">Specifies the next execution time.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="EN-US_TOPIC_0000001233563205__n5e3f1e3161794c398ee2ee53d14f06d7"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001233563205__a263e37811a94413785ed69093b5e502e">If the specified <strong id="EN-US_TOPIC_0000001233563205__b84235270611049">next_date</strong> value is earlier than the current date, the job is executed once immediately.</p>
</div></div>
<p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p53201514175">For example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__sb34a2e3dc0ea4599b90c4d306f258c06"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CALL</span><span class="w"> </span><span class="n">dbms_job</span><span class="p">.</span><span class="n">next_date</span><span class="p">(</span><span class="mi">101</span><span class="p">,</span><span class="w"> </span><span class="n">sysdate</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001233563205__l9403a7623efd44968cda762baf5b3819"><a name="EN-US_TOPIC_0000001233563205__l9403a7623efd44968cda762baf5b3819"></a><a name="l9403a7623efd44968cda762baf5b3819"></a>DBMS_JOB.INTERVAL<p id="EN-US_TOPIC_0000001233563205__a8b19311efc254d1e8a897cfd09cfe774"><a name="EN-US_TOPIC_0000001233563205__l9403a7623efd44968cda762baf5b3819"></a><a name="l9403a7623efd44968cda762baf5b3819"></a>The stored procedure <strong id="EN-US_TOPIC_0000001233563205__b84235270611134">INTERVAL</strong> modifies the execution interval attribute of a job.</p>
<p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p183111561712">A prototype of the DBMS_JOB.INTERVAL function is as follows:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__s0df7030c3e054777bdbd13e12f4ee7ad"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">DMBS_JOB</span><span class="p">.</span><span class="nb">INTERVAL</span><span class="p">(</span>
<span class="n">job</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">INTEGER</span><span class="p">,</span>
<span class="nb">interval</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">TEXT</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233563205__t72df9b3debab419e85f787ccb935321c" frame="border" border="1" rules="all"><caption><b>Table 8 </b>DBMS_JOB.INTERVAL interface parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233563205__rc3ceb2c9eed643e2b7c11a3357a9792d"><th align="left" class="cellrowborder" valign="top" width="13.420000000000002%" id="mcps1.3.1.5.7.4.2.6.1.1"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p19314155179">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.82%" id="mcps1.3.1.5.7.4.2.6.1.2"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p037419612262">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11.12%" id="mcps1.3.1.5.7.4.2.6.1.3"><p id="EN-US_TOPIC_0000001233563205__a3f1b0a199e6f4067bb7ad6228388a23d">Input/Output Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.409999999999998%" id="mcps1.3.1.5.7.4.2.6.1.4"><p id="EN-US_TOPIC_0000001233563205__a78f11058dd26492b82dca31127832032">Can Be Empty</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.230000000000004%" id="mcps1.3.1.5.7.4.2.6.1.5"><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p6321515172">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001233563205__r6468251b5fe24a7f91a3a454df42cb11"><td class="cellrowborder" valign="top" width="13.420000000000002%" headers="mcps1.3.1.5.7.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p834151178">job</p>
</td>
<td class="cellrowborder" valign="top" width="10.82%" headers="mcps1.3.1.5.7.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p237416182620">integer</p>
</td>
<td class="cellrowborder" valign="top" width="11.12%" headers="mcps1.3.1.5.7.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p937513612615">IN</p>
</td>
<td class="cellrowborder" valign="top" width="15.409999999999998%" headers="mcps1.3.1.5.7.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__adc15a8ae6c0e48249773817c749384e2">No</p>
</td>
<td class="cellrowborder" valign="top" width="49.230000000000004%" headers="mcps1.3.1.5.7.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p53815161716">Specifies the job number.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__rb0c96b656fea410480b6b6287e5bd407"><td class="cellrowborder" valign="top" width="13.420000000000002%" headers="mcps1.3.1.5.7.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p14410153176">interval</p>
</td>
<td class="cellrowborder" valign="top" width="10.82%" headers="mcps1.3.1.5.7.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p53751611261">text</p>
</td>
<td class="cellrowborder" valign="top" width="11.12%" headers="mcps1.3.1.5.7.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p113751462262">IN</p>
</td>
<td class="cellrowborder" valign="top" width="15.409999999999998%" headers="mcps1.3.1.5.7.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__af5541460e3da4729ae7a3f68ade70e41">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="49.230000000000004%" headers="mcps1.3.1.5.7.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__a5fe77488a626431daa2105fd3585a5c5">Specifies the time expression for calculating the next time the job will be executed. If this parameter is left blank or set to <strong id="EN-US_TOPIC_0000001233563205__b1613106369">null</strong>, the job will be executed only once, and the job status will change to <strong id="EN-US_TOPIC_0000001233563205__b485416228">'d'</strong> afterward. <strong id="EN-US_TOPIC_0000001233563205__b84235270611358">interval</strong> must be a valid time or interval type.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_p16411531720">For example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__sb49408e3ed804c58a6eee83e9ecf9ca5"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CALL</span><span class="w"> </span><span class="n">dbms_job</span><span class="p">.</span><span class="nb">interval</span><span class="p">(</span><span class="mi">101</span><span class="p">,</span><span class="w"> </span><span class="s1">'sysdate + 1.0/1440'</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
<div class="note" id="EN-US_TOPIC_0000001233563205__ncadba89ef7ac45fd948bd7befc1bcb19"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001233563205__a8398e054a78d4d8088fd9c894527f2e4">For a job that is currently running (that is, <strong id="EN-US_TOPIC_0000001233563205__b84235270611655">job_status</strong> is <strong id="EN-US_TOPIC_0000001233563205__b8423527061170">'r'</strong>), it is not allowed to use <strong id="EN-US_TOPIC_0000001233563205__b84235270611823">remove</strong>, <strong id="EN-US_TOPIC_0000001233563205__b84235270611827">change</strong>, <strong id="EN-US_TOPIC_0000001233563205__b84235270611833">next_date</strong>, <strong id="EN-US_TOPIC_0000001233563205__b84235270611839">what</strong>, or <strong id="EN-US_TOPIC_0000001233563205__b84235270611844">interval</strong> to delete or modify job parameters.</p>
</div></div>
</li></ul>
</div>
<ul id="EN-US_TOPIC_0000001233563205__ul1123724417562"><li id="EN-US_TOPIC_0000001233563205__li10457452125617"><a name="EN-US_TOPIC_0000001233563205__li10457452125617"></a><a name="li10457452125617"></a>DBMS_JOB.CHANGE_OWNER<p id="EN-US_TOPIC_0000001233563205__p845795265616"><a name="EN-US_TOPIC_0000001233563205__li10457452125617"></a><a name="li10457452125617"></a>The stored procedure <strong id="EN-US_TOPIC_0000001233563205__b176418429579">CHANGE_OWNER</strong> modifies the owner of a job.</p>
<p id="EN-US_TOPIC_0000001233563205__p64571052205612">A prototype of the DBMS_JOB.CHANGE_OWNER function is as follows:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__screen16457652105618"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">DMBS_JOB</span><span class="p">.</span><span class="n">CHANGE_OWNER</span><span class="p">(</span>
<span class="n">job</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="nb">INTEGER</span><span class="p">,</span>
<span class="n">new_owner</span><span class="w"> </span><span class="k">IN</span><span class="w"> </span><span class="n">NAME</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233563205__table345755215562" frame="border" border="1" rules="all"><caption><b>Table 9 </b>DBMS_JOB.CHANGE_OWNER interface parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233563205__row345745275615"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.2.1.4.2.6.1.1"><p id="EN-US_TOPIC_0000001233563205__p114575525560">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.2.1.4.2.6.1.2"><p id="EN-US_TOPIC_0000001233563205__p245719525564">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.2.1.4.2.6.1.3"><p id="EN-US_TOPIC_0000001233563205__p18457185220564">Input/Output Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.2.1.4.2.6.1.4"><p id="EN-US_TOPIC_0000001233563205__p10457452105618">Can Be Empty</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.1.4.2.6.1.5"><p id="EN-US_TOPIC_0000001233563205__p20458145295612">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001233563205__row745816523563"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.1.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__p1545816521566">job</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.1.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__p18795113595912">integer</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.1.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__p2458155275612">IN</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.1.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__p9458145285619">No</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.1.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__p6458205255617">Specifies the job number.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001233563205__row9458185215614"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.1.4.2.6.1.1 "><p id="EN-US_TOPIC_0000001233563205__p1545813523569">new_owner</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.1.4.2.6.1.2 "><p id="EN-US_TOPIC_0000001233563205__p13458115235613">name</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.1.4.2.6.1.3 "><p id="EN-US_TOPIC_0000001233563205__p1845835285617">IN</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.1.4.2.6.1.4 "><p id="EN-US_TOPIC_0000001233563205__p94581052105610">No</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.1.4.2.6.1.5 "><p id="EN-US_TOPIC_0000001233563205__p134581952135614">Specifies the new username.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="EN-US_TOPIC_0000001233563205__p74581752195618">For example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001233563205__screen1245885217569"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CALL</span><span class="w"> </span><span class="n">dbms_job</span><span class="p">.</span><span class="n">change_owner</span><span class="p">(</span><span class="mi">101</span><span class="p">,</span><span class="w"> </span><span class="s1">'alice'</span><span class="p">);</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
<div class="section" id="EN-US_TOPIC_0000001233563205__sbed30cc3a816483d8c9f0a6fe2141a43"><h4 class="sectiontitle">Constraints</h4><ol id="EN-US_TOPIC_0000001233563205__o65510f82dd004c3bb422568b13312e1c"><li id="EN-US_TOPIC_0000001233563205__l6bd2c51294404a448d7972c74047785e">After a new job is created, this job belongs to the current coordinator only, that is, this job can be scheduled and executed only on the current coordinator. Other coordinators will not schedule or execute this job. All coordinators can query, modify, and delete jobs created on other CNs.</li><li id="EN-US_TOPIC_0000001233563205__le2a375c0029e4fdda4d0459e9a7703bd">Create, update, and delete jobs only using the procedures provided by the DBMS_JOB package. These procedures synchronize job information between different CNs and associate primary keys between the <strong id="EN-US_TOPIC_0000001233563205__b13119125410502">pg_jobs</strong> tables. If you use DML statements to add, delete, or modify records in the <strong id="EN-US_TOPIC_0000001233563205__b74015588500">pg_jobs</strong> table, job information will become inconsistent between CNs and system tables may fail to be associated, compromising internal job management.</li><li id="EN-US_TOPIC_0000001233563205__en-us_topic_0059779362_li17417204356">Each user-created task is bound to a CN. If the automatic migration function is not enabled, task statuses cannot be updated in real time when the CN is faulty during task execution. When a CN fails, all jobs on this CN cannot be scheduled or executed until the CN is restored manually. Enable the automatic migration function on CNs, so that jobs on the faulty CN will be migrated to other CNs for scheduling.</li><li id="EN-US_TOPIC_0000001233563205__l0674ccd1c6f94365a7bc8f807f909185">For each job, the hosting CN updates the real-time job information (including the job status, last execution start time, last execution end time, next execution start time, the number of execution failures if any) to the <strong id="EN-US_TOPIC_0000001233563205__b8423527069566">pg_jobs</strong> table, and synchronizes the information to other CNs, ensuring consistent job information between different CNs. In the case of CN failures, job information synchronization is reattempted by the hosting CNs, which increases job execution time. Although job information fails to be synchronized between CNs, job information can still be properly updated in the <strong id="EN-US_TOPIC_0000001233563205__b15602943145119">pg_jobs</strong> table on the hosting CNs, and jobs can be executed successfully. After a CN recovers, job information such as job execution time and status in its <strong id="EN-US_TOPIC_0000001233563205__b14408245216">pg_jobs</strong> table may be incorrect and will be updated only after the jobs are executed again on related CNs.</li><li id="EN-US_TOPIC_0000001233563205__l63b8c691fdea4c269d3a1bdc4e302fbc">For each job, a thread is established to execute it. If multiple jobs are triggered concurrently as scheduled, the system will need some time to start the required threads, resulting in a latency of 0.1 ms in job execution.</li><li id="EN-US_TOPIC_0000001233563205__li37885534309">The length of the SQL statement to be executed in a job is limited. The maximum length is 8 KB.</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0550.html">Advanced Packages</a></div>
</div>
</div>