Help get this topic noticed by sharing it on Twitter, Facebook, or email.

SF_Replicate Error: The operation timed out

I am receiving the following error when trying to replicate an object. All other objects replicate with no errors.

03:45:48: Error: RunQuery failed with com_error. [SQLSTATE 01000]
03:45:48: FAHttp::Send::WinHttpReceiveResponse [SQLSTATE 01000]
Win32Error:: [SQLSTATE 01000]
The operation timed out [SQLSTATE 01000]
2 people have
this problem
+1
Reply
  • This is a client side network timeout. DBAmp has timed out waiting for a response from the salesforce.com server.

    You can increase the client side timeout using the Registry Editor on the server DBAmp is installed on. Navigate to the LOCAL_MACHINE/SOFTWARE/DBAmp hive and modify the value of ReceiveTimeout to either 2400 or 3000. ReceiveTimeout is the number of seconds to wait for a response from salesforce.

    Then retry the operation.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • Hi Bill - I'm getting the same error on our new SqlServer 2014 instance for tables. I just increased the time out to 3000 (50 minutes) but still got the error on LeadHistory (the other 3 are running now).

    What is the maximum value I can put into ReceiveTimeout?

    EXEC SF_Replicate 'SALESFORCE','AccountHistory'
    EXEC SF_Replicate 'SALESFORCE','ContactHistory'
    EXEC SF_Replicate 'SALESFORCE','LeadHistory'
    EXEC SF_Replicate 'SALESFORCE','OpportunityFieldHistory'
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • Can you either post the entire message output on here, or send it to support at forceamp.com, from the command that is failing.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • --- Starting SF_Replicate for AccountHistory
    11:00:18: Drop AccountHistory_Previous if it exists.
    11:00:18: Create AccountHistory_Previous with new structure.
    11:00:18: Run the DBAmp.exe program.
    11:00:18: DBAmp Bulk Operations. V2.20.7 (c) Copyright 2006-2015 forceAmp.com LLC
    11:00:18: Populating local table AccountHistory_Previous , SALESDB / SalesforceReplica .
    11:00:19: DBAmp is using the SQL Native Client.
    11:00:19: Opening SQL Server rowset
    11:40:20: Error: RunQuery failed with com_error.
    11:40:20: FAHttp::Send::WinHttpReceiveResponse
    Win32Error::
    The operation timed out

    11:40:20: Error: DBAmp.exe was unsuccessful.
    11:40:20: Error: Command string is C:\"Program Files"\DBAmp\DBAmp.exe Export "AccountHistory_Previous" "SALESDB" "SalesforceReplica" "SALESFORCE"
    --- Ending SF_Replicate. Operation FAILED.
    Msg 50000, Level 16, State 1, Procedure SF_Replicate, Line 249
    --- Ending SF_Replicate. Operation FAILED.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • After 3 attempts, AccountHistory worked, but OpportunityFieldHistory is still failing:

    --- Starting SF_Replicate for AccountHistory
    13:40:30: Drop AccountHistory_Previous if it exists.
    13:40:30: Create AccountHistory_Previous with new structure.
    13:40:30: Run the DBAmp.exe program.
    13:40:30: DBAmp Bulk Operations. V2.20.7 (c) Copyright 2006-2015 forceAmp.com LLC
    13:40:30: Populating local table AccountHistory_Previous , SALESDB / SalesforceReplica .
    13:40:31: DBAmp is using the SQL Native Client.
    13:40:31: Opening SQL Server rowset
    13:59:13: 5638459 rows copied.
    13:59:13: Drop AccountHistory if it exists.
    13:59:13: Rename previous table from AccountHistory_Previous to AccountHistory
    Caution: Changing any part of an object name could break scripts and stored procedures.
    13:59:13: Create primary key on AccountHistory
    --- Ending SF_Replicate. Operation successful.

    --- Starting SF_Replicate for OpportunityFieldHistory
    13:08:40: Drop OpportunityFieldHistory_Previous if it exists.
    13:08:40: Create OpportunityFieldHistory_Previous with new structure.
    13:08:40: Run the DBAmp.exe program.
    13:08:40: DBAmp Bulk Operations. V2.20.7 (c) Copyright 2006-2015 forceAmp.com LLC
    13:08:40: Populating local table OpportunityFieldHistory_Previous , SALESDB / SalesforceReplica .
    13:08:40: DBAmp is using the SQL Native Client.
    13:08:40: Opening SQL Server rowset
    13:58:40: Error: RunQuery failed with com_error.
    13:58:40: FAHttp::Send::WinHttpReceiveResponse
    Win32Error::
    The operation timed out

    13:58:40: Error: DBAmp.exe was unsuccessful.
    13:58:40: Error: Command string is C:\"Program Files"\DBAmp\DBAmp.exe Export "OpportunityFieldHistory_Previous" "SALESDB" "SalesforceReplica" "SALESFORCE"
    --- Ending SF_Replicate. Operation FAILED.
    Msg 50000, Level 16, State 1, Procedure SF_Replicate, Line 249
    --- Ending SF_Replicate. Operation FAILED.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • Your history tables are getting so big that replicate is struggling with it. So as a potential workaround, can you run the query below in a new query window and post the entire message output for it:

    EXEC SF_ReplicateHistory 'SALESFORCE', 'OpportunityFieldHistory'
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • EXEC SF_ReplicateHistory 'SALESFORCE', 'OpportunityFieldHistory'

    Generated:

    --- Starting SF_ReplicateHistory for OpportunityFieldHistory V.20.7.1
    14:30:44: Drop OpportunityFieldHistory_Previous if it exists.
    14:30:44: Create OpportunityFieldHistory_Previous with new structure.
    OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" returned message "Error 1 : INVALID_TYPE: sObject type 'OpportunityField' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.".
    14:30:44: Error occurred populating the _Previous table.
    14:30:44: Error: Cannot get the column information from OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE".
    --- Ending SF_ReplicateHistory. Operation FAILED.
    Msg 50000, Level 16, State 1, Procedure SF_ReplicateHistory, Line 205
    --- Ending SF_ReplicateHistory. Operation FAILED.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • Try ReplicateLarge instead of ReplicateHistory. So, run the following query:

    EXEC SF_ReplicateLarge 'SALESFORCE', 'OpportunityFieldHistory'
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • That worked! 30 minutes to replicate OpportunityFieldHistory.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • Receiving below error replicating OpportunityHistory object. Other history objects are replicated without errors.

    --- Starting SF_ReplicateHistory for OpportunityFieldHistory V3.2.1 [SQLSTATE 01000]
    16:26:02: Drop OpportunityFieldHistory_Previous if it exists. [SQLSTATE 01000]
    16:26:02: Create OpportunityFieldHistory_Previous with new structure. [SQLSTATE 01000]
    16:26:03: Drop OpportunityFieldHistory if it exists. [SQLSTATE 01000]
    16:26:03: Rename previous table from OpportunityFieldHistory_Previous to OpportunityFieldHistory [SQLSTATE 01000]
    Caution: Changing any part of an object name could break scripts and stored procedures. [SQLSTATE 01000]
    16:26:03: Create primary key on OpportunityFieldHistory [SQLSTATE 01000]
    --- Ending SF_ReplicateHistory. Operation successful. [SQLSTATE 01000]
    --- Starting SF_ReplicateHistory for OpportunityHistory V3.2.1 [SQLSTATE 01000]
    16:26:03: Drop OpportunityHistory_Previous if it exists. [SQLSTATE 01000]
    16:26:03: Create OpportunityHistory_Previous with new structure. [SQLSTATE 01000]
    16:26:03: Error occurred populating the _Previous table. [SQLSTATE 01000]
    16:26:03: Error: Invalid column name 'Field'. [SQLSTATE 01000]
    --- Ending SF_ReplicateHistory. Operation FAILED. [SQLSTATE 01000]
    Msg 50000, Sev 16, State 1, Line 208 : --- Ending SF_ReplicateHistory. Operation FAILED. [SQLSTATE 42000]
    -
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • This is a known fixed bug.

    I would recommend upgrading DBAmp and using the sf_replicate stored procedure instead with the pkchunk option.


    http://forceamp.com/upgrade.htm
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated