Row Size greater than 64kb in MySQL

Issue Description:

Row size limit for mysql table is 64kb. While replicating Salesforce into MySQL table, if the row size is more than 64 kb, replication process is impacted. In such cases, it is required to replicate those objects into multiple tables by splitting the object fields into different tables. This section describes the process of replicating such objects into multiple tables with an example.

Solution:

  • While replicating Salesforce into mysql database using DBSync Replication, if the row size exceeds 64 kb, replication process stops and the logs will display an error as shown below.

Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs.

  • Identify the Salesforce object which has row size greater than 64kb. These objects wouldn't have replicated into database when the row of size is greater than 64kb.

  • If accounts object has row size greater than 64kb, we need to replicate this accounts object into two different tables for example sf1_accounts & sf2_accounts. This can be done by creating a new profile in DBSync replication and running replication on both the profiles.

table.prefix=sf1 column.prefix=sf1

  • Follow the below path in DBSync Cloud Replication installation folder to find profile folder mysql_new.

    • DBSync Cloud Replication Installation Folder (DBSyncCReplSF3) > dbsync-repl > WEB-INF > db > mysql_new

  • Go to config properties file in the profile folder for mysql and include the following codes in the file.

table.prefix=sf2 column.prefix=sf2

  • In DBSync Replication Console go to profile mysql & go to tab Salesforce Sync Object Details. Click on Account, retain the standard fields in Available Fields section and push all the custom fields in Exclude Fields and save the changes.

  • Go to profile mysql_new of DBSync Cloud Replication Console and go to tab Salesforce Sync Object Details. Ensure that Salesforce and Database details are saved in the respective tabs. Click on Account, retain the custom field in Available Fields section and push all the standard fields in Exclude Fields and save the changes.