Make changes to an active replication environment
Make Changes to an Active Replication Environment
This chapter contains instructions for making datbase changes, or performing system and software maintenance, on systems where SharePlex replication is active.
Contents
Change a configuration file
Change an Active Configuration File
Many procedures that change an element of the replication environment will also involve changing the SharePlex configuration file. The recommended method to modify an active configuration file is to make a copy of the file first using a new file name. For example, append the date to the file name. By copying the file first, you preserve the original file in case it is needed again or you encounter a problem with the new file. By copying the file first, you also can control when to activate the new configuration file.
In most cases, activation of an edited configuration is less time-consuming than the original activation if you do not deactivate the original configuration. The activation of the new configuration automatically deactivates the original configuration, and SharePlex only needs to analyze the new, changed, and removed objects. If you deactivate the original configuration before you activate a new one, SharePlex re-analyzes all of the objects.
To change a configuration file, see Add or Change Objects in an Active Configuration.
Add or change table specifications in an active replication configuration
Add or Change Objects in an Active Configuration
This section provides instructions for adding a supported object to replication, or changing the specifications of an object, while replication is active.
Supported databases
Oracle source
All targets
Oracle procedure
Note: To add sequences to replication, see Add Oracle Sequences to an Active Replication Configuration.
If you are using wildcards and an object that you are adding satisfies the wildcard specification, it is not necessary to add the object to the configuration file if the source is Oracle. Any new objects that match the wildcard criteria are automatically added into replication. Only add objects that must be explicitly stated by name.
Important! Do not deactivate the original configuration.
- If adding new tables, add them to the source and target (populated in both places, if applicable) to establish a synchronized initial state. Do not allow transactional access to the source table yet.
-
In sp_ctrl, issue the copy config command to make a copy of the active configuration file.
sp_ctrl> copy config filename to newname
Where: filename is the name of the active file and newname is the name of the new one.
-
Issue the edit config command to open the new configuration file in the default text editor.
sp_ctrl> edit config newname
-
Add the entries for the new tables or change existing entries.
Note: To change partitioned replication, see Change Partitioned Replication.
- Save the configuration file.
-
Activate the new configuration. This deactivates the original configuration. Only the new or changed tables are activated, so the activation should not be as long as the initial activation.
sp_ctrl> activate config newname
- Allow access to the newly added tables.
Change Partitioned Replication
You can change a horizontally partitioned or vertically partitioned replication configuration while replication is active. Both of these procedures require the reactivation of the active replication configuration, but SharePlex only locks tables that are associated with those changes.
Note: To learn more about changing a configuration file, review Change an Active Configuration File.
For more information about partitioned replication, see Configure Partitioned Replication.
Supported databases
Oracle
All targets
To change horizontally partitioned replication:
- Run sp_ctrl.
-
Issue one of the following commands to change the partition or partition scheme. For syntax and other information, see the alphabetical command listings in theSharePlex Reference Guide.
add partition |
2 |
Creates partition schemes and row partitions. |
drop partition |
2 |
Removes a row partition from a partition scheme. |
drop partition scheme |
2 |
Removes a partition scheme. |
modify partition |
2 |
Modifies a row partition of a partition scheme. |
-
If you dropped a partition scheme:
-
Copy (but do not deactivate) the active configuration file to a new file.
sp_ctrl> copy config filename to newname
-
Edit the copy to remove or change the routing map where the partition scheme was specified.
sp_ctrl> edit config filename
-
Activate the new configuration file.
sp_ctrl> activate config filename
To change vertically partitioned replication:
-
Make a copy of (but do not deactivate) the active configuration file.
sp_ctrl> copy config filename to newname
-
Edit the copy to change the appropriate column partition.
sp_ctrl> edit config filename
-
Activate the new configuration file.
sp_ctrl> activate config filename