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

LoginHistory replicate runs with no errors, but rows are missing. Version 3.6.5

We are on DBAMP version 3.6.5. This command runs daily with no errors:
exec SF_Replicate 'SALESFORCE', 'LoginHistory', 'pkchunk,batchsize(25000)'

Recently, I compared results to Salesforce and found SOME rows missing (not all), and it seems the countryISO field is the source of the problem.

In SOQL, this query returns no rows:
SELECT Id,countryiso FROM LoginHistory where userid ='0052T000003hymuQAA'

This query returns 3 rows:
SELECT Id FROM LoginHistory where userid ='0052T000003hymuQAA'

Salesforce says there is no fix, and of course their workaround does not help me with DBAMP:
https://success.salesforce.com/issues...

So that I can prioritize with my management, will upgrading to the latest version of DBAMP resolve this?
1 person has
this problem
+1
Reply
  • About how many rows are missing? Also, how many rows total are you expecting in the LoginHistory table?

    The issue stems with Salesforce and the most likely case is some of the Id's up on Salesforce are somehow set to Null. Which then causes issues/corrupts how Salesforce sends us the data and therefore DBAmp cannot get all the records in that table.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Justin, at least 4500 rows are missing out of millions.

    It's not the id field that's the problem. If you look at the two queries I show in my example, I can easily pull the id for the missing rows. It's only when I add in the countryiso that no rows get returned. This is also pointed out in the known issues NO FIX link I provided from Salesforce.

    If I could access the field security on the LoginHistory object, I could simply turn off permissions to that field so the dbamp login wouldn't see it. But that's not available on this object.

    So my options are to write SOQL that doesn't use the countryiso field, or upgrade in hopes that it's fixed in a recent release. I just need to know if this issue was specifically addressed in a recent release (after 3.6.5). If not, I'll go the manual route.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Take a look at the SF_BulkSOQL section in Chapter 10 of the DBAmp Doc: http://forceamp.com/hats/DBAmpDoc.pdf

    Just put the columns you want locally in the SOQL statement parameter of SF_BulkSOQL. It would look something like the following:

    exec SF_BulkSOQL 'SALESFORCE', 'LoginHistory', 'pkchunk,batchsize(50000)', 'Select (columns you want locally) from LoginHistory'
    • view 3 more comments
    • Looks like it is a bug on our end. It will be fixed in the next release of DBAmp. Instead of pkchunk,batchsize(50000), just put bulkapi in there and retry.
    • Thank you, the bulkapi option worked, and now the missing rows are being imported!
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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