Oracle Built-in Packages

Oracle Built-in PackagesSearch this book
Previous: 16.5 Assigning Resolution Methods with DBMS_REPCATChapter 16
Conflict Resolution
Next: 17. Deferred  Transactions and Remote Procedure Calls
 

16.6 Monitoring Conflict Resolution with DBMS_REPCAT

Oracle can audit successful calls to your conflict resolution handlers so that you have insight into the frequency and nature of the conflicts that occur.

16.6.1 About Monitoring

If you enable the auditing of successful calls to your conflict resolution handlers, you can review this information in the DBA_REPRESOLUTION_STATISTICS data dictionary view.

Use the following programs to enable, disable, and purge these statistics:

DBMS_REPCAT.REGISTER_STATISTICS
DBMS_REPCAT.CANCEL_STATISTICS
DBMS_REPCAT.PURGE_STATISTICS

16.6.1.1 The DBMS_REPCAT.REGISTER_STATISTICS procedure

The REGISTER_STATISTICS procedure enables the collection of data about the successful resolution of update, uniqueness, and delete conflicts. This information is visible in the DBA_REPRESOLUTION_STATISTICS data dictionary view. Here is the specification for this procedure:

PROCEDURE DBMS_REPCAT.REGISTER_STATISTICS
   (sname IN VARCHAR2,
    oname IN VARCHAR2);

Parameters are summarized in the following table.

Name

Description

sname

Name of the schema to which the replicated table belongs

oname

Name of the replicated table

There are no restrictions on calling REGISTER_STATISTICS.

16.6.1.1.1 Exceptions

The REGISTER_STATISTICS procedure may raise the following exceptions:

Name

Number

Description

missingobject

-23308

Table oname does not exist

missingschema

-23306

Schema sname does not exist

16.6.1.1.2 Example

This call enables the gathering of conflict resolution statistics for the products table:

	BEGIN
		DBMS_REPCAT.REGISTER_STATISTICS
			sname	=> 'SPROCKET',
			oname	=> 'PRODUCTS');
	END;

16.6.1.2 The DBMS_REPCAT.CANCEL_STATISTICS procedure

The CANCEL_STATISTICS procedure disables the gathering of conflict resolution statistics. Here's the specification:

PROCEDURE DBMS_REPCAT.CANCEL_STATISTICS
   (sname IN VARCHAR2,
    oname IN VARCHAR2);

Parameters are summarized in the following table.

Name

Description

sname

Name of the schema to which the replicated table belongs

oname

Name of the replicated table

There are no restrictions on calling CANCEL_STATISTICS.

16.6.1.2.1 Exceptions

The CANCEL_STATISTICS procedure may raise the following exceptions:

Name

Number

Description

missingobject

-23308

Table oname does not exist

missingschema

-23306

Schema sname does not exist

statnotreg

-23345

Statistics have not been registered for object oname

16.6.1.2.2 Example

This call disables the gathering of conflict resolution statistics for the products table:

	BEGIN
		DBMS_REPCAT.CANCEL_STATISTICS(
			sname	=> 'SPROCKET',
			oname	=> 'PRODUCTS;);
	END;

16.6.1.3 The DBMS_REPCAT.PURGE_STATISTICS procedure

If you are collecting conflict resolution statistics, you can purge this information periodically using the PURGE_STATISTICS procedure. Here is the specification:

PROCEDURE DBMS_REPCAT.PURGE_STATISTICS
   (sname IN VARCHAR2,
    oname IN VARCHAR2,
    start_date IN DATE,
    end_date IN DATE);

Parameters are summarized in the following table.

Name

Description

sname

Name of the schema that owns oname.

oname

Table whose conflict resolution statistics are to be deleted.

start_date

Beginning of date range for which statistics are to be deleted. If NULL, all entries less than end_date are deleted.

end_date

End of date range for which statistics are to be deleted. If NULL, all entries greater than end_date are deleted.

There are no restrictions on calling PURGE_STATISTICS.

16.6.1.3.1 Exceptions

The PURGE_STATISTICS procedure may raise the following exceptions:

Name

Number

Description

missingobject

-23308

Object oname does not exist

missingschema

-23306

Schema sname does not exist

16.6.1.3.2 Example

This example purges all records collected for the products table between 01-Jan-1998 and 01-Feb-1998:

	BEGIN
		DBMS_REPCAT.PURGE_STATISTICS(
			sname		=> 'SPROCKET',
			oname           => 'PRODUCTS',
			start_date           => '01-JAN-1998',
			end_date           => '01-FEB-1998');
	END;


Previous: 16.5 Assigning Resolution Methods with DBMS_REPCATOracle Built-in PackagesNext: 17. Deferred  Transactions and Remote Procedure Calls
16.5 Assigning Resolution Methods with DBMS_REPCATBook Index17. Deferred Transactions and Remote Procedure Calls

The Oracle Library Navigation

Copyright (c) 2000 O'Reilly & Associates. All rights reserved.

Library Home Oracle PL/SQL Programming, 2nd. Ed. Guide to Oracle 8i Features Oracle Built-in Packages Advanced PL/SQL Programming with Packages Oracle Web Applications Oracle PL/SQL Language Pocket Reference Oracle PL/SQL Built-ins Pocket Reference