SF_ReplicateAll
SF_ReplicateAll
Usage
The SF_ReplicateAll stored procedure creates a full backup of your Salesforce.com data by replicating Salesforce objects as tables in the remote database of the remote SQL Server instance. Each replicated table contains the data from the corresponding Salesforce.com object, and any schema changes in the Salesforce.com object are reflected in the replicated table.
However, Salesforce objects that cannot be queried directly through the Salesforce API (for example, ActivityHistory) are not included. SF_ReplicateAll also skips Chatter Feed objects because downloading them requires excessive API calls. You can modify the stored procedures to include these objects, if necessary.
Syntax
EXEC SF_ReplicateAll 'linked-server', 'allow_fail', 'error_messages_only', 'opts', 'use-remote'
In this syntax:
-
The
linked-serverparameter specifies the name of your linked server. -
The
optsparameter provides additional control over remote execution. Use''to follow the remote settings that are configured in the DBAmp Configuration Program, or useskipremoteto bypass remote execution entirely. If you specifyskipremote, theuse-remotesetting is ignored. -
The
use-remoteparameter specifies that you are targeting a database with this remote stored procedure. This parameter must be set to1.
Example
The following example replicates all current data on Salesforce.com by using the SALESFORCE linked server.
EXEC SF_ReplicateAll 'SALESFORCE', 'no', 'no', '', 1
To skip remote-mode enforcement, use skipremote to prevent errors that can occur when remote settings are not enforced, as shown below:
EXEC SF_ReplicateAll 'SALESFORCE', 'no', 'no', 'skipremote', 1
DBAmpTableOptions Table
You can use the DBAmpTableOptions table to do either of the following:
-
Skip tables that are not needed locally in the SF_Mirror and SF_MirrorAll stored procedures.
-
Provide options for tables when you use SF_Mirror and SF_MirrorAll, to direct SF_ReplicateAll about how to replicate the table locally. For detailed information, see Using the DBAmpTableOptions Table.
Notes
-
The SF_ReplicateAll stored procedure calls SF_Replicate for each Salesforce.com object.
-
Some tables in Salesforce (like Vote and UserProfileFeed) are not included in the SF_ReplicateAll remote stored procedure. The Salesforce.com API does not allow you to select all rows from these tables. SF_ReplicateAll also skips Chatter Feed objects because of the excessive API calls that are required to download those objects. You can modify the stored procedures to include them, if necessary.
-
By default, DBAmp does not download the values of Base64 fields. Instead, the software sets those values to
NULL. This behavior improves performance when you replicate large datasets. If you require the actual values, change the Include Binary Field Values setting to True on the Settings page of the DBAmp Configuration program.