Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\AEADM\adm_wrkspc_del.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>About Deleting Inactive Workspaces</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T17:6:25Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="About Deleting Inactive Workspaces" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E12512-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="adm_wrkspc.htm" title="Oracle Application Express ..." type="text/html" /> <link rel="up" href="adm_mg_wrkspc.htm" title="Managing Existing Workspaces" type="text/html" /> <link rel="up" href="adm_wrkspc_del.htm" title="About Deleting Inactive Wor..." type="text/html" /> <link rel="prev" href="adm_wrkspc_privs.htm" title="Previous" type="text/html" /> <link rel="next" href="adm_wrkspc_remove.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface.htm" title="Home">Home</a> > <a href="adm_wrkspc.htm" title="Oracle Application Express ...">Oracle Application Express ...</a> > <a href="adm_mg_wrkspc.htm" title="Managing Existing Workspaces">Managing Existing Workspaces</a> > About Deleting Inactive Wor...</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="adm_wrkspc_privs.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="adm_wrkspc_remove.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BEJHHADG" name="BEJHHADG"></a></p> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h1><a name="AEADM276" id="AEADM276"></a>About Deleting Inactive Workspaces<a id="sthref337" name="sthref337"></a><a id="sthref338" name="sthref338"></a></h1> <p>If you are managing a large hosted Oracle Application Express instance, periodically purging inactive workspaces can free up resources for other users. The process of purging inactive workspaces consists of the following steps:</p> <ol> <li> <p>Identify inactive workspaces.</p> </li> <li> <p>Remove the resources associated with each inactive workspace.</p> </li> <li> <p>Delete the inactive workspaces.</p> </li> </ol> <a id="sthref339" name="sthref339"></a> <p class="subhead2">Topics:</p> <ul> <li> <p><a href="#BEJCJIJI">Identifying Inactive Workspaces</a></p> </li> <li> <p><a href="#BEJJGHEB">Removing the Resources Associated with Inactive Workspaces</a></p> </li> <li> <p><a href="#BEJHCAEG">Deleting Inactive Workspaces</a></p> </li> </ul> <a id="BEJCJIJI" name="BEJCJIJI"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="AEADM277" id="AEADM277"></a>Identifying Inactive Workspaces<a id="sthref340" name="sthref340"></a></h2> <p>The first step in determining if a workspace is inactive is to establish some basic rules. A common approach is to base the rules on the Oracle Application Express activity records found in the current Application Express engine schema.</p> <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> <a href="adm_eng_schema.htm#BEJEDCEJ">"Determining the Oracle Application Express Engine Schema"</a></td> </tr> </tbody> </table> <br /></div> <!-- class="inftblnotealso" --></div> <p>The following DDL (data definition language) creates a table of all workspaces requested before June 28, 2004 but that have been inactive since June 10, 2004. In this example, inactivity is determined by checking a key within the Application Express engine schema for the most recent updates by each workspace.</p> <pre xml:space="preserve" class="oac_no_warn"> ALTER SESSION SET CURRENT_SCHEMA = APEX_030200; CREATE TABLE ws_to_purge AS SELECT c.security_group_id, c.company_name, c.admin_email, c.request_date, SYSDATE last_updated_on, 'Y' ok_to_delete FROM wwv_flow_provision_company c WHERE c.request_date <= to_date('20040628','YYYYMMDD') AND ( not exists (SELECT NULL /* Activity Log */ FROM wwv_flow_activity_log l WHERE l.security_group_id = c.security_group_id AND l.time_stamp > to_date('20040610','YYYYMMDD')) ) AND NOT EXISTS (SELECT NULL /* workspace applications */ FROM wwv_flows f WHERE f.security_group_id = c.security_group_id AND f.last_updated_on > to_date('20040610','YYYYMMDD')) AND NOT EXISTS (SELECT NULL /* Pages */ FROM wwv_flow_steps s WHERE s.security_group_id = c.security_group_id AND s.last_updated_on > to_date('20040610','YYYYMMDD')) AND NOT EXISTS (SELECT NULL /* Regions */ FROM wwv_flow_page_plugs p WHERE p.security_group_id = c.security_group_id AND p.last_updated_on > to_date('20040610','YYYYMMDD')) AND NOT EXISTS (SELECT NULL /* Items */ FROM wwv_flow_step_items i WHERE i.security_group_id = c.security_group_id AND i.last_updated_on > to_date('20040610','YYYYMMDD')) AND NOT EXISTS (SELECT NULL /* Templates */ FROM wwv_flow_templates t WHERE t.security_group_id = c.security_group_id AND t.last_updated_on > to_date('20040610','YYYYMMDD')) AND NOT EXISTS (SELECT NULL /* Files uploaded */ FROM wwv_flow_file_objects$ o WHERE o.security_group_id = c.security_group_id AND o.created_on > to_date('20040610','YYYYMMDD')) AND NOT EXISTS (SELECT NULL /* SQL Workshop history */ FROM wwv_flow_sw_sql_cmds s WHERE s.security_group_id = c.security_group_id AND s.created_on > to_date('20040610','YYYYMMDD')); </pre> <p>After you identify inactive workspaces, you can purge them. Purging inactive workspaces is a two-step process:</p> <ul> <li> <p>First, remove the resources (that is, the database schemas, tablespaces, and data files) associated with each inactive workspace.</p> </li> <li> <p>Second, drop the inactive workspaces from Oracle Application Express.</p> </li> </ul> </div> <!-- class="sect3" --> <a id="BEJJGHEB" name="BEJJGHEB"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="AEADM278" id="AEADM278"></a>Removing the <a id="sthref341" name="sthref341"></a>Resources Associated with Inactive Workspaces</h2> <p>After you have identified inactive workspaces in a single table, the next step is to remove them.</p> <div align="center"> <div class="inftblnote"><br /> <table class="Note oac_no_warn" summary="" cellpadding="3" cellspacing="0"> <tbody> <tr> <td align="left"> <p class="notep1">Note:</p> Before removing the schemas, tablespaces, or data files associated with inactive workspaces, make sure these resources are not being used in any other workspace or application.</td> </tr> </tbody> </table> <br /></div> <!-- class="inftblnote" --></div> <p>To remove the resources associated with inactive workspaces:</p> <ol> <li> <p>Identify the schemas used by the workspaces to be deleted by joining the table containing the identified inactive workspaces to <code>wwv_flow_company_schemas.</code></p> </li> <li> <p>Drop the schemas, tablespaces, and data files used exclusively by the inactive workspaces from the database. You can identify the schemas to drop by running a query similar to the following:</p> <pre xml:space="preserve" class="oac_no_warn"> SELECT s.schema FROM ws_to_purge ws, wwv_flow_company_schemas s WHERE s.security_group_id = ws.security_group_id AND ws.ok_to_delete = 'Y'; </pre></li> </ol> </div> <!-- class="sect3" --> <a id="BEJHCAEG" name="BEJHCAEG"></a> <div class="sect3"><!-- infolevel="all" infotype="General" --> <h2><a name="AEADM279" id="AEADM279"></a>Deleting Inactive Workspaces<a id="sthref342" name="sthref342"></a></h2> <p>Once you remove the resources associated with an inactive workspace, you can delete the workspace. You can delete inactive workspaces manually using the Oracle Application Express Administration Services application. Or, you can delete them programmatically as shown in the following PL/SQL example.</p> <pre xml:space="preserve" class="oac_no_warn"> BEGIN FOR c1 IN (SELECT security_group_id FROM ws_to_purge WHERE ok_to_delete = 'Y') LOOP WWV_FLOW_PROVISIONING.TERMINATE_SERVICE_BY_SGID(c1.security_group_id); END LOOP; END; </pre> <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> <a href="adm_wrkspc_remove.htm#BABHCJHA">"Removing a Workspace"</a></td> </tr> </tbody> </table> <br /></div> <!-- class="inftblnotealso" --></div> </div> <!-- class="sect3" --></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="adm_wrkspc_privs.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="adm_wrkspc_remove.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