1. Trang chủ
  2. » Công Nghệ Thông Tin

Oracle Built−in Packages- P154 ppt

5 69 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 91,71 KB

Nội dung

PROCEDURE DBMS_REPCAT.DROP_UNIQUE_RESOLUTION (sname IN VARCHAR2, oname IN VARCHAR2, constraint_name IN VARCHAR2, sequence_no IN NUMBER) ; PROCEDURE DBMS_REPCAT.DROP_DELETE_RESOLUTION (sname IN VARCHAR2, oname IN VARCHAR2, sequence_no IN NUMBER) ; Parameters are summarized in the following table. Name Description sname Name of the schema containing the replicated schema. Defaults to current user. oname Name of the replicated table. column_group Column group for which the conflict resolution method is defined. constraint_name For procedure DROP_UNIQUE_RESOLUTION only. Name of the constraint name or unique index for which the conflict resolution method is defined. sequence_no Number indicating when this conflict resolution method is applied relative to other conflict resolution methods defined for the same column group or priority group. 16.5.1.2.1 Exceptions The DROP_<conflicttype>_RESOLUTION procedure may raise the following exceptions: Name Number Description missingobject −23308 Table oname does not exist in the replication group missingschema −23306 Schema sname does not exist nonmasterdef −23312 Calling site is not the master definition site 16.5.1.2.2 Restrictions Note these restrictions on calling DROP_<conflicttype>_RESOLUTION: • You must call this procedure from the master definition site. • After this call, you must generate replication support for the table passed to oname. 16.5.1.2.3 Example In this example we drop the delete handler (created in a previous example) from the products table: BEGIN DBMS_REPCAT.DROP_DELETE_RESOLUTION( sname => 'SPROCKETS', oname => 'PRODUCTS', sequence_no => 1); END; [Appendix A] What's on the Companion Disk? 16.5.1 About Resolution Methods 756 16.5.1.3 The DBMS_REPCAT.COMMENT_ON_<conflicttype>_RESOLUTION procedure You can use the COMMENT_ON_<conflicttype>_RESOLUTION procedure to create or replace a comment for a given resolution type. You can see this comment in the DBA_REPRESOLUTION data dictionary view. Following are the specifications for the three values of <conflicttype> (UPDATE, UNIQUE, DELETE): PROCEDURE DBMS_REPCAT.COMMENT_ON_UPDATE_RESOLUTION (sname IN VARCHAR2, oname IN VARCHAR2, column_group IN VARCHAR2, sequence_no IN NUMBER, comment IN VARCHAR2); PROCEDURE DBMS_REPCAT.COMMENT_ON_UNIQUE_RESOLUTION (sname IN VARCHAR2, oname in VARCHAR2, constraint_name IN VARCHAR2, sequence_no IN NUMBER, comment IN VARCHAR2) ; PROCEDURE DBMS_REPCAT.COMMENT_ON_DELETE_RESOLUTION (sname IN VARCHAR2, oname IN VARCHAR2, sequence_no IN NUMBER, comment IN VARCHAR2) ; Parameters are summarized in the following table. Name Description sname Name of the schema to which object oname belongs oname Name of the object column_group Name of column group for which conflict resolution method is defined constraint_name Name of unique constraint the method resolves (COMMENT_ON_UNIQUE_RESOLUTION only) sequence_no Sequence number associated with the resolution method comment Comment 16.5.1.3.1 Exceptions The COMMENT_ON_<conflicttype>_RESOLUTION procedure may raise the following exceptions: Name Number Description missingobject −23308 Object oname does not exist missingresolution −23343 No resolution method exists for column_group and sequence_no nonmasterdef −23312 Calling site is not the master definition site 16.5.1.3.2 Restrictions Note the following restrictions on calling COMMENT_ON_<conflicttype>_RESOLUTION: • You must call this procedure from the master definition site. • After this call, you must generate replication support for the table passed to oname. [Appendix A] What's on the Companion Disk? 16.5.1 About Resolution Methods 757 16.5.1.3.3 Example This example replaces the comment on the unique resolution method created in a previous example: BEGIN DBMS_REPCAT.COMMENT_ON_UNIQUE_RESOLUTION( sname => 'SPROCKET', oname => 'PRODUCTS', constraint_name => 'PK_PRODUCTS', sequence_no => 1, comment => 'New comment added on '||sysdate); END; 16.4 Site Priority Groups with DBMS_REPCAT 16.6 Monitoring Conflict Resolution with DBMS_REPCAT Copyright (c) 2000 O'Reilly & Associates. All rights reserved. [Appendix A] What's on the Companion Disk? 16.5.1 About Resolution Methods 758 Chapter 16 Conflict Resolution 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 759 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); [Appendix A] What's on the Companion Disk? 16.6.1 About Monitoring 760 . Methods 758 Chapter 16 Conflict Resolution 16.6 Monitoring Conflict Resolution with DBMS_REPCAT Oracle can audit successful calls to your conflict resolution handlers so that you have insight

Ngày đăng: 07/07/2014, 00:20