Salesforce Connection Help
RazorSQL provides a custom Salesforce driver that can communicate with a Salesforce.com
database via the Salesforce.com web service interface. For information on the SQL support provided by
RazorSQL for Salesforce, click the link
below.
Salesforce SQL Syntax Support
Connecting to Salesforce with the RazorSQL Salesforce Driver
To connect to Salesforce using the RazorSQL Salesforce driver, open the Connections -> Add Connection Profile menu option and select SalesForce as the database type. Click continue and select RazorSQL SalesForce Driver as the connection type.
Next, enter a connection profile name. This will be the name used to identify the connection for connecting again in the future.
Next, enter the Salesforce security credentials. Listed below are the methods that RazorSQL
can use to authenticate against Salesforce:
Salesforce Authentication Types
OAuth Web Brower Login
This authentication type requires the Consumer Key / Client Secret for the External Client App or
Connected App defined in Salesforce that grants RazorSQL the permission to interface with the
Salesforce instance. Enabling PKCE in the OAuth settings for the Salesforce External Client App
or Connected App makes the communication more secure.
It also requires the Callback URL defined in the same Salesforce External Client App or Connected App.
The Callback URL needs to be a localhost callback URL with a specific port, such as http://localhost:9040
Once the required data is supplied and the Connect button is pressed, RazorSQL will launch a web browser
for the user to authenticate against Salesforce. RazorSQL passes PKCE values to Salesforce so
that the interaction is more secure. After authenticating, Salesforce will return an
authorization code to the Callback URL. RazorSQL will listen on the Callback URL to receive the
authorization code. Once RazorSQL has the authorization code, it will make another call to Salesforce
to get an Access Token that allows the user to call Salesforce APIs.
OAuth Client Credentials
This authentication is the OAuth Client Credentials Flow. RazorSQL requires the Consumer Key / Client ID
and Consumer Secret / Client Secret defined in the Exteral Client App or Connected App that gives
RazorSQL permissions to interact with Salesforce. It also needs the Instance URL of your
organization.
Access Token and Instance URL
Use this option if you can obtain a Salesforce Access Token manually. Once RazorSQL has the Access Token
and the organization's Salesforce Instance URL, it can communicate with the Salesforce APIs.
SOAP API Login (Salesforce is retiring this on 06/01/2027)
The SOAP API Login option requires the user's Salesforce login id, password, and Salesforce security token.
This method of authentication will no longer work as of June 1st, 2027.
The login and password are the login and password used to access
your salesforce.com account. If you do not have the security token, it can be obtained
via the Reset My Security Token option on the salesforce.com profile. This will email
you your security token.
Salesforce Environments
RazorSQL can connect to the Salesforce production environment, the sandbox environment,
or a custom URL. The Environment drop-down contains options for Production, Sandbox,
and Custom URL. If selecting the Custom URL option, the URL should be in the following
format as RazorSQL will be connecting to the Salesforce SOAP API endpoint:
https://xxxxxxxxx.my.salesforce.com/services/Soap/u/52.0
Next, enter the max results per query value. This number specifies the maximum number of rows RazorSQL will retrieve from Salesforce for a given query.
