Oracle7 Server Distributed Systems Volume II: Replicated Data

Contents Index Home Previous Next

Using Site Priority

Site priority is a specialized form of priority groups. Thus, many of the procedures associated with site priority behave similarly to the procedures associated with priority groups.

If you have chosen to use the site priority method to resolve update conflicts, you must first create a site priority group before you can add this conflict resolution method for a column group. Creation of a site priority group consists of two steps.

In general, you will need only one site priority group for a replicated object group. This site priority group can be used by any number of replicated tables.

The next several sections describe how to manage site priority groups.

Creating a Site Priority Group

Use the DEFINE_SITE_PRIORITY procedure in the DBMS_REPCAT package to create a new site priority group for a replicated object group, as shown in the following example:

DBMS_REPCAT.DEFINE_SITE_PRIORITY(
	gname 	=> 	'acct', 
	name 	=> 	'site');

This example creates a site priority group called SITE for the ACCT object group.

You must call this procedure from the master definition site. The necessary support for site priority is not generated until you call GENERATE_REPLICATION_SUPPORT for any table in the object group (since there is no group-level equivalent for this command).

Additional Information: The parameters for the DEFINE_SITE_PRIORITY procedure are described in Table 12 - 113, and the exceptions are listed in Table 12 - 114.

Adding a Site to the Group

Use the ADD_SITE_PRIORITY_SITE procedure in the DBMS_REPCAT package to add a new site to a site priority group, as shown in the following example:

DBMS_REPCAT.ADD_SITE_PRIORITY_SITE(
	gname 	=> 	'acct', 
	name 	=> 	'site',
	site 	=> 	'hq.widgetek.com', 
	priority 	=> 	100);

This example adds the HQ site to the SITE group and sets its priority level to 100.

Note: The highest priority is given to the site with the highest priority value. Priority values do not have to be consecutive integers.

You must call this procedure from the master definition site. The site is not added to the group until you call the procedure GENERATE_REPLICATION_SUPPORT for any table in the object group (since there is no group-level equivalent for this command).

Additional Information: The parameters for the ADD_SITE_PRIORITY_SITE procedure are described in Table 12 - 68, and the exceptions are listed in Table 12 - 69.

Altering the Priority Level of a Site

Use the ALTER_SITE_PRIORITY procedure in the DBMS_REPCAT package to alter the priority level associated with a given site, as shown in the following example:

DBMS_REPCAT.ALTER_SITE_PRIORITY(
	gname 	=> 	'acct', 
	name 	=> 	'site',
	old_priority 	=> 	100, 
	new_priority 	=> 	200);

This example changes the priority level of a site in the SITE group from 100 to 200.

Note: The highest priority is given to the site with the highest priority value. Priority values do not have to be consecutive integers.

You must call this procedure from the master definition site. The priority level is not actually updated until you call the procedure GENERATE_REPLICATION_SUPPORT for any table in the object group (since there is no group-level equivalent for this command).

Additional Information: The parameters for the ALTER_SITE_PRIORITY procedure are described in Table 12 - 80, and the exceptions are listed in Table 12 - 81.

Altering the Site Associated with a Priority Level

Use the ALTER_SITE_PRIORITY_SITE procedure in the DBMS_REPCAT package to alter the site associated with a given priority level, as shown in the following example:

DBMS_REPCAT.ALTER_SITE_PRIORITY_SITE(
	gname 	=> 	'acct', 
	name 	=> 	'site', 
	old_site 	=> 	'hq.widgetek.com', 
	new_site 	=> 	'hq.widgetworld.com);

This example changes the global database name of the HQ site to HQ.WIDGETWORLD.COM, while its priority level remains the same.

You must call this procedure from the master definition site. The site name is not actually updated until you call the procedure GENERATE_REPLICATION_SUPPORT for any table in the object group (since there is no group-level equivalent for this command).

Additional Information: The parameters for the ALTER_SITE_PRIORITY_SITE procedure are described in Table 12 - 82, and the exceptions are listed in Table 12 - 83.

Dropping a Site by Site Name

Use the DROP_SITE_PRIORITY_SITE procedure in the DBMS_REPCAT package to drop a given site, by name, from a site priority group, as shown in the following example:

DBMS_REPCAT.DROP_SITE_PRIORITY_SITE(
	gname 	=> 	'acct', 
	name 	=> 	'site',
	site 	=> 	'hq.widgetek.com');

This example drops the HQ site from the SITE group.

You must call this procedure from the master definition site. The site is not actually removed from the group until you call the procedure GENERATE_REPLICATION_SUPPORT for any table in the object group (since there is no group-level equivalent for this command).

Additional Information: The parameters for the DROP_SITE_PRIORITY_SITE procedure are described in Table 12 - 133, and the exceptions are listed in Table 12 - 134.

Dropping a Site by Priority Level

Use the DBMS_REPCAT.DROP_PRIORITY procedure described [*] to drop a site from a site priority group by priority level.

Dropping a Site Priority Group

Use the DROP_SITE_PRIORITY procedure in the DBMS_REPCAT package to drop a site priority group for a given replicated object group, as shown in the following example:

DBMS_REPCAT.DROP_SITE_PRIORITY(
	gname 	=> 	'acct', 
	name 	=> 	'site');

In this example, SITE is no longer a valid site priority group.

Attention: Before calling this procedure, you must call the DROP_UPDATE_RESOLUTION procedure for any column groups in the replicated object group that are using the SITE PRIORITY conflict resolution method with this site priority group. You can determine which column groups are affected by querying the RepResolution view.

You must call this procedure from the master definition site. The site priority group is not actually dropped until you call the procedure GENERATE_REPLICATION_SUPPORT for any table in the object group (since there is no group-level equivalent for this command).

Additional Information: The parameters for the DROP_SITE_PRIORITY procedure are described in Table 12 - 131, and the exceptions are listed in Table 12 - 132.


Contents Index Home Previous Next