SF_Replicate


SF_Replicate


Usage

SF_Replicate creates a local replicated table with the contents of the same object at Salesforce.com. The name of the local table is the same name as the Salesforce.com object (e.g., Account). Any schema changes in the object at Salesforce.com are reflected in the new table.

In addition, SF_Replicate creates a primary key on the ID field of the table.

Syntax

 EXEC SF_replicate 'linked_server','object_name','options'

where linked_server is your linked server name, and object_name is the object name.

Example

The following example replicates the local Accounttable with the current data on Salesforce.com using the Salesforce linked server.

 EXEC SF_replicate 'Salesforce' , 'Account'

Options

  • batchsizeSF_Replicate uses the maximum allowed batch size of 2000 rows. You may need to reduce the batch size to accommodate APEX code on the Salesforce.com server. To specify a different batch size, use the batchsize(𝘹𝘹) option.

    For example, to set the batch size to 50:

    EXEC SF_Replicate 'Salesforce','Account','batchsize(50)'
    
  • pkchunkSF_Replicate uses the Salesforce.com web services API by default. To use the Salesforce.com bulkAPI with the pkchunking header instead, add the optional pkchunk switch. SF_Replicate submits a bulkAPI job using the pkchunking header and polls every minute for completion. You should only use this option for large tables.

    For example, to use pkchunk and poll every 1 minutes for completion:

    EXEC SF_Replicate 'Salesforce','Account','pkchunk'
    

    The default batch size is 100,000. You can alter this using the batchsize parameter:

    EXEC SF_Replicate 'Salesforce','Account','pkchunk,batchsize(50000)'
    
  • bulkapiSF_Replicate uses the Salesforce.com web services API by default. To use the Salesforce.com bulkAPI instead, add the optional bulkapi switch. SF_Replicate submits a bulkAPI job and polls every minute for completion. You should only use bulkapi for large tables.

    For example, to use the bulkAPI and poll every 1 minutes for completion:

    EXEC SF_Replicate 'Salesforce','Account','bulkAPI'
    
  • NoDropSF_Replicate drops the local table by default. To use SF_Replicate where it does not drop the local table, add the optional NoDrop switch.

    For example,

    EXEC SF_Replicate 'Salesforce','Account','nodrop'
    

Notes

  • SF_Replicate creates a full copy and downloads all the data for that object from Salesforce. To download only the changes made since you created the local copy, use SF_Refresh instead.

    A primary index on the ID column is automatically created when the table itself is replicated.

  • By default, DBAmp does not download the values of Base64 fields but instead sets the value to NULL. This is done for performance reasons. If you require the actual values, change the Include Binary Field Values setting to True in the Settings page of the DBAmp Configuration program.