ss_ReplicaAll allows you to run ss_Replica in bulk.
Simple Example
exec ss_ReplicaAll 'DEMO'
With @ObjectNameFrom
exec ss_ReplicaAll 'DEMO', 'Opportunity'
This will commence the bulk ss_Replica replication from the Object immediately following Opportunity, which could be OpportunityCompetitor if there is no other custom or standard object with a name closer to Opportunity, sorting alphabetically. This is useful if a prior run of ss_ReplicaAll has failed for whatever reason and you wish to re-commence from the point of failure.
Parameters
Parameter | Purpose |
@Env | SQL Sales Environment Name |
@ObjectNameFrom | This will commence the bulk ss_Replica replication from the Object immediately following the one passed in via @ObjectNameFrom. This is useful if a prior run of ss_ReplicaAll has failed for whatever reason and you wish to re-commence from the point of failure. |
ss_ObjectInclusion inclusion table
Field | Purpose |
ObjectName | Definition of Objects you wish to include in each ss_ReplicaAll run. Only Objects contained in this table will be considered in scope. Accompanying table ss_ObjectExclusion will additionally be referenced, i.e. Objects within will be ignored. |
ss_ObjectInclusion exclusion table
Field | Purpose |
ObjectName | Add any Objects in this table to have them excluded from each ss_ReplicaAll run. On deployment (ss_EnableDatabase) a number of known problem Objects are included in this table along with their API Response Error Msg and Codes, for general reference.
It is a matter of choice whether you specify an Inclusion set (via ss_ObjectInclusion) or exclude via this table. Generally, only a relatively small number of Salesforce objects are required to maintain a working replication database and hence ss_ObjectInclusion is more appropriate, or even a hard coded list of ss_Delta commands for each required Object, for example:
ss_Replica ‘DEMO’, ‘Account’ ss_replica ‘DEMO’, ‘AccountHistory’ ss_replica ‘DEMO’, ‘Opportunity’
Which is run via a SQL Agent Job or similar.
Running with no entries in this table but some entries in ss_ObjectExclusion would be more appropriate, if you wanted to automatically take an entire backup of your Salesforce Org, for example. |
ErrorMsg | Salesforce API Response Error Msg |
ErrorCode | Salesforce API Response Error code |