Skip to content

Salesforce

Salesforce can be a source and a destination; this section covers both. Salesforce sources are for snapshot replication.

DBMS Type SalesForce
Driver SQDR Salesforce driver. On Windows it's in the optional SQDR_ODBC_XE package, not in the standard SQDR installation: install it as described below.
Connection string The Salesforce template: HostName=login.salesforce.com;TransactionMode=1;SQLEngineMode=2
Apply methods Batch and Sequence (no Merge)

Docker

The SQDR container includes the SQDR Salesforce driver.

Install the driver (Windows). Install the SQDR_ODBC_XE package on the Stelo VM (get the installer from Stelo Support): it installs the driver in C:\Program Files\StarQuest\SQDR_ODBC_XE, with the Java runtime the driver uses. On a server that also runs Stelo Capture, ask Stelo Support which SQDR_ODBC_XE installer matches your Stelo Capture version.

Prepare Salesforce. The Salesforce user needs API access (the API Enabled permission) and permission to read, or for a destination to create, edit and delete, the objects that subscriptions use.

Connection string

The template, for the SQDR bundled Salesforce driver: HostName=login.salesforce.com;TransactionMode=1;SQLEngineMode=2.

  • User ID and Password: with Remote Credentials, enter the Salesforce user name, and the password followed by the user's security token. Resetting the password also resets the token; get a new one in Salesforce's personal settings (Reset My Security Token).
  • Transactions: Salesforce has no transactions. TransactionMode=1 makes the driver accept the Replicator Service's commits and rollbacks without acting on them; the Replicator Service adds it if it's missing. A rollback doesn't undo rows already written.
  • SQL engine mode: SQLEngineMode=2 (Direct mode) runs the driver's Java runtime inside the Replicator Service rather than as a separate service. Keep it from the template: it also avoids the message "SQL Engine service could not be reached, falling back to Direct", which otherwise clutters unrelated errors.
  • Schema map: the driver maps Salesforce objects to tables in a local schema map. SchemaMap= (SMP=) sets the map's file, for example SMP=C:\mapfiles\sqdr.config; the driver creates its files in that folder, which the Replicator Service's account must be able to write to. Without it, the files go to that account's AppData\Local\Progress\DataDirect folder. CreateMap=1 (CM=1) builds a new map when the driver connects; the driver's SQL extension REFRESH MAP updates it from Salesforce, an expensive query.
  • Proxy server: add PXHN=myproxyserver;PXPT=3128 (proxy host and port). If the proxy asks for a login, either let the Stelo VM through without one, or add ProxyUser and ProxyPassword (PXPP; keep the password in a secret) and set these two properties, empty, in the net.properties file of the driver's Java runtime:

    jdk.http.auth.proxying.disabledSchemes=
    jdk.http.auth.tunneling.disabledSchemes=
    
  • Driver logging, for Stelo Support: copy ddlogging.properties from C:\Program Files\StarQuest\SQDR_ODBC_XE\Samples to a working folder, set the log file location in it (for example java.util.logging.FileHandler.pattern = C:\\temp\\ddlog%g.log; the file has UNIX line endings), and add LogConfigFile=C:\temp\ddlogging.properties (LCF=) to the connection string.

The driver's Java options are set when the Replicator Service first loads it: after changing them in a connection string, restart the Replicator Service.

As a source. Every Salesforce object has the field Id, which is unique and never changes: when the driver reports no primary key for an object, the Replicator Service uses Id as its key. A Salesforce source can't be used for parallel baselines.

As a destination. Truncate table before replication isn't available; use Delete existing data before replication (see Baseline Replication Options).

Troubleshooting: see Troubleshooting › Cloud and streaming destinations.