Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\advnc_plsql_job.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>Understanding the APEX_PLSQL_JOB Package</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T16:11:32Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="Understanding the APEX_PLSQL_JOB Package" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E11947-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.htm" title="Home" type="text/html" /> <link rel="up" href="advnc.htm" title="Advanced Programming Techni..." type="text/html" /> <link rel="up" href="advnc_plsql.htm" title="Running Background PL/SQL" type="text/html" /> <link rel="up" href="advnc_plsql_job.htm" title="Understanding the APEX" type="text/html" /> <link rel="prev" href="advnc_plsql.htm" title="Previous" type="text/html" /> <link rel="next" href="advnc_sys_updates.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface.htm" title="Home">Home</a> > <a href="advnc.htm" title="Advanced Programming Techni...">Advanced Programming Techni...</a> > <a href="advnc_plsql.htm" title="Running Background PL/SQL">Running Background PL/SQL</a> > Understanding the APEX�</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="advnc_plsql.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="advnc_sys_updates.htm"><img src="dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BABDDBAG" name="BABDDBAG"></a></p> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h1><a name="HTMDB25879" id="HTMDB25879"></a>Understanding the APEX_PLSQL_JOB <a id="sthref2239" name="sthref2239"></a><a id="sthref2240" name="sthref2240"></a><a id="sthref2241" name="sthref2241"></a>Package</h1> <p><code>APEX_PLSQL_JOB</code> is a wrapper package around <code>DBMS_JOB</code> functionality offered in the Oracle database. Note that the <code>APEX_PLSQL_JOB</code> package only exposes that functionality which is necessary to run PL/SQL in the background. The following is a description of the <code>APEX_PLSQL_JOB</code> package:</p> <pre xml:space="preserve" class="oac_no_warn"> SQL> DESC APEX_PLSQL_JOB FUNCTION JOBS_ARE_ENABLED RETURNS BOOLEAN PROCEDURE PURGE_PROCESS Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- P_JOB NUMBER IN FUNCTION SUBMIT_PROCESS RETURNS NUMBER Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- P_SQL VARCHAR2 IN P_WHEN VARCHAR2 IN DEFAULT P_STATUS VARCHAR2 IN DEFAULT FUNCTION TIME_ELAPSED RETURNS NUMBER Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- P_JOB NUMBER IN PROCEDURE UPDATE_JOB_STATUS Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- P_JOB NUMBER IN P_STATUS VARCHAR2 IN </pre> <p><a href="advnc_coll_merge.htm#BABDFCEE">Table: Available Arguments for Merging Collections</a> describes the functions available in the <code>APEX_PLSQL_JOB</code> package.</p> <div class="tblformal"><a id="sthref2242" name="sthref2242"></a><a id="sthref2243" name="sthref2243"></a> <p class="titleintable">APEX_PLSQL_JOB Package: Available Functions</p> <table class="Formal" title="APEX_PLSQL_JOB Package: Available Functions" summary="This table describes the functions available in the HTMLDB_PLSQL_JOBS package." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="31%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t17">Function or Procedure</th> <th align="left" valign="bottom" id="r1c2-t17">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t17" headers="r1c1-t17"> <p><code>SUBMIT_PROCESS</code></p> </td> <td align="left" headers="r2c1-t17 r1c2-t17"> <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> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t17" headers="r1c1-t17"> <p><code>UPDATE_JOB_STATUS</code></p> </td> <td align="left" headers="r3c1-t17 r1c2-t17"> <p>Call this procedure to update the status of the currently running job. This procedure is most effective when called from the submitted PL/SQL.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t17" headers="r1c1-t17"> <p><code>TIME_ELAPSED</code></p> </td> <td align="left" headers="r4c1-t17 r1c2-t17"> <p>Use this function to determine how much time has elapsed since the job was submitted.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t17" headers="r1c1-t17"> <p><code>JOBS_ARE_ENABLED</code></p> </td> <td align="left" headers="r5c1-t17 r1c2-t17"> <p>Call this function to determine whether the database is currently in a mode that supports submitting jobs to the <code>APEX_PLSQL_JOB</code> package.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t17" headers="r1c1-t17"> <p><code>PURGE_PROCESS</code></p> </td> <td align="left" headers="r6c1-t17 r1c2-t17"> <p>Call this procedure to clean up submitted jobs. Submitted jobs stay in the <code>APEX_PLSQL_JOBS</code> view until either Oracle Application Express cleans out those records, or you call <code>PURGE_PROCESS</code> to manually remove them.</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --> <p>You can view all jobs submitted to the <code>APEX_PLSQL_JOB</code> package using the <code>APEX_PLSQL_JOBS</code> view. The following is the description of <code>APEX_PLSQL_JOBS</code> view:</p> <pre xml:space="preserve" class="oac_no_warn"> SQL> DESCRIBE APEX_PLSQL_JOBS Name Null? Type --------------------------------- -------- ---------------------------- ID NUMBER JOB NUMBER FLOW_ID NUMBER OWNER VARCHAR2(30) ENDUSER VARCHAR2(30) CREATED DATE MODIFIED DATE STATUS VARCHAR2(100) SYSTEM_STATUS VARCHAR2(4000) SYSTEM_MODIFIED DATE SECURITY_GROUP_ID NUMBER </pre> <p><a href="#BABFDCAH">Table: APEX_PLSQL_JOBS View Columns</a> describes the columns available in <code>APEX_PLSQL_JOBS</code> view.</p> <div class="tblformal"><a id="sthref2244" name="sthref2244"></a><a id="BABFDCAH" name="BABFDCAH"></a> <p class="titleintable">APEX_PLSQL_JOBS View Columns</p> <table class="Formal" title="APEX_PLSQL_JOBS View Columns" summary="This table describes the parameters available in HTMLDB_PLSQL_JOBS view." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="29%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t18">Name</th> <th align="left" valign="bottom" id="r1c2-t18">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t18" headers="r1c1-t18"> <p><code>ID</code></p> </td> <td align="left" headers="r2c1-t18 r1c2-t18"> <p>A unique identifier for each row.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t18" headers="r1c1-t18"> <p><code>JOB</code></p> </td> <td align="left" headers="r3c1-t18 r1c2-t18"> <p>The job number assigned to each submitted PL/SQL job. The <code>APEX_PLSQL_JOB.SUBMIT_PROCESS</code> function returns this value. This is also the value you pass into other procedures and functions in the <code>APEX_PLSQL_JOB</code> package.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t18" headers="r1c1-t18"> <p><code>FLOW_ID</code></p> </td> <td align="left" headers="r4c1-t18 r1c2-t18"> <p>The application from which this job was submitted.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t18" headers="r1c1-t18"> <p><code>OWNER</code></p> </td> <td align="left" headers="r5c1-t18 r1c2-t18"> <p>The database schema that owns the application. This identifies what schema will parse this code when <code>DBMS_JOB</code> runs it.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t18" headers="r1c1-t18"> <p><code>ENDUSER</code></p> </td> <td align="left" headers="r6c1-t18 r1c2-t18"> <p>The end user (that is, who logged into the application) that caused this process to be submitted.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r7c1-t18" headers="r1c1-t18"> <p><code>CREATED</code></p> </td> <td align="left" headers="r7c1-t18 r1c2-t18"> <p>The date when the job was submitted.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r8c1-t18" headers="r1c1-t18"> <p><code>MODIFIED</code></p> </td> <td align="left" headers="r8c1-t18 r1c2-t18"> <p>The date when the status was modified.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r9c1-t18" headers="r1c1-t18"> <p><code>STATUS</code></p> </td> <td align="left" headers="r9c1-t18 r1c2-t18"> <p>The user-defined status for this job. Calling <code>APEX_PLSQL_JOB.UPDATE_JOB_STATUS</code> updates this column.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r10c1-t18" headers="r1c1-t18"> <p><code>SYSTEM_STATUS</code></p> </td> <td align="left" headers="r10c1-t18 r1c2-t18"> <p>The system defined status for this job.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r11c1-t18" headers="r1c1-t18"> <p><code>SYSTEM_MODIFIED</code></p> </td> <td align="left" headers="r11c1-t18 r1c2-t18"> <p>The date when the system status was modified.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r12c1-t18" headers="r1c1-t18"> <p><code>SECURITY_GROUP_ID</code></p> </td> <td align="left" headers="r12c1-t18 r1c2-t18"> <p>The unique ID assigned to your workspace. Developers can only see jobs submitted from their own workspace.</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --> <div align="center"> <div class="inftblnotealso"><br /> <table class="NoteAlso oac_no_warn" summary="" cellpadding="3" cellspacing="0"> <tbody> <tr> <td align="left"> <p class="notep1">See Also:</p> APEX_PLSQL_JOBS in <a href="http://www.oracle.com/pls/db112/lookup?id=AEAPI353"><span class="italic">Oracle Application Express API Reference</span></a></td> </tr> </tbody> </table> <br /></div> <!-- class="inftblnotealso" --></div> </div> <!-- class="sect2" --> <!-- 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="advnc_plsql.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="advnc_sys_updates.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