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

Cannot sync after running Create DBAmp SPROCS.sql stored procedure

Hi FAdbAmpSupport:

We are a long time customer.
This time, our Staging server is not synching after installing.
As old-timers we know the install is straightforward. Yet, I suspect we missed a step.
I don't know where dbAmp logs live to help diag.
Symptoms: can get to Salesforce cloud (a-ok). Can pull over new objects (a-ok). Ran the stored procedure, Create DBAmp SPROCS.sql and got successful status. Yet, data not synching.
Thank you.
1 person has
this problem
+1
Reply
  • What commands are you running that are not synching? Do you have complete message output from those commands? What version of DBAmp are you currently running?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • the current version 3.8.7.0
    however, the problem existed with a previous version do I do not suspect the problem is with DBAmp.

    When I run SQL Server Agent Job => Salesforce DBAmp Refresh manually, here is a snippet of the initial errors:

    --- Starting SF_Refresh for User V3.8.7
    17:06:56: Using Schema Error Action of subset
    17:06:57: Using last run time of 2019-01-21 17:20:00
    17:08:02: Identified 17521 updated/inserted rows.
    17:08:02: Error: BannerPhotoUrl exists in the delta table but does not exist in the local table or has a different definition.
    17:08:02: Error: ComputerID__c exists in the delta table but does not exist in the local table or has a different definition.
    17:08:02: Error: dsfs__DSProSFMembershipStatus__c exists in the delta table but does not exist in the local table or has a different definition.
    17:08:02: Error: dsfs__DSProSFPassword__c exists in the delta table but does not exist in the local table or has a different definition.
    17:08:02: Error: dsfs__DSProSFUsername__c exists in the delta table but does not exist in the local table or has a different definition.
    17:08:02: Error: IndividualId exists in the delta table but does not exist in the local table or has a different definition.
    17:08:02: Error: IsExtIndicatorVisible exists in the delta table but does not exist in the local table or has a different definition.

    The errors seem to indicate a mismatch between the schema in the Salesforce db and the local db. If true.
    If, Exec SF_ReplicateAll 'SALESFORCE' were run (p. 35) is executed first, perhaps these errors would be resolved. As a non-produciton system, it may be the next step to try.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Is User the only table that is failing? What are the exact DBAmp commands you are running that are causing the errors?

    The error above is that there were schema changes made on the User table up on Salesforce, there are options you can use to take care of this, but I need to know what the exact DBAmp commands that are being run in the job that produces the errors.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • on our end, still trying to understand dBAmp basics... progress:

    In the SQL Agent job, SF_RefreshMembershipInfo

    we manually executed TRY portion:
    -- Refresh Contact from Salesforce
    BEGIN TRY
    Exec SF_Refresh 'SALESFORCE', 'User', 'Subset'
    END TRY
    BEGIN CATCH
    Exec SF_Replicate 'SALESFORCE', 'User'
    END CATCH
    manually and proved that DBAmp was working correctly in that a refresh of User WORKED!
    SF_Refresh 'SALESFORCE', 'User', 'Subset'

    next step for us is to find out why SQL Agent Job is not calling SF_Refresh.
  • (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

  • Do you want the SF_Refresh to run an SF_Replicate on the table automatically if there are schema changes to pick those up? If so, just use the following command:

    exec SF_Refresh 'SALESFORCE', 'User', 'Yes'

    The 'Yes' parameter tells the SF_Refresh to run an SF_Replicate in the case that there are schema changes, like there were above.
  • (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

  • Having a SF_Refresh flag be able to automatically update schema changes is pretty interesting. Our Stored Procedures remain old school handling as a try/catch condition. We no longer have any problem with data syncing between Salesforce and Salesforce_Backup.

    The issue for me was learning where to find errors. After navigating to, SQL Server Jobs -> View History, expand Jobs, it was apparent schema changes needed a SF_Replicate. Will do some Q/A but some tables are synching now.

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

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