Oracle® Database PL/SQL Packages and Types Reference 11g Release 1 (11.1) Part Number B28419-01 |
|
|
View PDF |
The DBMS_COMPARISON
package provides interfaces to compare and converge database objects at different databases.
This chapter contains the following topics:
Overview
Security Model
Constants
Views
Operational Notes
See Also:
Oracle Database 2 Day + Data Replication and Integration Guide for information about using the basic features of this package
Oracle Streams Replication Administrator's Guide for information about using the advanced features of this package
This section contains topics which relate to using the DBMS_COMPARISON
package.
The DBMS_COMPARISON
package is an Oracle-supplied package that you can use to compare database objects at two databases. This package also enables you converge the database objects so that they are consistent at different databases. Typically, this package is used in environments that share a database object at multiple databases. When copies of the same database object exist at multiple databases, the database object is a shared database object. Several data dictionary views contain information about comparisons made with the DBMS_COMPARISON
package.
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. When a database object is shared, it can diverge at the databases that share it. You can use this package to identify differences in the shared database objects. After identifying the differences, you can optionally use this package to synchronize the shared database objects.
To compare a database object that is shared at two different databases, complete the following general steps:
Run the CREATE_COMPARE
procedure in this package to create a comparison. The comparison identifies the database objects to compare and specifies parameters for the comparison.
Run the COMPARE
function in this package to compare the database object at the two databases and identify differences. This function returns TRUE
when no differences are found and FALSE
when differences are found. This function also populates data dictionary views with comparison results. Separate comparison results are generated for each execution of the COMPARE
function.
If you want to examine the comparison results, query the following data dictionary views:
DBA_COMPARISON_SCAN
USER_COMPARISON_SCAN
DBA_COMPARISON_SCAN_SUMMARY
USER_COMPARISON_SCAN_SUMMARY
DBA_COMPARISON_SCAN_VALUES
USER_COMPARISON_SCAN_VALUES
DBA_COMPARISON_ROW_DIF
USER_COMPARISON_ROW_DIF
If there are differences, and you want to synchronize the database objects at the two databases, then run the CONVERGE
procedure in this package.
After you create a comparison with the CREATE_COMPARISON
procedure in the DBMS_COMPARISON
package, you can run the comparison at any time using the COMPARE
function. Each time you run the COMPARE
function, it records comparison results in the appropriate data dictionary views. Comparison results might be modified when subprograms in this package are invoked and the scans in the comparison results are specified. For example, comparison results might be modified when you run the RECHECK
function.
The comparison results for a single execution of the COMPARE
function can include one or more scans. A scan checks for differences in some or all of the rows in a shared database object at a single point in time. You can compare database objects multiple times, and a unique scan ID identifies each scan in the comparison results.
A bucket is a range of rows in a database object that is being compared. Buckets improve performance by splitting the database object into ranges and comparing the ranges independently. Every comparison divides the rows being compared into an appropriate number of buckets, and each bucket is compared by a scan.
Each time the COMPARE
function splits a bucket into smaller buckets, it performs new scans of the smaller buckets. The scan that analyzes a larger bucket is the parent scan of each scan that analyzes the smaller buckets into which the larger bucket was split. The root scan in the comparison results is the highest level parent scan. The root scan does not have a parent.
You can recheck a scan using the RECHECK
function, and you can converge a scan using the CONVERGE
procedure. When you want to recheck or converge all of the rows comparison results, specify the root scan ID for the comparison results in the appropriate subprogram. When you want to recheck or converge a portion of the rows in comparison results, specify the scan ID of the scan that contains the differences.
See Also:
Oracle Streams Replication Administrator's Guide for more information about comparisons, including detailed information about scans, buckets, parent scans, and root scansSecurity on this package can be controlled in either of the following ways:
Granting EXECUTE
on this package to selected users or roles.
Granting EXECUTE_CATALOG_ROLE
to selected users or roles.
If subprograms in the package are run from within a stored procedure, then the user who runs the subprograms must be granted EXECUTE
privilege on the package directly. It cannot be granted through a role.
Each subprogram in the DBMS_COMPARISON
package has a comparison_name
parameter. The current user must be the owner of the specified comparison to run a subprogram in the DBMS_COMPARISON
package.
To run the COMPARE
function, RECHECK
function, or CONVERGE
procedure, the following users must have SELECT
privilege on each copy of the shared database object:
The comparison owner at the local database
When a database link is used, the user at the remote database to which the comparison owner connects through a database link
The CONVERGE
procedure also requires additional privileges for one of these users at the database where it makes changes to the shared database object. The user must have INSERT
, UPDATE
, and DELETE
privileges on the shared database object at this database.
The DBMS_COMPARISON
package defines several enumerated constants that should be used for specifying parameter values. Enumerated constants must be prefixed with the package name. For example, DBMS_COMPARISON.CMP_SCAN_MODE_FULL
.
Table 31-1 lists the parameters and enumerated constants.
Table 31-1 DBMS_COMPARISON Parameters with Enumerated Constants
Parameter | Option | Type | Description |
---|---|---|---|
comparison_mode |
|
VARCHAR2(30) |
CMP_COMPARE_MODE_OBJECT is a database object. This constant can be specified as 'OBJECT' . |
scan_mode |
|
VARCHAR2(30) |
CMP_SCAN_MODE_FULL indicates that the entire database object is compared. This constant can be specified as 'FULL' .
|
converge_options |
|
VARCHAR2(30) |
CMP_CONVERGE_LOCAL_WINS indicates that the column values at the local database replace the column values at the remote database when these column values are different. This constant can be specified as 'LOCAL' .
|
null_value |
|
VARCHAR2(100) |
CMP_NULL_VALUE_DEF indicates that ORA$STREAMS$NV is substituted for NULL values in database objects during comparison. This constant can be specified as 'ORA$STREAMS$NV' . |
max_num_buckets |
|
INTEGER |
CMP_MAX_NUM_BUCKETS indicates that the maximum number of buckets is 1,000. This constant can be specified as 1000 . |
min_rows_in_bucket |
|
INTEGER |
CMP_MIN_ROWS_IN_BUCKET indicates that the minimum number of rows in a bucket is 10,000. This constant can be specified as 10000 . |
The DBMS_COMPARISON
package uses the following views:
DBA_COMPARISON
USER_COMPARISON
DBA_COMPARISON_COLUMNS
USER_COMPARISON_COLUMNS
DBA_COMPARISON_SCAN
USER_COMPARISON_SCAN
DBA_COMPARISON_SCAN_SUMMARY
USER_COMPARISON_SCAN_SUMMARY
DBA_COMPARISON_SCAN_VALUES
USER_COMPARISON_SCAN_VALUES
DBA_COMPARISON_ROW_DIF
USER_COMPARISON_ROW_DIF
See Also:
Oracle Database ReferenceThis section contains the following operational notes for the DBMS_COMPARISON
package:
Oracle Database Release Requirements for the DBMS_COMPARISON Package
Database Character Set Requirements for the DBMS_COMPARISON Package
Database Object Requirements for the DBMS_COMPARISON Package
Meet the following Oracle Database release requirements when running the subprograms in the DBMS_COMPARISON
package:
The local database that runs the subprograms in the DBMS_COMPARISON
package must be an Oracle Database 11g Release 1 (11.1) database.
The remote database must be an Oracle Database 10g Release 1 (10.1) or later database. Oracle databases prior to this release and non-Oracle databases are not supported.
The database character sets must be the same for the databases that contain the database objects being compared.
See Also:
Oracle Database Globalization Support Guide for information about database character setsThe DBMS_COMPARISON
package can compare the following types of database objects:
Tables
Single-table views
Materialized views
Synonyms for tables, single-table views, and materialized views
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 with this package.
To run the subprograms in the DBMS_COMPARISON
package, the specified database objects must have the same shape at each database. Specifically, the database objects must have the same number of columns at each database, and the datatypes of corresponding columns must match.
If a database object being compared contains columns that do not exist in the other database object, then you can compare the database objects by excluding the extra columns during comparison creation. Use the column_list
parameter in the CREATE_COMPARISON
procedure to list only the columns that exist in both database objects.
See Also:
CREATE_COMPARISON ProcedureThis section discusses number, timestamp, and interval columns. These include the following datatypes:
Number columns are of the following datatypes: NUMBER
, FLOAT
, BINARY_FLOAT
, and BINARY_DOUBLE
.
Timestamp columns are of the following datatypes: TIMESTAMP
, TIMESTAMP
WITH
TIME
ZONE
, and TIMESTAMP
WITH
LOCAL
TIME
ZONE
Interval columns are of the following datatypes: INTERVAL
YEAR
TO
MONTH
and INTERVAL
DAY
TO
SECOND
.
For all scan modes to be supported by the DBMS_COMPARISON
package, the database objects must have one of the following types of indexes:
A single-column index on a number, timestamp, interval, or DATE
datatype column
A composite index that only includes number, timestamp, interval, or DATE
datatype columns. Each column in the composite index must either have a NOT
NULL
constraint or be part of the primary key.
For the scan modes CMP_SCAN_MODE_FULL
and CMP_SCAN_MODE_CUSTOM
to be supported, the database objects must have one of the following types of indexes:
A single-column index on a number, timestamp, interval, DATE
, VARCHAR2
, or CHAR
datatype column
A composite index that only includes number, timestamp, interval, DATE
, VARCHAR2
, or CHAR
columns. Each column in the composite index must either have a NOT
NULL
constraint or be part of the primary key.
If the database objects do not have one of these types of indexes, then the DBMS_COMPARISON
package does not support the database objects. For example, if the database objects only have a single index on an NVARCHAR2
column, then the DBMS_COMPARISON
package does not support them. Or, if the database objects have only one index, and it is a composite index that includes a NUMBER
column and an NCHAR
column, then the DBMS_COMPARISON
package does not support them.
You can specify an index when you create a comparison using the index_schema_name
and index_name
parameters in the CREATE_COMPARISON
procedure. If you specify an index, then make sure the columns in the index meet the requirements of the scan mode used for the comparison.
The index columns in a comparison must uniquely identify every row involved in a comparison. The following constraints satisfy this requirement:
A primary key constraint
A unique constraint on one or more non-NULL
columns
If these constraints are not present on a table, then use the index_schema_name
and index_name
parameters in the CREATE_COMPARISON
procedure to specify an index whose columns satisfy this requirement.
The DBMS_COMPARISON
package can use an index only if all of the columns in the index are included in the column_list
parameter when the comparison is created with the CREATE_COMPARISON
procedure.
After a comparison is created, you can determine the index column or columns for it by running the following query:
SELECT COLUMN_NAME, COLUMN_POSITION FROM DBA_COMPARISON_COLUMNS WHERE COMPARISON_NAME = 'COMPARE_CUSTOM' AND INDEX_COLUMN = 'Y';
If there is more than one index column, then the index column with 1
for the COLUMN_POSITION
is the lead index column in the composite index.
See Also:
"Constants" for information about scan modes
CREATE_COMPARISON Procedure for information about specifying an index for a comparison
The DBMS_COMPARISON
package can compare data in columns of the following datatypes:
VARCHAR2
NVARCHAR2
NUMBER
FLOAT
DATE
BINARY_FLOAT
BINARY_DOUBLE
TIMESTAMP
TIMESTAMP
WITH
TIME
ZONE
TIMESTAMP
WITH
LOCAL
TIME
ZONE
INTERVAL
YEAR
TO
MONTH
INTERVAL
DAY
TO
SECOND
RAW
CHAR
NCHAR
If a column with datatype TIMESTAMP
WITH
LOCAL
TIME
ZONE
is compared, then the two databases must use the same time zone. Also, if a column with datatype NVARCHAR2
or NCHAR
is compared, then the two databases must use the same national character set.
The DBMS_COMPARISON
package cannot compare data in columns of the following datatypes:
LONG
LONG
RAW
ROWID
UROWID
CLOB
NCLOB
BLOB
BFILE
User-defined types (including object types, REF
s, varrays, and nested tables)
Oracle-supplied types (including any types, XML types, spatial types, and media types)
You can compare database objects that contain unsupported columns by excluding the unsupported columns during comparison creation. Use the column_list
parameter in the CREATE_COMPARISON
procedure to list only the supported columns in a shared database object.
See Also:
Oracle Database SQL Language Reference for more information about datatypes
Oracle Database Globalization Support Guide for information about national character sets
You should only converge rows that are not being updated on either database. For example, if the shared database object is updated by replication components, then only converge rows for which replication changes have already been applied and make sure no new changes are in the process of being replicated for these rows. If you compare replicated database objects, then it is typically best to compare them during a time of little or no replication activity to identify persistent differences.
Attention:
If a scan identifies that a row is different in the shared database object at two databases, and the row is modified after the scan, then it can result in unexpected data in the row after theCONVERGE
procedure is run.See Also:
Oracle Streams Replication Administrator's Guide for information about theDBMS_COMPARISON
package in an Oracle Streams replication environmentThe DBMS_COMPARISON
package defines a RECORD
type.
RECORD Types
Contains information returned by the COMPARE
function or CONVERGE
procedure in the DBMS_COMPARISON
package.
Note:
TheCOMPARE
function only returns a value for the scan_id
field.TYPE COMPARISON_TYPE IS RECORD( scan_id NUMBER, loc_rows_merged NUMBER, rmt_rows_merged NUMBER, loc_rows_deleted NUMBER, rmt_rows_deleted NUMBER);
Table 31-2 COMPARISON_TYPE Attributes
Field | Description |
---|---|
scan_id |
The scan ID of the scan |
loc_rows_merged |
The number of rows in the local database object updated with information from the database object at the remote site |
rmt_rows_merged |
The number of rows in the database object updated at the remote site with information from the database object at the local site |
loc_rows_deleted |
The number of rows deleted from the local database object |
rmt_rows_deleted |
The number of rows deleted from the remote database object |
Table 31-3 DBMS_COMPARISON Package Subprograms
Subprogram | Description |
---|---|
COMPARE Function |
Performs the specified comparison |
CONVERGE Procedure |
Executes data manipulation language (DML) changes to synchronize the portion of the database object that was compared in the specified scan |
CREATE_COMPARISON Procedure |
Creates a comparison |
DROP_COMPARISON Procedure |
Drops a comparison |
PURGE_COMPARISON Procedure |
Purges the comparison results, or a subset of the comparison results, for a comparison |
RECHECK Function |
Rechecks the differences in a specified scan for a comparison |
This function performs the specified comparison.
Each time a comparison is performed, it results in at least one new scan, and each scan has a unique scan ID. You can define and name a comparison using the CREATE_COMPARISON
procedure.
See Also:
Syntax
DBMS_COMPARISON.COMPARE( comparison_name IN VARCHAR2, scan_info OUT COMPARISON_TYPE, min_value IN VARCHAR2 DEFAULT NULL, max_value IN VARCHAR2 DEFAULT NULL, perform_row_dif IN BOOLEAN DEFAULT FALSE) RETURN BOOLEAN;
Parameters
Table 31-4 COMPARE Function Parameters
Parameter | Description |
---|---|
comparison_name |
The name of the comparison. |
scan_info |
Information about the compare operation returned in the COMPARISON_TYPE datatype.
|
min_value |
When the scan mode for the comparison is set to CMP_SCAN_MODE_CUSTOM , specify the minimum index column value for the range of rows that are being compared. To determine the index column for a comparison, query the DBA_COMPARISON_COLUMNS data dictionary view. For a composite index, specify a value for the column with column_position equal to 1 in the DBA_COMPARISON_COLUMNS view. See "Index Column Requirements for the DBMS_COMPARISON Package".
If the scan mode is set to a value other than If To determine the scan mode for the comparison, query the See Constants for information about scan modes. |
max_value |
When the scan mode for the comparison is set to CMP_SCAN_MODE_CUSTOM , specify the maximum index column value for the range of rows that are being compared. To determine the index column for a comparison, query the DBA_COMPARISON_COLUMNS data dictionary view. For a composite index, specify a value for the column with column_position equal to 1 in the DBA_COMPARISON_COLUMNS view. See "Index Column Requirements for the DBMS_COMPARISON Package".
If the scan mode is set to a value other than If To determine the scan mode for the comparison, query the See Constants for information about scan modes. |
perform_row_dif |
If TRUE , then compares each row individually in the database object being compared after reaching the smallest possible bucket for the comparison.
If See "Overview" for information about buckets. |
Return Values
This function returns TRUE
when no differences are found in the database objects being compared. This function returns FALSE
when differences are found in the database objects being compared.
This procedure executes data manipulation language (DML) changes to synchronize the portion of the database objects that was compared in the specified scan.
Syntax
DBMS_COMPARISON.CONVERGE( comparison_name IN VARCHAR2, scan_id IN NUMBER, scan_info OUT COMPARISON_TYPE, converge_options IN VARCHAR2 DEFAULT CMP_CONVERGE_LOCAL_WINS, perform_commit IN BOOLEAN DEFAULT TRUE, local_converge_tag IN RAW DEFAULT NULL, remote_converge_tag IN RAW DEFAULT NULL);
Parameters
Table 31-5 CONVERGE Procedure Parameters
Parameter | Description |
---|---|
comparison_name |
The name of the comparison. |
scan_id |
The identifier for the scan that contains the differences between the database objects being converged.
See "Overview" for more information about specifying a scan ID in this parameter. |
scan_info |
Information about the converge operation returned in the COMPARISON_TYPE datatype.
|
converge_options |
Either the CMP_CONVERGE_LOCAL_WINS constant or the CMP_CONVERGE_REMOTE_WINS constant.
See "Constants" for information about these constants. |
perform_commit |
If TRUE , then performs a COMMIT periodically while making the DML changes. The CONVERGE procedure might perform more than one COMMIT when this parameter is set to TRUE .
If |
local_converge_tag |
The Oracle Streams tag to set in the session on the local database before performing any changes to converge the data in the database objects being converged.
If non- If See the Oracle Streams Replication Administrator's Guide for more information about tags. |
remote_converge_tag |
The Oracle Streams tag to set in the session on the remote database before performing any changes to converge the data in the database objects being converged.
If non- If See the Oracle Streams Replication Administrator's Guide for more information about tags. |
Usage Notes
If one of the database objects being converged is a read-only materialized view, then the converge_options
parameter must be set to ensure that the read-only materialized view "wins" in the converge operation. The CONVERGE
procedure raises an error if it tries to make changes to a read-only materialized view.
This procedure creates a comparison.
Syntax
DBMS_COMPARISON.CREATE_COMPARISON( comparison_name IN VARCHAR2, schema_name IN VARCHAR2, object_name IN VARCHAR2, dblink_name IN VARCHAR2, index_schema_name IN VARCHAR2 DEFAULT NULL, index_name IN VARCHAR2 DEFAULT NULL, remote_schema_name IN VARCHAR2 DEFAULT NULL, remote_object_name IN VARCHAR2 DEFAULT NULL, comparison_mode IN VARCHAR2 DEFAULT CMP_COMPARE_MODE_OBJECT, column_list IN VARCHAR2 DEFAULT '*', scan_mode IN VARCHAR2 DEFAULT CMP_SCAN_MODE_FULL, scan_percent IN NUMBER DEFAULT NULL, null_value IN VARCHAR2 DEFAULT CMP_NULL_VALUE_DEF, local_converge_tag IN RAW DEFAULT NULL, remote_converge_tag IN RAW DEFAULT NULL, max_num_buckets IN NUMBER DEFAULT CMP_MAX_NUM_BUCKETS, min_rows_in_bucket IN NUMBER DEFAULT CMP_MIN_ROWS_IN_BUCKET);
Parameters
Table 31-6 CREATE_COMPARISON Procedure Parameters
Parameter | Description |
---|---|
comparison_name |
The name of the comparison. |
schema_name |
The name of the schema that contains the local database object to compare. |
object_name |
The name of the local database object to compare. |
dblink_name |
Database link to the remote database. The specified database object in the remote database is compared with the database object in the local database.
If |
index_schema_name |
The name of the schema that contains the index.
If |
index_name |
The name of the index.
If If the See Also: "Usage Notes" for more information about specifying an index |
remote_schema_name |
The name of the schema that contains the database object at the remote database. Specify a non-NULL value if the schema names are different at the two databases.
If |
remote_object_name |
The name of the database object at the remote database. Specify a non-NULL value if the database object names are different at the two databases.
If |
comparison_mode |
Specify the default value CMP_COMPARE_MODE_OBJECT . Additional modes might be added in future releases. |
column_list |
Specify '*' to include all of the columns in the database objects being compared.
To compare a subset of columns in the database objects, specify a comma-separated list of the columns to check. Any columns that are not in the list are ignored during a comparison and convergence. See "Usage Notes" for information about columns that are required in the |
scan_mode |
Either CMP_SCAN_MODE_FULL , CMP_SCAN_MODE_RANDOM , CMP_SCAN_MODE_CYCLIC , or CMP_SCAN_MODE_CUSTOM .
If you specify See "Constants" for information about these constants. |
scan_percent |
The percentage of the database object to scan for comparison when the scan_mode parameter is set to either CMP_SCAN_MODE_RANDOM or CMP_SCAN_MODE_CYCLIC . For these scan_mode settings, a non-NULL value that is greater than 0 (zero) and less than 100 is required.
If If If non- Note: When the |
null_value |
The value to substitute for each NULL in the database objects being compared. Specify a value or use the CMP_NULL_VALUE_DEF constant.
If a column being compared can contain See "Constants" for information about this constant. |
local_converge_tag |
The Oracle Streams tag to set in the session on the local database before performing any changes to converge the data in the database objects being compared.
If the See the Oracle Streams Replication Administrator's Guide for more information about tags. |
remote_converge_tag |
The Oracle Streams tag to set in the session on the remote database before performing any changes to converge the data in the database objects being compared.
If the See the Oracle Streams Replication Administrator's Guide for more information about tags. |
max_num_buckets |
Specify the maximum number of buckets to use. Specify a value or use the CMP_MAX_NUM_BUCKETS constant. See "Constants" for information about this constant.
See "Overview" for information about buckets. Note: If an index column for a comparison is a |
min_rows_in_bucket |
Specify the minimum number of rows in each bucket. Specify a value or use the CMP_MIN_ROWS_IN_BUCKET constant. See "Constants" for information about this constant.
See "Overview" for information about buckets. |
Usage Notes
This section contains usage notes for the CREATE_COMPARISON
procedure.
Usage Notes for the index_schema_name and index_name Parameters
When you specify an index for a comparison with the index_schema_name
and index_name
parameters, the specified index determines the comparison's index columns and their ordering. The order of the columns in the index determines the index column ordering for the comparison. Therefore, the column in column position 1 in the index is the lead column for the comparison.
The index columns and their ordering affect the details of each SQL statement generated and executed for a comparison. For each SQL statement, the optimizer decides whether or not to use indexes. If the optimizer decides to use indexes, then the optimizer decides which particular indexes to use. An index specified in column_list
parameter might or might not be used.
The columns in the specified index must meet the requirements described in "Index Column Requirements for the DBMS_COMPARISON Package". If the index columns do not meet these requirements, then an error is raised.
Usage Notes for the column_list Parameter
When the column_list
parameter is set to a value other than '*'
, the following columns are required in the column_list
parameter:
Any columns that are required to meet the index column requirements for the DBMS_COMPARISON
package. If the index_name
parameter is non-NULL
, then the columns in the specified index must be in the column list. If the index_name
parameter is NULL
, then see "Index Column Requirements for the DBMS_COMPARISON Package".
If you plan to use the CONVERGE
procedure to make changes to a database object based on the comparison, then any columns in this database object that have a NOT
NULL
constraint but no default value must be included in the column list. If these columns are not included, then the CONVERGE
procedure returns an error. See CONVERGE Procedure.
This procedure drops a comparison.
Syntax
DBMS_COMPARISON.DROP_COMPARISON( comparison_name IN VARCHAR2);
Parameters
Table 31-7 DROP_COMPARISON Procedure Parameters
Parameter | Description |
---|---|
comparison_name |
The name of the comparison. |
This procedure purges the comparison results, or a subset of the comparison results, for a comparison.
Note:
At least one of the following parameters must be set toNULL
: scan_id
or purge_time
. If both the scan_id
and purge_time
parameters are NULL
, then this procedure purges all comparison results for the comparison.Syntax
DBMS_COMPARISON.PURGE_COMPARISON( comparison_name IN VARCHAR2, scan_id IN NUMBER DEFAULT NULL, purge_time IN TIMESTAMP DEFAULT NULL);
Parameters
Table 31-8 PURGE_COMPARISON Procedure Parameters
Parameter | Description |
---|---|
comparison_name |
The name of the comparison. |
scan_id |
The scan ID of the scan for which results are purged. The scan ID must identify a root scan. If the scan ID does not identify a root scan, then an error is raised. When a root scan ID is specified, it is purged, and all direct and indirect child scans of the specified root scan are purged.
If See "Overview" for information about scans. |
purge_time |
The date before which results are purged.
If |
This function rechecks the differences in a specified scan for a comparison.
This function performs one of the following actions:
If the specified scan completed successfully the last time it ran, then this function checks the previously identified differences in the scan.
If the specified scan completed partially, then this function will continue to check the database object from the point where the previous scan ended.
Note:
This function does not identify new differences in the database objects that have appeared since the specified scan was run. To identify new differences, run theCOMPARE
function in this package.Syntax
DBMS_COMPARISON.RECHECK( comparison_name IN VARCHAR2, scan_id IN NUMBER, perform_row_dif IN BOOLEAN DEFAULT FALSE) RETURN BOOLEAN;
Parameters
Table 31-9 RECHECK Function Parameters
Parameter | Description |
---|---|
comparison_name |
The name of the comparison. |
scan_id |
The scan ID of the scan to recheck.
See "Overview" for more information about specifying a scan ID in this parameter. |
perform_row_dif |
If TRUE , then compares each row individually in the database objects being compared after reaching the smallest possible bucket for the comparison.
If See "Overview" for information about buckets. |
Return Values
This function returns TRUE
when differences are found in the database objects being compared. This function returns FALSE
when no differences are found in the database objects being compared.