Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\AEAPI\apex_plsql_job003.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>SUBMIT_PROCESS Function</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T17:32:17Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="SUBMIT_PROCESS Function" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E12510-01" /> <link rel="copyright" href="../dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="stylesheet" href="../dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="up" href="preface" title="Home" type="text/html" /> <link rel="up" href="apex_plsql_job.htm" title="APEX_PLSQL_JOB" type="text/html" /> <link rel="up" href="apex_plsql_job003.htm" title="SUBMIT_PROCESS Function" type="text/html" /> <link rel="prev" href="apex_plsql_job002.htm" title="Previous" type="text/html" /> <link rel="next" href="apex_plsql_job004.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface" title="Home">Home</a> > <a href="apex_plsql_job.htm" title="APEX_PLSQL_JOB">APEX_PLSQL_JOB</a> > SUBMIT_PROCESS Function</p> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr valign="bottom"> <td align="left"></td> <td align="center"><a href="apex_plsql_job002.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_plsql_job004.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BGBCJIJI" name="BGBCJIJI"></a></p> <hr /> <div class="refsect1"> <h1><a id="sthref1079" name="sthref1079"></a>SUBMIT_PROCESS Function</h1> <p>Use this procedure to submit background PL/SQL. This procedure returns a unique job number. Because you can use this job number as a reference point for other procedures and functions in this package, it may be useful to store it in your own schema.</p> <a id="sthref1080" name="sthref1080"></a> <p class="subhead2">Syntax</p> <pre xml:space="preserve" class="oac_no_warn"> APEX_PLSQL_JOB.SUBMIT_PROCESS ( p_sql IN VARCHAR2, p_when IN DATE DEFAULT SYSDATE, p_status IN VARCHAR2 DEFAULT 'PENDING') RETURN NUMBER; </pre> <a id="sthref1081" name="sthref1081"></a> <p class="subhead2">Parameters</p> <p><a href="#BGBGFHCE">Table: SUBMIT_PROCESS Parameters</a> describes the parameters available in the <code>SUBMIT_PROCESS</code> function.</p> <div class="tblformal"><a id="sthref1082" name="sthref1082"></a><a id="BGBGFHCE" name="BGBGFHCE"></a> <p class="titleintable">SUBMIT_PROCESS Parameters</p> <table class="Formal" title="SUBMIT_PROCESS Parameters" summary="This table describes the parameters available in the REMOVE_PREFERENCE procedure." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="41%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t3">Parameter</th> <th align="left" valign="bottom" id="r1c2-t3">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t3" headers="r1c1-t3"> <p><code>p_sql</code></p> </td> <td align="left" headers="r2c1-t3 r1c2-t3"> <p>The process you wish to run in your job. This can be any valid anonymous block, for example:</p> <pre xml:space="preserve" class="oac_no_warn"> 'BEGIN <your code> END;' or 'DECLARE <your declaration> BEGIN <your code> END;' </pre></td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t3" headers="r1c1-t3"> <p>p_when</p> </td> <td align="left" headers="r3c1-t3 r1c2-t3"> <p>When you want to run it. The default is SYSDATE which means the job will run as soon as possible. You can also set the job to run in the future, for example:</p> <p><code>sysdate + 1</code> - The job will run in 1 days time.</p> <p><code>sysdate + (1/24)</code> - The job will run in 1 hours time.</p> <p><code>sysdate + (10/24/60)</code> - The job will run in 10 minutes time.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t3" headers="r1c1-t3"> <p>p_status</p> </td> <td align="left" headers="r4c1-t3 r1c2-t3"> <p>Plain text status information for this job.</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --> <a id="sthref1083" name="sthref1083"></a> <p class="subhead2">Example</p> <p>The following example shows how to use the <code>SUBMIT_PROCESS</code> function to submit a background process that will start as soon as possible.</p> <pre xml:space="preserve" class="oac_no_warn"> DECLARE l_sql VARCHAR2(4000); l_job NUMBER; BEGIN l_sql := 'BEGIN MY_PACKAGE.MY_PROCESS; END;'; l_job := APEX_PLSQL_JOB.SUBMIT_PROCESS( p_sql => l_sql, p_status => 'Background process submitted'); --store l_job for later reference END; </pre></div> <!-- class="refsect1" --> <!-- Start Footer --> <div class="footer"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr> <td align="left"><span class="copyrightlogo">Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.</span><br /> <a href="../dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td> <td align="center"><a href="apex_plsql_job002.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_plsql_job004.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </div> <!-- class="footer" --> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de