SF_MirrorAll
SF_MirrorAll
Usage
SF_MirrorAll
is a hybrid of the SF_ReplicateAll
and SF_RefreshAll
stored procedures. SF_MirrorAll
retrieves a list of the current objects from Salesforce and automatically chooses whether to do a full copy or delta copy on each individual table in the list.
If SF_MirrorAll
decides to do a full copy on the individual table, it creates a full backup with the contents of the Salesforce.com object as a local table. If SF_MirrorAll
decides to do a delta copy on the individual table, it compares the current local table with the contents of the same object at Salesforce.com. It detects any changes (insert, deletes, or updates) and updates the local table with those changes.
Salesforce objects that cannot be queried via the Salesforce API with no WHERE
clause (like ActivityHistory) are not included. SF_MirrorAll
also skips all Chatter Feed objects because of the excessive API calls required to download those objects. You can modify SF_MirrorAll
to include them if needed.
Syntax
EXEC SF_MirrorAll '𝘭𝘪𝘯𝘬𝘦𝘥_𝘴𝘦𝘳𝘷𝘦𝘳'
where linked_server is your linked server name.
Example
The following example creates a full copy or does a delta copy of all the current data on Salesforce.com using the SALESFORCE linked server.
EXEC SF_MirrorAll 'SALESFORCE'
Using the DBAmpTableOptions Table
Use the DBAmpTableOptions table to skip unneeded tables in SF_MirrorAll
. Also, use the DBAmpTableOptions table to provide options for tables when using SF_MirrorAll
. You can specify options that tell SF_Mirror
how to make a full copy of the table locally.
If there is not an entry for a given Salesforce object specified in the DBAmpTableOptions table, SF_Mirror
decides the best way to make a full copy of the object locally.
See Using the DBAmpTableOptions Table for more information.
Notes
-
SF_MirrorAll
callsSF_Mirror
for each Salesforce.com object. -
There are some Salesforce tables, like Vote and UserProfileFeed, that are not included in
SF_MirrorAll
. The Salesforce.com API does not allow selecting all rows from these tables.SF_MirrorAll
also skips Chatter Feed objects because of the excessive API calls required to download those objects. You can modifySF_MirrorAll
to include the Feed objects if needed. -
By default, DBAmp does not download the values of Base64 fields but instead sets the value to
NULL
. This is done for performance reasons.
NOTE: If you have mirrored the table locally, SF_MirrorAll
uses the
-
SOAP API when the row count of the local table is below 20,000
-
BulkAPI when the row count is above 20,000 when doing a full copy.