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 (or three if there's a second target database, excluded from the discussion below).
Extents may be added to both source and target database using "
PROSTRCT add" utilities while Replication is enabled.
F
or pre OpenEdge 10.1A versions, or offline extent additions, refer to Article:
To add extents online to replication enabled database:Adding extents to the source database does not automatically add them to the target database(s).
- Since the introduction of online utilities in OpenEdge 10.1A, it is no longer necessary to shut down the source database to add extents.
- Since OpenEdge 10.1B extents can be added online to a target replication enabled database
- Create a structure file (newdbname.st) that describes only the needed extents for both databases
- Add the extents online against the source and the target databases with: PROSTRCT addonline dbname newdbname.st
- Please pay special attention to the caveats listed below.
To add extents online to replication enabled database after exhausting space:A situation may arise where
the source database has crashed having exceeded the 2GB limit on the last extent in the given Area or run out of diskspace.
- 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.
- Any transaction activity that occurs 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 and specifically new extents need to be added to the target database offline to ensure that it can expand with the source database.
Steps:
Assuming:
- The source database is still shut down, and
- The target database has the same database structure as the source database.
1a) Shut down the target database:
$ proshut target -by
1b) Restart the source database. 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 current "source.st" in Step 2 above, describing only the needed additional extent(s) . For further information on how to create structure files please refer to the Documentation below or contact your local Technical Support.
4.) Add the new extents online to the source database:
$ prostrct addonline source new.st
Caveats: Pay special attention to what
type of extents are being added before proceeding to Step 5 below.
a.) If these are
new Storage Areas being added, you will be prompted with a reminder:
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)
In the Replication context, these new Storage Areas need to be added to the target database(s) before
any AI notes relating to these new Areas are applied to the target database.
Adding new Areas usually entails complementary changes to the Application Schema. Ensure that the new Area is added to the target database prior to applying the .df to source database.
b.) If these are
new Data extents to existing Storage Areas, ensure that at these extents are added to the target database, or that the
sum of data extent sizes on the source database for that Area are less-than-or-equal-to the sum of data extent sizes on the target for the same Storage Area.
c.) If these are
Before-image extents these may be added online to the source database, but will not be able to add to the target database. Adding bi extents to the target database will fail with:
You must remove the variable length BI extent before adding additional BI extent(s). (8225)
prostrct add FAILED. (12867)
In this situation, 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 current bi size on target is exceeded at startup when for example largefiles are not enabled or runs out of diskspace.
Alternatively the target database baseline will have to be re-created. There are no plans to allow the bi to be truncated against a replicated target database which is required before being able to add bi extents to a database. This is because in order to maintain the synchronization between a source and its target database, the target database cannot be changed by any process other than the Replication Agent. For this reason, it is advisable to always create the target database baseline with more bi space than the source database for catching exactly these circumstances.
d.) If these are
After-image extents, it is unlikely that these are also needed to be added to the target database, but check if the target is also enabled for ai and in need of additional ai files.
Since this Article specifically relates to Replication, one of the most likely reasons for needing to add AI extents is because all the current source database ai extents are LOCKED. New AI extents will get added to the end of the current
extent list, which is not necessarily the end of the
sequence list. In which case, it is highly likely that the source database will have to be momentarily shutdown to run the 'PROSTRCT REORDER' command. Refer to Article:
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, fixed in later releases. Please refer to Articles:
5.) Add the new extents offline 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:
Adding Extents online or offline (PROSTRCT ADD/ADDONLINE):
- New Storage Areas and new Extents on existing Storage Areas, can be added online to the source database since OpenEdge 10.1A+, but offline to the target database pre OpenEdge 10.1B.
- 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+.
- When considering whether to add extents either online or offline, please first review Article Why does prostrct addonline check connected users?
Removing Extents (PROSTRCT REMOVE):
- Any Storage Area/Extent type cannot be removed online only offline.
- Any Storage Area/Extent type cannot be removed on the target database when replication is enabled, as the before-image file needs to first be truncated before removing extents which is not allowed. The target database will need to be re-baselined after removing extents offline on the source database.
- After-Image extents cannot be removed on either the source or the target replication enabled database while after-imaging is active.
- For the source database, this would mean having to disable replication.
- For the target, only after-imaging would need to be disabled prior to removing AI extents.
Special Case: BI extents on replication target:
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.