commercebuild’s Sync Agent, which replicates data from the SQL Server used by Sage 300, relies on change tracking being enabled on the database, as well as on the tables.
For more information about change tracking on SQL Server, please see Microsoft’s guidance.
Sage 300 Database
To enable change tracking for the database, please change SAMDAT to the database in question and run the following query:
USE SAMDAT; ALTER DATABASE SAMDAT SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 3 DAYS, AUTO_CLEANUP = ON);
Sage 300 Tables
To enable change tracking on each table, first change SAMDAT to the database in question and run the following query:
USE SAMDAT; ALTER TABLE dbo.APVEN ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARCSP ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARCSPO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARCUS ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARCUSO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARGRO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARIBD ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARIBH ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARITD ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARITH ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARNAT ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.AROBL ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.AROBP ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.AROFD ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARPTP ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARRTA ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARSAP ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ARTCP ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.BKACCT ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.BKCCTYP ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.CSCOM ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.CSOPTFD ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.CSOPTFH ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICCATG ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICCUPR_CONTRACT_CATEGORY_PRICE ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICCUPR_CONTRACT_ITEM_PRICE ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICILOC ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICIOTH ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICITEM ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICITEMO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICITMC ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICITMS ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICITMTX ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICKITD ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICKITH ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICLOC ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICPRIC ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICPRICC ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICPRICP ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICPRTX ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICSEG ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICSEGV ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICUNIT ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICXLOT ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICXLOTO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.ICXSER ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OECOINO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEINVD ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEINVDO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEINVDS ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEINVH ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEINVHO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEMISC ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEMISCT ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEOFD ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEORDD ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEORDDL ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEORDDO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEORDDS ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEORDH ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEORDHO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OESHID ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OESHIDO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OESHIDS ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OESHIH ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OESHIHO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.OEVIA ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.POPORH1 ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.POPORHO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.POPORL ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.POPORLO ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.TXAUTH ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.TXCLASS ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.TXGRP ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE dbo.TXRATE ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON);
Sage X3 Database
To enable change tracking for the database, please change SAMDAT to the database in question and run the following query:
USE SAMDAT; ALTER DATABASE SAMDAT SET ALLOW_SNAPSHOT_ISOLATION ON; ALTER DATABASE SAMDAT SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 3 DAYS, AUTO_CLEANUP = ON);
Sage x3 Tables
To enable change tracking on each table, change the database from SAMDAT to the database in question and replace schema SEED with x3 folder or company name that is used for the live webstore:
USE SAMDAT; ALTER TABLE SEED.ACODNUM ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.ADOVAL ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.APLSTD ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.ATABDIV ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.BANK ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.BOM ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.BOMD ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.BPADDRESS ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.BPARTNER ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.BPCARRIER ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.BPCCATEG ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.BPCINVLIG ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.BPCUSTMVT ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.BPCUSTOMER ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.BPDLVCUST ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.BPSUPPLIER ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.COMPANY ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.FACILITY ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.GACCDENCOD ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.GACCDUDATE ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.ITMBPS ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.ITMCATEG ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.ITMCOST ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.ITMFACILIT ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.ITMMASTER ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.ITMMVT ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.ITMSALES ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.PORDER ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.PORDERQ ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.PRICSTRUCT ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.SALESREP ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.SDELIVERY ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.SDELIVERYD ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.SFOOTINV ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.SINVOICE ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.SINVOICED ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.SORDER ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.SORDERQ ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.SPRICCONF ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.SPRICLIST ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.SPRICPRTQ ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.STOSER ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABCHANGE ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABCUR ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABLAN ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABMODELIV ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABPAM ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABPAYTERM ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABPAYTYP ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABRATVAT ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABSOHTYP ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABUNIT ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABVAC ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABVACBPR ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABVACITM ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON); ALTER TABLE SEED.TABVAT ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON);