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
-
batchsize—SF_Replicateuses 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 thebatchsize(𝘹𝘹)option.For example, to set the batch size to 50:
EXEC SF_Replicate 'Salesforce','Account','batchsize(50)' -
pkchunk—SF_Replicateuses the Salesforce.com web services API by default. To use the Salesforce.com bulkAPI with the pkchunking header instead, add the optionalpkchunkswitch.SF_Replicatesubmits 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
pkchunkand 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
batchsizeparameter:EXEC SF_Replicate 'Salesforce','Account','pkchunk,batchsize(50000)' -
bulkapi—SF_Replicateuses the Salesforce.com web services API by default. To use the Salesforce.com bulkAPI instead, add the optionalbulkapiswitch.SF_Replicatesubmits a bulkAPI job and polls every minute for completion. You should only usebulkapifor large tables.For example, to use the bulkAPI and poll every 1 minutes for completion:
EXEC SF_Replicate 'Salesforce','Account','bulkAPI' -
NoDrop—SF_Replicatedrops the local table by default. To useSF_Replicatewhere it does not drop the local table, add the optionalNoDropswitch.For example,
EXEC SF_Replicate 'Salesforce','Account','nodrop'
Notes
-
SF_Replicatecreates 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, useSF_Refreshinstead.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 theInclude Binary Field Valuessetting toTruein the Settings page of the DBAmp Configuration program.