Consultor Eletrônico



Kbase P125387: What are the rules for adding extents online to replicated databases?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   22/03/2010
Status: Verified

GOAL:

What are the rules for adding extents online to replicated databases?

GOAL:

Can New Storage Areas be added online to replication enabled database?

GOAL:

Can more bi extents be added online to the target replication enabled database?

GOAL:

Can extents be added online to existing Storage Areas in the replication baseline?

FACT(s) (Environment):

OpenEdge 10.1x
Fathom Replication
OpenEdge Replication

FIX:

The actions needed are essentially the same as would "normally" need to be taken without Fathom Replication in the picture. With Fathom Replication, there are two databases to consider.

For example, a situation may arise where the source database has crashed having exceeded the 2GB limit on the last extent in the given area. The source database may then re-start, because it is only /when/ updates are committed where we need to extend this last extent, and cannot, therefore crash again. Anything that 'happens' on the source database is replicated to the target database, this means that the corrective actions described below need to be performed on /both/ databases before they are re-started.

In this case new extents need to be added to both the databases in order to allow for further data expansion. Extents may be added to both source and target database using "prostrct add" utilities while Replication is enabled. Since the introduction of online utilities in OpenEdge 10.1A, it is no longer necessary to shut the source database to add extents. Please refer to Progress Solution P119506, "What are the rules for adding extents to replicated databases?" for pre OpenEdge 10.1A versions, or offline extent additions.

To do this, restart the source database and shut down the Target database, create a .st file that describes the needed extents for both databases, run prostrct addonline against the source, prostrct add against the target, then restart the target database. Please pay special attention to the caveats listed below.

Assuming that:
the source database is still shut down, and
the target database has the same database structure as the source database.

Steps:

1a) Shut down the target database:
$ proshut target -by
1b) restart the source database. Note, depending on the current situation surrounding this event, this will at least allow users to read the database until the extent is added.
$ proserve source <..parameters..> -DBService replserv

2.) Obtain the current structure from the control area of the SOURCE database:
$ prostrct list source source.st

3.) Create a new structure file "new.st" based on the "source.st" in Step 2 above describing the needed additional extent(s). For more information on how to create structure files please refer to the Documentation below or contact your local Technical Support.

4.) Add the new extents to the source database:
$ prostrct addonline source new.st

NOTE on what TYPE of extents are being added for Step 5 below:

a.) if these are new Storage Areas being added, you will be prompted:
Adding a new area online with ai enabled will cause the roll forward utility to fail unless the corresponding areas are also added to the target database. (13705)

b.) if these are data extents to existing Storage Areas, similarly ensure that at least these extents are also added to the target database

c.) if these are bi extents, these may be added online to the source database, but will not be able to add to the target database.
You must remove the variable length BI extent before adding additional BI extent(s). (8225)
prostrct add FAILED. (12867)
Essentially, either the bi file on the source needs to be truncated after adding bi extents, which free's up the bi clusters on the target at next start, but does not reduce the bi size and may fail if the bi on target is exceeded at startup. Alternatively the target database baseline will have to be re-created. It is advisable to always cr.eate the target database with more bi space than the source database for catching exactly these circumstances.

c.) if these are after-image extents, it is unlikely that these are also needed to be added to the target database, but check. The ai extents will get added to the end of the current EXTENT list, not necessarily to the end of the sequence list. It is highly likely that the source database will have to be momentarily shutdown to run the 'prostrct reorder' command. Please refer to Solution P71887, "Unable to switch to new ai extent after adding a new ai extent to the database" But most importantly, since this solution specifically relates to Replication, one of the most likely reasons for needing to add extents is because all the current ai extents are LOCKED. Non-withstanding the fact that extent scoping is an important part of the initial planning for exactly these scenarios, there are several known issues which will cause critical failure in the OpenEdge 10.1x release. Please refer to Solutions:
P119375, "Adding Areas online fails with error 12867"
P123873, "Prostrct addonline hangs if all AI extents are LOCKED and busy extent is full"

5.) Add the new extents to the target database:
$ prostrct add target new.st

6.) Start the target database:
$ proserve target <..parameters..> -DBService replagent

7.) Re-start the replication server against source database (if it is not still running):
$ dsrutil source -C restart server

Summary of add extent rules:

- Although the adding extents online functionality was introduced in OpenEdge 10.1A, adding extents online to a TARGET replication enabled database is available from OpenEdge 10.1B++.
So new Storage Areas and new Extents on existing Storage Areas, can be added online to the source database since OE 10.1A+, but offline to the target database pre OE 10.1B. When considering to add extents either online or offline, please first review Solution P120280, "Why does prostrct addonline check connected users?"
- Storage Areas/ Extents cannot be removed on the TARGET database when replication is enabled, as the before-image file needs to be truncated before removing extents. Storage Areas/ Extents cannot be removed ONLINE against the source database only offline.
- After-Image extents cannot be removed on either the source or the target replication enabled database while after-imaging is active (ie replication enabled)
- New before-image (bi) extents cannot be added to the target database, because by definition, the last bi extent on a database must be a variable extent. Since the variable BI extent first needs to removed to add additional bi extents, the operation will fail. It is therefore recommended to add more fixed bi extents to the target database than the source database when initializing the replication baseline..