Setting Up K1 Replication
Setting Up K1 Replication
Follow the steps below to set up Replication for a new track.
- Grab the latest version of the database and ClubSpeed folders from another location; best to inquire a manager as to what track will be better for the location you’re currently building in the event they have more than two locations.
- Run 2 truncate scripts (both located under the Replication category in ZenDesk)
- In the Database copied over, update LocationID setting in ControlPanel
- Ensure that the following settings in the ControlPanel are set to true
- ReplicateCustomerInfo
- ReplicateFB_Customer
- Add IP address of new server into all K1 locations by opening IIS and going to Default Web Site > SP_Services and opening up the IP/Domain Restrictions
- Add all K1 IP addresses into the new track's SP_Services, along with 127.0.0.1 and its own public IP
- Add the new location’s public IP address to ALL location servers (including new location) by going into the Database, ClubSpeedV8 > Locations table. You can use the script below and adjust to the track you’re modifying
- *NOTE: If the sub-domain is already set up to their public IP, you can insert the sub-domain instead of the IP in the Locations table
- insert into clubspeedv8.dbo.locations(locationid,locationname,ipaddress,timeoutMS)
values(LocationID,'K1 Track','licensename.clubspeedtiming.com','5000')
- Values to replace in the above script:
- LocationID – Match to what you inserted into the LocationID setting in the ControlPanel of the new location
- K1 Track – Add the name of the new K1 track
- licensename.clubspeedtiming.com – Change the licensename part to the new track’s sub-domain
- Run the following script at each of the other locations, make sure to update the licensename.clubspeedtiming.com to the exact URL of that track:
- For Trigger logs:
DECLARE @LocationID int
SELECT @LocationID = settingvalue
From ControlPanel
where SettingName = 'LocationID'
insert into clubspeedv8.dbo.ReplicateFailed(CustID,TableName,IPAddress,LastUpdated,Deleted)
select custid, Tablename, 'licensename.clubspeedtiming.com', lastupdated, 0 from clubspeedv8.dbo.triggerlogs
where LastUpdated >= DATEADD(DAY, -3, GETDATE()) and CustID between (@locationID * 1000000) and ((@LocationID + 1) * 1000000)
- For Memberships:
DECLARE @LocationID int
Insert into clubspeedv8.dbo.ReplicateMembershipsFailed (CustID, MembershipTypeID, IsDeleted, IPAddress, LastUpdated, Deleted)
SELECT CustID, MembershipTypeID, IsDeleted, 'trackname.clubspeedtiming.com', LastUpdated, 0
From TriggerMemberships
Where LastUpdated >= DATEADD(DAY, -3, GETDATE()) and CustID between (@locationID * 1000000) and ((@LocationID + 1) * 1000000)
- Set up the replication task in the Task Scheduler
- Setup RPM Recalc
- Setup the scheduled task for RPMRecalc.exe to run every night at 12:00am
- Run the customer signature program, Located in this Article here: https://clubspeed.freshdesk.com/support/solutions/articles/47001101313-setting-up-replication Ensure you have the right location by going into the locations table in SQL.