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

SF_Replicate Error: Unable to set salesforce Session Id.

Hi,
Our weekly SF_Replicate process works years and it has the problem recently. The process will take about 8 hours and it failed after successfully running 6 hours this weekend.
Here are the log begining with the error message, The processes before this point were successfully and many objects have been replicated.
.............
DBAmp.exe: 05:09:01: Error: Unable to set salesforce Session Id.
DBAmp.exe: 05:09:01: Error: Unable to populate salesforce session id. Retrying...
DBAmp.exe: 05:09:07: Error: RunQuery failed with com_error.
DBAmp.exe: 05:09:07: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
Error: Salesforce table does not exist: AAA (Object Name)
Error: Cannot process the object "AAA". The OLE DB provider "DBAmp.DBAmp"
for linked server "SALESFORCE" indicates that either the object has no columns or the current user does not have permissions on that object.
Ending - Operation Failed.
....................

Our version is 3.1.0, I removed a scheduled SF_Refresh process that is after this SF_Replicate today, The SF_Refresh was overlapped with SF_Replicate but we don't have issue before, also our timeout in SFDC is 4 hours.

The next scheduled time to replicate the Salesforce database is the coming Saturday. Any suggestions that I can check and work on for this SF_replicate Error so that we can avoid this error?

Thank you for any help.

Brian
1 person has
this problem
+1
Reply
  • For some reason the salesforce server invalidated your session.

    Can you show the 20 or so lines that preceded the error message in the log ?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Hi Bill,
    Thank you for the quick response. here is more log lines. The error begins at 2016-03-06 05:09:03.870

    DBAmp.exe: 05:02:31: Opening SQL Server rowset
    DBAmp.exe: 05:08:45: 10340 rows copied.
    Drop EmailTemplate if it exists.
    Rename previous table from EmailTemplate_Previous to EmailTemplate
    Create primary key on EmailTemplate
    Ending - Operation Successful.
    Parameters: SALESFORCE Event_Brand_Product__c Version: V3.1.0
    Drop Event_Brand_Product__c_Previous if it exists.
    Create Event_Brand_Product__c_Previous with new structure.
    Run the DBAmp.exe program.
    DBAmp.exe: 05:08:48: DBAmp Bulk Operations. V3.1.0 (c) Copyright 2006-2015 forceAmp.com LLC
    DBAmp.exe: 05:08:48: Populating local table Event_Brand_Product__c_Previous , CXXXXXXXXX1 (Server Name) / SFDC .
    DBAmp.exe: 05:08:49: DBAmp is using the SQL Native Client.
    DBAmp.exe: 05:08:49: Opening SQL Server rowset
    DBAmp.exe: 05:08:57: 21694 rows copied.
    Drop Event_Brand_Product__c if it exists.
    Rename previous table from Event_Brand_Product__c_Previous to Event_Brand_Product__c
    Create primary key on Event_Brand_Product__c
    Ending - Operation Successful.
    Parameters: SALESFORCE Event_Category__History Version: V3.1.0
    Drop Event_Category__History_Previous if it exists.
    Create Event_Category__History_Previous with new structure.
    Run the DBAmp.exe program.
    DBAmp.exe: 05:08:59: DBAmp Bulk Operations. V3.1.0 (c) Copyright 2006-2015 forceAmp.com LLC
    DBAmp.exe: 05:08:59: Populating local table Event_Category__History_Previous , CXXXXXXXXX1 (Server Name) / SFDC .
    DBAmp.exe: 05:08:59: DBAmp is using the SQL Native Client.
    DBAmp.exe: 05:08:59: Opening SQL Server rowset
    DBAmp.exe: 05:09:01: Error: Unable to set salesforce Session Id.
    DBAmp.exe: 05:09:01: Error: Unable to populate salesforce session id. Retrying...
    DBAmp.exe: 05:09:03: 2513 rows copied.
    Drop Event_Category__History if it exists.
    Rename previous table from Event_Category__History_Previous to Event_Category__History
    Create primary key on Event_Category__History
    Ending - Operation Successful.
    Parameters: SALESFORCE EventRelation Version: V3.1.0
    Drop EventRelation_Previous if it exists.
    Create EventRelation_Previous with new structure.
    Run the DBAmp.exe program.
    DBAmp.exe: 05:09:05: DBAmp Bulk Operations. V3.1.0 (c) Copyright 2006-2015 forceAmp.com LLC
    DBAmp.exe: 05:09:05: Populating local table EventRelation_Previous , CXXXXXXXXX1 (Server Name) / SFDC .
    DBAmp.exe: 05:09:05: DBAmp is using the SQL Native Client.
    DBAmp.exe: 05:09:05: Opening SQL Server rowset
    DBAmp.exe: 05:09:07: Error: RunQuery failed with com_error.
    DBAmp.exe:
    DBAmp.exe: 05:09:07: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
    Drop EventRelation if it exists.
    Rename previous table from EventRelation_Previous to EventRelation
    Create primary key on EventRelation
    Ending - Operation Successful.

    Thank you and let me know if you need more info

    Brian
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • 1. The output does not look like our standard output. Have you modified the DBAMp stored procs to produce modified messaging.

    2. It is not clear in the log why salesforce invalidated that session. One possible reason is that salesforce has a limit of 10 open queries per sf user. If you are using the same sf user for DBAmp and other activities, then maybe the combined open queries at that moment exceeded 10. Unfortunately DBAmp is only told by salesforce that the session is now invalid.

    Also, you can see in the previous sf_replicate that the same issue occurred but the DBAmp code was able to retry and get a new session id to use.

    Is there a lot of DBAmp activity occurring at 5PM ?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • yes, we modified the log message. There are not lots of DBAmp Activities at Saturday morning at 5:00AM. BTW, we had a scheduled SF_refresh process from 2:00AM and ran every 15 minutes until 10:00PM every day. However, just this morning after I got the error message, I removed the scheduled process on Sunday morning beginning at 2:00AM so that there is not overlapped process on that day, I hope it may helps. I will see if I still have the same issue this coming Saturday.
    Is there other things that I should pay attention to?

    Thank you and appreciate your help!

    Brian
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Hi Bill,

    I am getting the same error as below:This is very urgent to resolve. Please help:
    SF_Refresh is working, but SF_Replicate and SF_BulkOps are not

    --- Starting SF_BulkOps for V3.5.7
    23:32:53: Run the DBAmp.exe program.
    23:32:53: DBAmp Bulk Operations. V3.5.7 (c) Copyright 2006-2017 forceAmp.com LLC
    23:32:53: Updating Salesforce using (/ ) .
    23:32:53: DBAmp is using the SQL Native Client.
    23:32:53: Error: Unable to set salesforce Session Id.
    23:32:53: Error: Unable to populate salesforce session id.
    23:32:53: Error: DBAmp.exe was unsuccessful.
    23:32:53: Error: Command string is C:\"Program Files"\DBAmp\DBAmp.exe update "" "" "production" " "
    --- Ending SF_BulkOps. Operation FAILED.
    Msg 50000, Level 16, State 1, Procedure SF_BulkOps, Line 141
    SF_BulkOps Error: 23:32:53: DBAmp Bulk Operations. V3.5.7 (c) Copyright 2006-2017 forceAmp.com LLC23:32:53: Updating Salesforce using (/ ) .23:32:53: DBAmp is using the SQL Native Client.23:32:53: Error: Unable to set salesforce Session Id.23:32:53: Error: Unable to populate salesforce session id.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Can you forward a screenshot of the DBAmp configuration program Options screen from that server to support @ forceamp.com

    Also what is the result of running the test connection option from that program?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Hi Bill,

    Just sent you the mail as you have asked.

    Thanks
    Shishir
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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