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

Oracle Built−in Packages- P150 pptx

5 156 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,34 KB

Nội dung

VARCHAR2 NUMBER DATE RAW NCHAR (Oracle8 only) NVARCHAR2 (Oracle8 only) Parameters are summarized in the following table. Name Description gname Name of the replication group to which priority group pgroup belongs pgroup Priority group to which new value and priority are being added value Literal value that is being assigned added to pgroup sname (Oracle7 only) Not used 16.3.4.2.1 Exceptions The DROP_PRIORITY_<datatype> procedure may raise the following exceptions: Name Number Description missingprioritygroup −23336 Priority group pgroup does not exist missingrepgroup −23373 Replication group gname does not exist nonmasterdef −23312 Calling site is not the master definition site paramtype −23325 Datatype of value is not the same as the datatype for priority group pgroup 16.3.4.2.2 Restrictions You must call DROP_PRIORITY_<datatype> from the master definition site. 16.3.4.2.3 Example You can specify the member to be dropped by its data value rather than its priority (as was done with DROP_PRIORITY). In the following example, we drop the member of the PG_PRODUCTION_STATUS priority group whose value is CONCEPT: BEGIN DBMS_REPCAT.DROP_PRIORITY_VARCHAR2( gname => 'SPROCKET', pgroup => 'PG_PRODUCTION_STATUS', value => 'CONCEPT'); END; As with DROP_PRIORITY, this change takes effect after DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT has been run for any object in the replication group. 16.2 Column Groups with DBMS_REPCAT 16.4 Site Priority Groups with DBMS_REPCAT [Appendix A] What's on the Companion Disk? 16.3.4 Dropping Priorities from a Priority Group 736 Copyright (c) 2000 O'Reilly & Associates. All rights reserved. [Appendix A] What's on the Companion Disk? 16.3.4 Dropping Priorities from a Priority Group 737 Chapter 16 Conflict Resolution 16.4 Site Priority Groups with DBMS_REPCAT The site priority group technique resolves conflicts by accepting the data that originated from the site with the highest priority. 16.4.1 About Site Priority Groups The procedures for creating and maintaining site priority groups are almost completely analogous to those used for priority groups. The similarity arises because a site priority group is actually a special case of a priority group in which the range of data values is the range of global names in the replicated environment. In fact, Oracle stores the information about priority groups and site priority groups in the same data dictionary views (DBA_REPPRIORITY_GROUP and DBA_REPPRIORITY). However, unlike in the priority group technique, you should base site priority group rankings on your confidence in the data from each site, as opposed to the business rules associated with a workflow. Use the following programs to maintain site priority groups: DBMS_REPCAT.ADD_SITE_PRIORITY_SITE DBMS_REPCAT.ALTER_SITE_PRIORITY DBMS_REPCAT.ALTER_SITE_PRIORITY_SITE DBMS_REPCAT.COMMENT_ON_SITE_PRIORITY DBMS_REPCAT.DEFINE_SITE_PRIORITY DBMS_REPCAT.DROP_SITE_PRIORITY DBMS_REPCAT.DROP_SITE_PRIORITY_SITE 16.4.2 Creating, Maintaining, and Dropping Site Priorities DBMS_REPCAT's DEFINE_SITE_PRIORITY and DROP_SITE_PRIORITY procedures allow you to create and drop site priorities. Use the COMMENT_ON_SITE_PRIORITY procedure to maintain the comment on the site priority. 16.4.2.1 The DBMS_REPCAT.DEFINE_SITE_PRIORITY procedure The DEFINE_SITE_PRIORITY procedure creates a site priority group. You can add sites to this group later. Specifications differ for Oracle7 and Oracle8 as follows. Here is the Oracle7 specification: PROCEDURE DBMS_REPCAT.DEFINE_SITE_PRIORITY (gname IN VARCHAR2 := '', name IN VARCHAR2, comment IN VARCHAR2 := NULL, sname IN VARCHAR2 := ''); Here is the Oracle8 specification: 738 PROCEDURE DBMS_REPCAT.DEFINE_SITE_PRIORITY (gname IN VARCHAR2 := '', name IN VARCHAR2, comment IN VARCHAR2 := NULL) Parameters are summarized in the following table. Name Description gname Name of the replication group containing the site priority group name Name of the site priority group comment Comment, visible in DBA_REPPRIORITY_GROUP data dictionary view sname (Oracle7 only) Not used 16.4.2.1.1 Exceptions The DEFINE_SITE_PRIORITY procedure may raise the following exceptions: Name Number Description duplicateprioritygroup −23335 Site priority group name already exists missingrepgroup −23373 Replication group gname does not exist nonmasterdef −23312 Calling site is not the master definition site 16.4.2.1.2 Restrictions You must call DBMS_REPCAT.DEFINE_SITE_PRIORITY from the master definition site. 16.4.2.1.3 Example The following call creates a site priority group called SP_NORTH_AMERICA: BEGIN DBMS_REPCAT.DEFINE_SITE_PRIORITY( gname => 'SPROCKET', name => 'SP_NORTH_AMERICA', comment => 'Site Priority for North American Locations'); END; These changes take effect after the next call to DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT for an object in the SPROCKET replication group. 16.4.2.2 The DBMS_REPCAT.DROP_SITE_PRIORITY procedure The DROP_SITE_PRIORITY procedure drops an existing site priority group that is no longer in use. Specifications differ for Oracle7 and Oracle8 as follows. Here is the Oracle7 specification: PROCEDURE DBMS_REPCAT.DROP_SITE_PRIORITY (gname IN VARCHAR2 := '', name IN VARCHAR2, sname IN VARCHAR2 := ''); Here is the Oracle8 specification: PROCEDURE DBMS_REPCAT.DROP_SITE_PRIORITY (gname IN VARCHAR2 := '', [Appendix A] What's on the Companion Disk? 16.4.2 Creating, Maintaining, and Dropping Site Priorities 739 name IN VARCHAR2) Parameters are summarized in the following table. Name Description gname Name of the replication group containing the site priority group name Name of the site priority group sname (Oracle7 only) Not used WARNING: As with the DROP_PRIORITY_GROUP procedure, do not attempt to drop a site priority group that is acting as an UPDATE conflict resolution handler for a column group. First, use DROP_UPDATE_RESOLUTION to drop the conflict handler for the column group. 16.4.2.2.1 Exceptions The DROP_SITE_PRIORITY procedure may raise the following exceptions: Name Number Description missingrepgroup −23373 Replication group gname does not exist nonmasterdef −23312 Calling site is not the master definition site referenced −23332 Site priority group is used by existing conflict resolution method 16.4.2.2.2 Restrictions You must call DBMS_REPCAT.DROP_SITE_PRIORITY from the master definition site. 16.4.2.2.3 Example The following example shows how to drop a site priority group that is no longer in use: BEGIN DBMS_REPCAT.DROP_SITE_PRIORITY( gname => 'SPROCKET', name => 'SP_NORTH_AMERICA'); END; 16.4.2.3 The DBMS_REPCAT.COMMENT_ON_SITE_PRIORITY procedure The COMMENT_ON_SITE_PRIORITY procedure creates or replaces the comment field in the DBA_REPPRIORITY_GROUP data dictionary view for the specified site priority group. Specifications differ for Oracle7 and Oracle8 as follows. Here is the Oracle7 specification: PROCEDURE DBMS_REPCAT.COMMENT_ON_SITE_PRIORITY (gname IN VARCHAR2 := '', name IN VARCHAR2, comment IN VARCHAR2, sname IN VARCHAR2 := ''); Here is the Oracle8 specification: PROCEDURE DBMS_REPCAT.COMMENT_ON_SITE_PRIORITY (gname IN VARCHAR2 := '', name IN VARCHAR2, [Appendix A] What's on the Companion Disk? 16.4.2 Creating, Maintaining, and Dropping Site Priorities 740 . priority group. You can add sites to this group later. Specifications differ for Oracle7 and Oracle8 as follows. Here is the Oracle7 specification: PROCEDURE DBMS_REPCAT.DEFINE_SITE_PRIORITY (gname. existing site priority group that is no longer in use. Specifications differ for Oracle7 and Oracle8 as follows. Here is the Oracle7 specification: PROCEDURE DBMS_REPCAT.DROP_SITE_PRIORITY (gname IN. dictionary view for the specified site priority group. Specifications differ for Oracle7 and Oracle8 as follows. Here is the Oracle7 specification: PROCEDURE DBMS_REPCAT.COMMENT_ON_SITE_PRIORITY (gname

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