Edit D:\app\Administrator\product\11.2.0\dbhome_1\oc4j\j2ee\oc4j_applications\applications\em\em\online_help\tdpii\tdpii_diverge001.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 Comparing and Converging Data in Different Databases</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:3Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="About Comparing and Converging Data in Different Databases" /> <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_diverge.htm" title="Previous" type="text/html" /> <link rel="next" href="tdpii_diverge002.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_diverge.htm"><img src="./dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="tdpii_diverge002.htm"><img src="./dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BABBAFCB" name="BABBAFCB"></a><a id="TDPII091" name="TDPII091"></a></p> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h1>About Comparing and Converging Data in Different Databases<a id="sthref697" name="sthref697"></a></h1> <a name="BEGIN" id="BEGIN"></a> <p>You can share database objects at two or more databases. When copies of the same database object exist at multiple databases, the database object is a <span class="bold">shared database object</span>. Shared database objects might be maintained by data replication. For example, materialized views or Oracle Streams components might replicate the database objects and maintain them at multiple databases. A custom application might also maintain shared database objects. Typically, replication environments share database objects that contain data, such as tables, as well as other types of databases objects, such as indexes.</p> <p>When a change is made to a shared database object at one database, the change is transferred to and made at each of the other databases that share the database object. In this way, the replication environment keeps the shared database object synchronized at each database.</p> <p>Sometimes, shared database objects that contain data can become inconsistent at different databases. That is, the data might diverge in the different instances of the shared database object. For example, if the database object is a table, then one instance of the table might have more rows than another instance of the table, or two instances of the table might have different data in the same rows.</p> <p>When shared database objects diverge in an Oracle Streams replication environment, it is usually for one of the following reasons:</p> <ul> <li> <p>Data changes are not being captured at one or more of the databases.</p> </li> <li> <p>Data changes are being captured, but they are not being transferred from one database to another.</p> </li> <li> <p>Data changes are being captured and transferred from one database to another, but they are not being made to shared database objects at the other databases.</p> </li> </ul> <p>Common causes of data divergence are network problems, incorrect configurations, or user errors. When shared database objects diverge in a replication environment that uses materialized views, it might be because there is a problem with the materialized view refresh.</p> <p><a id="sthref698" name="sthref698"></a>The <code>DBMS_COMPARISON</code> package enables you to compare database objects at different databases and identify differences. This package also enables you to converge the database objects so that they are consistent at different databases. The <code>DBMS_COMPARISON</code> package is an Oracle-supplied PL/SQL package that is always installed with Oracle Database.</p> <p>The <code>DBMS_COMPARISON</code> package can compare and converge the following types of database objects:</p> <ul> <li> <p>Tables</p> </li> <li> <p>Single-table views</p> </li> <li> <p>Materialized views</p> </li> <li> <p>Synonyms for tables, single-table views, and materialized views</p> </li> </ul> <p>Database objects of different types can be compared and converged at different databases. For example, a table at one database and a materialized view at another database can be compared and converged.</p> <p>In the examples in this guide, the shared database object has the same name at the two databases, and the entire database object is compared and converged. However, the <code>DBMS_COMPARISON</code> package provides flexibility for differences in the shared database object at different databases. The database objects being compared do not need to have the same name. In addition, column names can also be different in the database objects, as long as the corresponding columns are the same data type. You can compare and converge the entire shared database object or subsets of columns and rows.</p> <p>To create a comparison, use the <code>CREATE_COMPARISON</code> procedure in the <code>DBMS_COMPARISON</code> package. This procedure identifies one or more index columns in the shared database object. The <code>DBMS_COMPARISON</code> package must be able to identify at least one column that it can use as an index column. If the specified database object does not have a column that can be used as an index column, then the <code>CREATE_COMPARISON</code> procedure cannot create a comparison for the database object.</p> <div class="helpinfonote"> <p><span class="bold">Note: </span>If your environment has shared database objects that have diverged, then you should investigate the cause of the problem and correct it. Although the <code>DBMS_COMPARISON</code> package can compare and converge shared database objects, it is better if these database objects do not diverge.</p> </div> <div class="helpinfonotealso"> <h2>Related Topics</h2> <p><a href="javascript:open('http://www.oracle.com/pls/db112/lookup?id=ARPLS868','newWindow').focus()"><span class="italic">Oracle Database PL/SQL Packages and Types Reference</span></a> for detailed information about the <code>DBMS_COMPARISON</code> package</p> <p><a href="javascript:open('http://www.oracle.com/pls/db112/lookup?id=STREP146','newWindow').focus()"><span class="italic">Oracle Streams Replication Administrator's Guide</span></a> for information about using the advanced features of the <code>DBMS_COMPARISON</code> package</p> <p><a href="tdpii_diverge002.htm#BABDBGFC">Tutorial: Preparing to Compare and Converge Data</a></p> <p><a href="tdpii_diverge003.htm#BABCDFGB">Tutorial: Comparing Data in Two Different Databases</a></p> <p><a href="tdpii_diverge004.htm#BABFHACE">Tutorial: Converging Divergent Data</a></p> </div> </div> <!-- 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_diverge.htm"><img src="./dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="tdpii_diverge002.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