Edit D:\app\Administrator\product\11.2.0\dbhome_1\oc4j\j2ee\oc4j_applications\applications\em\em\online_help\tdpii\tdpii_adpit007.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>Tutorial: Cleaning Up Materialized View Support at a Master Site</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1.1 Build 005" /> <meta name="date" content="2009-06-04T17:1:2Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="Tutorial: Cleaning Up Materialized View Support at a Master Site" /> <meta name="relnum" content="11g Release 2 (11.2)" /> <meta name="partnum" content="E10703-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="prev" href="tdpii_adpit006.htm" title="Previous" type="text/html" /> <link rel="next" href="tdpii_adpit008.htm" title="Next" type="text/html" /> <script src="./callback.js" type="text/javascript"></script> <noscript>Your browser does not support JavaScript. This help page requires JavaScript to render correctly.</noscript> </head> <body> <div class="zz-skip-header"><a href="#BEGIN">Skip Headers</a></div> <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="tdpii_adpit006.htm"><img src="./dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="tdpii_adpit008.htm"><img src="./dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BABHFCEE" name="BABHFCEE"></a><a id="TDPII107" name="TDPII107"></a></p> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h1>Tutorial: Cleaning Up Materialized View Support at a Master Site<a id="sthref499" name="sthref499"></a><a id="sthref500" name="sthref500"></a><a id="sthref501" name="sthref501"></a></h1> <a name="BEGIN" id="BEGIN"></a> <p>If you dropped a materialized view while the materialized view site was not connected to the master site over the network, then you should clean up materialized view support at the master site. Cleaning up materialized view support includes the following actions:</p> <ul> <li> <p>Unregistering the materialized view</p> <p>Unregistering the materialized view removes information about the materialized view in the data dictionary at the master site.</p> </li> <li> <p>Either purging the materialized view log or dropping the materialized view log</p> <p>If the master table for the materialized view is the master table for other materialized views, then you should purge the materialized view log of information for the materialized view that was dropped. If the master table for the materialized view is not a master table for any other materialized views, then you can drop the materialized view log.</p> </li> </ul> <p>Oracle Database automatically tracks which rows in a materialized view log have been used during the refreshes of materialized views, and purges these rows from the log so that the log size does not increase endlessly. Because multiple materialized views can use the same materialized view log, rows already used to refresh one materialized view might still be needed to refresh another materialized view. Oracle Database does not delete rows from the log until all materialized views have used them. If you drop a materialized view without cleaning up the master site, then the materialized view log for the materialized view can become very large.</p> <p>The example in this topic cleans up the following materialized view support:</p> <ul> <li> <p>The master site is <code>ii1.example.com</code>.</p> </li> <li> <p>The materialized view site is <code>ii2.example.com</code>.</p> </li> <li> <p>The name of the materialized view is <code>employees_mvr</code>.</p> </li> <li> <p>The owner of the materialized view is <code>hr</code>.</p> </li> </ul> <p class="orderedlisttitle">To clean up support for this materialized view at the master site: </p> <ol> <li> <p>On a command line, open SQL*Plus and connect to the master site <code>ii1.example.com</code> as an administrative user, such as the replication administrator or <code>SYSTEM</code>. By default, the user name of the replication administrator is <code>repadmin</code>.</p> <p>See <a href="topicid:ADMQS0361">Starting SQL*Plus and Connecting to the Database</a> for more information about starting SQL*Plus.</p> </li> <li> <p>Either purge or drop the materialized view log for the master table of the materialized view:</p> <ul> <li> <p><a id="sthref503" name="sthref503"></a>If the master table is also the master table for other materialized views in addition to the one that was dropped, then purge the materialized view log of information for the materialized view that was dropped:</p> <pre xml:space="preserve" class="oac_no_warn"> BEGIN DBMS_MVIEW.PURGE_MVIEW_FROM_LOG ( mviewowner => 'hr', mviewname => 'employees_mvr', mviewsite => 'ii2.example.com'); END; / </pre></li> <li> <p><a id="sthref504" name="sthref504"></a>If the master table is not a master table for any materialized views other than the one that was dropped, then drop the materialized view log on the master table:</p> <pre xml:space="preserve" class="oac_no_warn"> DROP MATERIALIZED VIEW LOG ON hr.employees; </pre></li> </ul> </li> <li> <p><a id="sthref505" name="sthref505"></a><a id="sthref506" name="sthref506"></a>Unregister the materialized view:</p> <pre xml:space="preserve" class="oac_no_warn"> BEGIN DBMS_MVIEW.UNREGISTER_MVIEW ( mviewowner => 'hr', mviewname => 'employees_mvr', mviewsite => 'ii2.example.com'); END; / </pre></li> </ol> <p>If you are not sure about the materialized view owner, name, or materialized view site, then you can query the <a href="javascript:open('http://www.oracle.com/pls/db112/lookup?id=REFRN20183','newWindow').focus()"><code>ALL_REGISTERED_MVIEWS</code></a> data dictionary view to obtain this information.</p> <div class="helpinfonotealso"> <h2>Related Topics</h2> <p><a href="tdpii_adpit006.htm#BABJIDJJ">Dropping a Materialized View</a></p> <p><a href="tdpii_reppit003.htm#BEHBEBJA">About Materialized View Refresh</a></p> <p><a href="tdpii_reppit001.htm#BEHHAHHA">About Materialized View Replication</a></p> <p><a href="tdpii_adpit001.htm#CIHCJIBF">Managing a Materialized View Replication Environment</a></p> </div> </div> <!-- class="sect2" --> <!-- class="sect1" --> <!-- 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 © 2007, 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="tdpii_adpit006.htm"><img src="./dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="tdpii_adpit008.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