# Replicating fails for my big tables

**URL:** <https://community.cdata.com/t/replicating-fails-for-my-big-tables/127>\
**Category:** CData DBAmp\
**Tags:** sql, question, salesforce, dbamp\
**Created:** [March 30, 2023, 5:01pm UTC](https://community.cdata.com/t/replicating-fails-for-my-big-tables/127 "2023-03-30T17:01:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dani\_Moran](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@Dani\_Moran](https://community.cdata.com/u/Dani_Moran)\
**Post date:** [March 30, 2023, 5:01pm UTC](https://community.cdata.com/t/replicating-fails-for-my-big-tables/127/1 "2023-03-30T17:01:05Z")

</div>

When I run SF\_Replicate on my tables with lots of fields, like Account and Case, it fails. SF\_Mirror also fails, and I can’t run SF\_Refresh because there’s been a field added so it just tries to run SF\_Replicate anyway. The message output looks like this:

--- Starting SF\_Replicate for Account V5.1.8  
12:58:41: Parameters: Salesforce Account&nbsp; Version: V5.1.8  
12:58:41: DBAmpAZ 5.1.8.0 Copyright c 2021 CData Software, Inc.  
12:58:41: Using options specified in Options parameter: soap  
12:58:42: Using settings from Registry.  
12:58:42: Using FullCopy to replicate the Account table.  
12:58:42: Server: DL-7KVJRL3, Database: olddbamp, Linked Server: Salesforce  
12:58:42: Using the Salesforce SOAP API.  
12:58:43: Opening SQL Server rowset  
12:58:43: Error: Commit failed.  
Source: Microsoft SQL Server Native Client 11.0  
Description: The statement has been terminated.  
Source: Microsoft SQL Server Native Client 11.0  
Description: Cannot create a row of size 8107 which is greater than the allowable maximum row size of 8060.  
12:58:43: Error: DBAmp.exe was unsuccessful.  
12:58:43: Error: Command string is C:\“Program Files”\DBAmp\DBAmpAZ.exe FullCopy “Account”&nbsp; “SQLSERVER”&nbsp; “SALESFORCE”&nbsp; “Salesforce backups”&nbsp; “soap”  
--- Ending SF\_Replicate. Operation FAILED.  
Error: SF\_Replicate failed for table Account

---

<div class="post-metadata">

**Author:** ![Dani\_Moran](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@Dani\_Moran](https://community.cdata.com/u/Dani_Moran)\
**Post date:** [March 30, 2023, 5:12pm UTC](https://community.cdata.com/t/replicating-fails-for-my-big-tables/127/2 "2023-03-30T17:12:43Z")

</div>

That error is because of the SQL Server restriction on how wide a table can be - all those fields have exceeded the maximum width allowed. There are a few of ways to get around it depending on your version.

1) If there are some fields that you don’t need to copy locally, you can remove your integration users’ permissions to those fields, which will shorten the row length. In that message output, it doesn’t look like it’s very much over (8107&nbsp; versus the maximum of 8060), so it shouldn’t require much trimming.

2) SF\_Replicate and SF\_Mirror have ColumnSubset options that will bring down alphabetic subsets of the columns, which of course serves to shorten the rows in each piece. That would look like: EXEC SF\_Replicate ‘\<your linked server\>’,‘Account\_ColumnSubsetAM’ and EXEC SF\_Replicate ‘\<your linked server\>’,‘Account\_ColumnSubsetNZ’ to get all data down.

3) Similar to #1, but without needing to go to Salesforce to change permissions, you can use SF\_BulkSOQL to bring down data based on a particular SOQL query you designed that only queries those fields that you need local copies of. You can find documentation here for v22: [DBAmp - SF\_BulkSOQL](https://cdn.cdata.com/help/AFH/dbampd/SF_BulkSOQL.html)&nbsp; or in the “DBAmp Stored Procedure Reference” Chapter of your PDF documentation in older versions of DBAmp (\<v5.1.9) if your version of DBAmp includes that stored procedure.
