Table of Contents Previous Next


7 Common Operations : 7.5 Managing History

Shadow Table History. Records of each change (insert, update, or delete) that was applied to each target table during synchronization replications using the trigger-based method. There is no shadow table history for synchronization replications using the log-based method.
Replication History. Summary records of each replication.
Event History. Records of each change that was applied to various control schema tables.
Note: A configuration option is available to force shadow table history cleanup after every synchronization replication. See Section 10.4.1.9 for information on this option.
Note: The cleanup of certain processed rows in the shadow tables may be delayed beyond the next scheduled cleanup, but will eventually be removed in subsequent cleanup events.
For Oracle only: For scheduling of shadow table history cleanup on an Oracle publication database, the Oracle DBMS_JOB package on the Oracle database server is used. The time you specify in the schedule for cleanup is passed and stored in DBMS_JOB without time zone translation.
For SQL Server only: For scheduling of shadow table history cleanup on a SQL Server publication database, SQL Server Agent is used on the host running SQL Server. The time you specify in the schedule for cleanup is passed to SQL Server Agent without time zone translation. The effect is the same as described for Oracle in the preceding example.
For Postgres only: For scheduling of shadow table history cleanup on a Postgres publication database, the Quartz scheduler is used on the host running the publication server based on the location of the controller database.
For Oracle only: The cleanup job on an Oracle publication database runs independently of the publication server, so the cleanup job will run regardless of whether or not the publication server is running.
For Postgres only: The publication server must be running in order for the cleanup job to run on a Postgres publication database.
Note: An alternative to using the Quartz scheduler when Postgres is the publication database, is to use pgAgent job scheduling instead. See Section 10.4.1.8 for information on how to use pgAgent job scheduling and the advantages, thereof.
Step 1: Make sure the publication server whose node is the parent of the publication database definition whose cleanup scheduling preference you want to set is running and has been registered in the xDB Replication Console you are using. See Section 5.2.1 for directions on starting and registering a publication server.
Step 2: Select the Publication Database node for which you want to set the cleanup scheduling preference.
Step 3: From the Publication menu, choose Preferences. Alternatively, click the secondary mouse button on the Publication Database node and choose Preferences. The Publication Server Preferences dialog box appears.
Step 4: In the Publication Server Preferences dialog box, uncheck the box if you do not want to run a scheduled shadow table history cleanup job. Click the OK button and skip the remaining steps.
Step 5: If you want to schedule shadow table history cleanup, make sure the Run Cleanup Job check box is selected. Select the radio button for the cleanup frequency. The frequency choices have the following meanings:
Every number of minutes/hours. Schedules shadow table history cleanup to run continuously at an interval in either minutes or hours that you specify. Select this option if there are huge volumes of updates to the publication tables during the course of the day, every day.
Every Day at hour of day. Schedules shadow table history cleanup to run once a day on the hour you choose. Select this option if updates to the publication tables are frequent enough to require more than once a week cleanup, but not needed more than once a day.
Every selected day of week at hour of day. Schedules shadow table history cleanup to run once a week on the day and at the hour you choose. Select this option if updates to the publication tables are infrequent and you do not want to run cleanup manually.
Cron Expression. Provides additional flexibility for specifying a schedule beyond the three preceding radio button choices. See appendix Section 10.4.3 for directions on writing a cron expression.
Note: A configuration option is available to force shadow table history cleanup after every synchronization replication. See Section 10.4.1.9 for information on this option.
Step 6: Click the OK button to accept the schedule.
RRST_schema_table
For Oracle only: When Oracle is the publication database, these tables are located in the publication database in the schema of the publication database user.
For SQL Server only: When SQL Server is the publication database, these tables are located in the publication database in the schema you chose during Step 5 of Section 5.1.4.2.
For Postgres only: When Postgres is the publication database, these tables are located in the publication database in schema _edb_replicator_pub.
Note: The cleanup of certain processed rows in the shadow tables may not occur during an on demand cleanup or may be delayed beyond the next scheduled cleanup, but will eventually be removed in subsequent cleanup events.
Step 1: Make sure the publication server whose node is the parent of the publication whose shadow table history you wish to clean up is running and has been registered in the xDB Replication Console you are using. See Section 5.2.1 for directions on starting and registering a publication server.
Step 2: Select the Publication node of the publication for which you want to clean up the shadow table history.
Step 3: From the Publication menu, choose Cleanup Shadow Table History. Alternatively, click the secondary mouse button on the Publication node and choose Cleanup Shadow Table History. The Cleanup Synchronization History confirmation box appears.
Step 4: Click the Yes button in the Cleanup Synchronization History confirmation box.
Step 5: Click the Yes button in response to Shadow Table’s Transaction History Removed Successfully.
Step 1: Make sure the publication server whose node is the parent of the publication whose replication history you wish to cleanup is running and has been registered in the xDB Replication Console you are using. See Section 5.2.1 for directions on starting and registering a publication server.
Step 2: Select the Publication node of the publication for which you want to clean up replication history.
Step 3: From the Publication menu, choose Cleanup Replication History. Alternatively, click the secondary mouse button on the Publication node and choose Cleanup Replication History. The Cleanup Replication History confirmation box appears.
Step 4: Click the Yes button in the Cleanup Replication History confirmation box.
Step 5: Click the Yes button in response to Replication History Has Been Removed.
Unlike shadow table history (Section 7.5.2) and replication history (Section 7.5.3), event history is neither viewable nor removable using the xDB Replication Console.
Publication server configuration option historyCleanupDaysThreshold provides the capability to designate how old the completed data must reach before its removal. The default setting is that completed data must be older than seven days before it is deleted during the daily 12 AM cleanup process.
In order to cleanup all completed event and replication history regardless of its age, set historyCleanupDaysThreshold to a value of 0, then restart the publication server. The cleanup occurs during the next scheduled 12 AM cleanup process.
See Section 10.4.1.10 for the historyCleanupDaysThreshold option.

7 Common Operations : 7.5 Managing History

Table of Contents Previous Next