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

sf_replicate on 'Event' table gives an error - Help Needed ASAP

I trying to replicate all objects from SalesForce
all the tables were successfully replicated except for 'Event'
It gave me the following error:
***********************************************
--- Starting SF_Replicate for Event
02:36:13: Drop Event_Previous if it exists.
02:36:13: Create Event_Previous with new structure.
02:36:13: Run the DBAmp.exe program.
02:36:13: DBAmp Bulk Operations. V2.15.5 (c) Copyright 2006-2012 forceAmp.com LLC
02:36:13: Populating local table Event_Previous , ISQ-RPTDB-01\P1 / SalesForce_SS042013 .
02:36:14: DBAmp is using the SQL Native Client.
02:36:14: Opening SQL Server rowset
02:38:15: Error: RunQuery failed with com_error.
02:38:15: FAHttp::Send::WinHttpReceiveResponse Server Error
02:38:15: Error: DBAmp.exe was unsuccessful.
02:38:15: Error: Command string is C:\"Program Files"\DBAmp\DBAmp.exe Export "Event_Previous" "ISQ-RPTDB-01\P1" "SalesForce_SS042013" "SALESFORCE"
--- Ending SF_Replicate. Operation FAILED.
Error: SF_Replicate failed for table Event
Error 50000, Severity 16, State 1, Line 214
--- Ending SF_Replicate. Operation FAILED.
***********************************************************************

Please help me to fix this issue.
1 person has
this problem
+1
Reply
  • The version of DBAmp you have installed is not displaying the detailed error message needed to resolve the issue.

    Would it be possible to update the version of DBAmp using the instructions at http://www.forceamp.com/upgrade.htm ? After upgrading, you will need to reenter the second serial number.

    If upgrading is not possible right now, then let me know and we can setup a web meeting to try to figure it out. Based on the timestamp of the messages, my guess is that the salesforce.com server is timing out.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Bill, Thank you very much for the quick reply.
    I don't think I can upgrade now. I will talk to our DBA tomorrow and see what he says.
    I even changed the registry settings receive timeout to 2400.
    It is running for 2 minutes then giving me that error.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Changing the receive timeout will not help when it is the salesforce server that is timing out.

    Are you using a salesforce admin as the userid for the linked server ? If not, then the salesforce server has to do extra work to determine if the non-admin user can "see" the record. This will sometimes cause the sf server to timeout.

    If you have access to the data loader, you could try the same operation with that tool and you might receive the more detailed error message.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • I am using a salesforce Admin UserID for the linked server.
    I will try dataloader option.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Bill,
    I am trying to do sf_replicateAll to get a snapshot of the SalesForce.
    sf_replicateAll successfully replicated all tables except for 'Event' table.
    When I compare the rowcount of some of the tables with record Count on Sales Force, all tables matched except for 'Tasks'.
    I have less record count in the local database than sales Force.
    But 'Tasks' were successfully replicated. only 'Events' failed.
    I don't understand why tasks have less record count.
    Please help me figure this out.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Archived tasks are not pulled with the normal sf_replicate because the salesforce api Query call ignores archived tasks. That is the row difference.

    If you want archived tasks then use sf_replicateIAD for the task table .

    As indicated earlier, upgrading DBAmp will get you the more detailed error message on why the salesforce server is refusing to provide the Event records.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • I’m frustrated
    I've also been having an issue trying to replicate the Task Table; We normally do full Replicates every Sunday, the last successful one was 4/6/2014.

    I tried running manually today, and I have tried both SF_Replicate and SF_Replicate3.

    --- Starting SF_Replicate for Task
    09:23:47: Drop Task_Previous if it exists.
    09:23:48: Create Task_Previous with new structure.
    09:23:49: Run the DBAmp.exe program.
    09:23:49: DBAmp Bulk Operations. V2.16.7 (c) Copyright 2006-2013 forceAmp.com LLC
    09:23:49: Populating local table Task_Previous , OOCSVOPDB001V\DBAMP / SalesForceDataMart .
    09:23:51: DBAmp is using the SQL Native Client.
    09:23:51: Opening SQL Server rowset
    09:53:51: Error: RunQuery failed with com_error.
    09:53:51: FAHttp::Send::WinHttpReceiveResponse
    Win32Error::
    The server returned an invalid or unrecognized response

    09:53:51: Error: DBAmp.exe was unsuccessful.
    09:53:51: Error: Command string is E:\"Program Files"\DBAmp\DBAmp.exe Export "Task_Previous" "OOCSVOPDB001V\DBAMP" "SalesForceDataMart" "SALESFORCE"
    --- Ending SF_Replicate. Operation FAILED.
    Msg 50000, Level 16, State 1, Procedure SF_Replicate, Line 244

    I also cannot get a Count
    SELECT * FROM OPENQUERY(SALESFORCE,'SELECT COUNT() FROM Task')
    OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" returned message "Error: QUERY_TIMEOUT: Your query request was running for too long.".
    Msg 7320, Level 16, State 2, Line 1
    Cannot execute the query "SELECT COUNT() FROM Task" against OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE".
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Basically your Task table has gotten so large that the salesforce server is timing out performing queries against it.

    There is a new approach that we have developed with salesforce to retrieve large tables like this but would require you to upgrade your DBAmp installation to use.

    Are you able to upgrade your DBAmp install using the instructions at http://www.forceamp.com/upgrade.htm ?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Actually on our DEV Server we have already upgraded (with plans to do in Production soon). But getting same issue, unless I am running the wrong SP?:

    SF_Replicate 'SALESFORCE_P','Task'

    Warnings: --->
    W (1): --- Starting SF_Replicate for Task
    W (2): 17:24:33: Drop Task_Previous if it exists.
    W (3): 17:24:33: Create Task_Previous with new structure.
    W (4): 17:24:35: Run the DBAmp.exe program.
    W (5): 17:24:35: DBAmp Bulk Operations. V2.18.2 (c) Copyright 2006-2014 forceAmp.com LLC
    W (6): 17:24:35: Populating local table Task_Previous , OOCSVODDB001V\DBAMPDEV / SalesForceDataMart .
    W (7): 17:24:36: DBAmp is using the SQL Native Client.
    W (8): 17:24:36: Opening SQL Server rowset
    W (9): 17:44:37: Error: RunQuery failed with com_error.
    W (10): 17:44:37: FAHttp::Send::WinHttpReceiveResponse
    W (11): Win32Error::
    W (12): The operation timed out
    W (13): 17:44:37: Error: DBAmp.exe was unsuccessful.
    W (14): 17:44:37: Error: Command string is E:\"Program Files"\DBAmp\DBAmp.exe Export "Task_Previous" "OOCSVODDB001V\DBAMPDEV" "SalesForceDataMart" "SALESFORCE_P"
    W (15): --- Ending SF_Replicate. Operation FAILED.
    [Error] Script lines: 1-1 --------------------------
    --- Ending SF_Replicate. Operation FAILED.
    Msg: 50000, Level: 16, State: 1, Procedure: SF_Replicate, Line: 244 

    [Executed: 4/21/2014 5:24:33 PM] [Execution: 20m 4s]

    SF_ReplicateLarge 'SALESFORCE_P','Task'
    Warnings: --->
    W (1): --- Starting SF_ReplicateLarge for Task
    W (2): 18:10:54: Drop Task_Previous if it exists.
    W (3): 18:10:54: Create Task_Previous with new structure.
    W (4): OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE_P" returned message "Error: QUERY_TIMEOUT: Your query request was running for too long.".
    [Error] Script lines: 3-3 --------------------------
    Cannot execute the query "select Id from Task_QueryAll where Id > '000000000000000' order by Id asc limit 1 offset 249999" against OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE_P".
    Msg: 7320, Level: 16, State: 2, Procedure: , Line: 1 

    [Executed: 4/21/2014 6:10:55 PM] [Execution: 2m 4s]
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • BTW, this is only happening on Task, all other tables are replicating ok. Task only has 2.6 million rows, where other tables have a lot more.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • My guess is that you have several more "archived" tasks.

    Can you verify that the sf user on the Security page of the linked server is a member of the sf admin profile ?

    Also, on the Storage page of the salesforce app, how many task records does it indicate ?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • I think we need to ask salesforce to increase the server side timeout of your org.

    I would file a case with salesforce using the following verbiage:

    "We are executing a queryAll Api call with the following SOQL:
    select Id from Task where Id > '000000000000000' order by Id asc limit 1 offset 249999

    We are receiving the following response from the salesforce server: QUERY_TIMEOUT: Your query request was running too long.

    Please increase the query timeout for our org from 2 minutes to 10 minutes so this query can execute."
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • So I finally got SalesForce to remove our timeout (looks like they now do 30 minutes?), but Task still will not Replicate:
    Warnings: --->
    W (1): --- Starting SF_Replicate for Task
    W (2): 11:17:51: Drop Task_Previous if it exists.
    W (3): 11:17:51: Create Task_Previous with new structure.
    W (4): 11:17:51: Run the DBAmp.exe program.
    W (5): 11:17:51: DBAmp Bulk Operations. V2.16.7 (c) Copyright 2006-2013 forceAmp.com LLC
    W (6): 11:17:51: Populating local table Task_Previous , OOCSVOPDB001V\DBAMP / SalesForceDataMart .
    W (7): 11:17:52: DBAmp is using the SQL Native Client.
    W (8): 11:17:52: Opening SQL Server rowset
    W (9): 11:47:54: Error: RunQuery failed with com_error.
    W (10): 11:47:54: FAHttp::Send::WinHttpReceiveResponse
    W (11): Win32Error::
    W (12): The server returned an invalid or unrecognized response
    W (13): 11:47:54: Error: DBAmp.exe was unsuccessful.
    W (14): 11:47:54: Error: Command string is E:\"Program Files"\DBAmp\DBAmp.exe Export "Task_Previous" "OOCSVOPDB001V\DBAMP" "SalesForceDataMart" "SALESFORCE"
    W (15): --- Ending SF_Replicate. Operation FAILED.
    <---

    I did try the SF_ReplicateLarge, but it appears QueryAll is not available on Task?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • "The server returned an invalid or unrecognized response. "

    This message indicates that your network proxy / firewall is terminating the connection due to a TCP idle timeout. You should ask them to increase or eliminate that timeout for salesforce calls from this server.

    I don't understand your query all comment because it appears you are doing a sf_replicate (not a sf_replicateIAD). If you want to use sf_replicatelarge and also retrieve archived tasks, then ask salesforce in your currently open case, to remove the archive flag from the task records on a temporary basis. That moves the archived records backed to an unarchived state. Then the sf_replicateLarge proc will pick them up. This has been tried successfully at another customer.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • The Proxy 30 minutes timeout makes sense. But I am thinking there may be a bigger issue with the Task Table?

    I don't want the Archived rows, but when I tried SF_ReplicateLarge:

    SF_ReplicateLarge 'SALESFORCE','Task'

    Warnings: --->
    W (1): --- Starting SF_ReplicateLarge for Task
    W (2): 13:01:51: Drop Task_Previous if it exists.
    W (3): 13:01:51: Create Task_Previous with new structure.
    W (4): Select @ENDID_OUT = Id from openquery(SALESFORCE,'select Id from Task_QueryAll where Id > ''000000000000000'' order by Id asc limit 1 offset 249999')
    W (5): OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" returned message "Error 1 : INVALID_TYPE: sObject type 'Task_QueryAll' 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.".
    <---
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • When you upgraded DBAmp, did you restart the SQL instance as required by the instructions ? It appears that step was skipped.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Actually the current Production Server is scheduled to be updated next week, I had tried creating the SP from the DEV Server to test.

    Testing now on our DEV Server pointing to our SalesForce Production instance.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Never mix the DBAmp procs from one version with the code from another. There are some cases where bad things can happen (like all local tables dropped).
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • That would not be good. The DEV replication is running, has been for 60 minutes now, so hopefully that means it is working.

    Are you aware of other having issues with large tables like this? If we use ReplicateAll, I guess we need to add logic to use the Large SP?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Most customers with tables over 1 million rows at some point experience timeout issues. Unfortunately, you have experienced both the salesforce server timeout and your own network timeout.

    SF_ReplicateLarge was designed as a way around those issues in these cases.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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