Catching Up A Track On Replication
Catching Up A Track On Replication
Overview
Most commonly when a new location is added to an organization, they were started with a copy of a database from an existing location. When the new location comes online, there will be a gap of records they are missing to be considered up to date.
To bring this track in sync with the other locations, follow these steps:
- Ensure replication is enabled for the new track
- Prompt each existing location to sync the missing records to the new location
1. Ensure replication is enabled for the new track
You can follow our existing guide to enable replication. This will begin syncing all new records across.
2. Prompt each existing location to sync the missing records to the new location
We now need to sync over the "missing" records since the new track's database was installed. Determine when the database was last up to date. This will typically be the date of the backup used to create the database. It's ok to go a little older than you need (it will just resync already sync'd records).
2a. Ensure CS_Replication Stored Procedures are up to date
Older versions of Club Speed did not attempt to limit how many records were sync'd. This is ok when you are just syncing a few at a time, however we will be potentially sync'ing thousands.
Execute the two attached SQL statements on ClubSpeedV8 to ensure we have some limiting on how many records are processed each time CS_Replication.exe is run. Don't run for Team Sport locations. If you need to update the stored procedure, copy and past the stored procedure from 1 location that is working to the new location (for detailed steps, see a level 2 support personnel).
The Stored Procedure will include "LIMIT(500)" in the table(0) and table(2) queries if it is the updated one.
2b. Put the records in the replication Queue
At each existing location, run the script below, setting your SyncStartDate variable to when you want the "catchup" to start and your IPtoReplicateTo to the track's IP or DNS name.
Any records after SyncStartDate will be pushed into the "ReplicateFailed" and "ReplicateMembershipsFailed" tables which is the "retry queue". The records will have a "Deleted" column of 0 meaning that they have not replicated yet. When they DO replicate, "Deleted" will be set to 1 which means the record has replicated. Also, remember to change the DB to ClubspeedV8 before executing the query.
sql (943 Bytes) sql (1.26 KB) sql (1.77 KB)