Skip to content
English
  • There are no suggestions because the search field is empty.

Setting Up K1 Replication

Search

Setting Up K1 Replication

Follow the steps below to set up Replication for a new track.

  1. 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.
  2. Run 2 truncate scripts (both located under the Replication category in ZenDesk)
    1. Track Data
    2. Financial Data
  3. In the Database copied over, update LocationID setting in ControlPanel
  4. Ensure that the following settings in the ControlPanel are set to true
    1. ReplicateCustomerInfo
    2. ReplicateFB_Customer
  5. 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
  6. Add all K1 IP addresses into the new track's SP_Services, along with 127.0.0.1 and its own public IP
  7. 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
    1. insert into clubspeedv8.dbo.locations(locationid,locationname,ipaddress,timeoutMS)
      values(LocationID,'K1 Track','licensename.clubspeedtiming.com','5000')
  8. Values to replace in the above script:
    1. LocationID – Match to what you inserted into the LocationID setting in the ControlPanel of the new location
    2. K1 Track – Add the name of the new K1 track
    3. licensename.clubspeedtiming.com – Change the licensename part to the new track’s sub-domain
  9. 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)

  1. Set up the replication task in the Task Scheduler
    1. Setting Up Task Scheduler
  2. Setup RPM Recalc
    1. Setup Instructions Here
  3. Setup the scheduled task for RPMRecalc.exe to run every night at 12:00am
  4. 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. 

Related Articles