Salesforce JDBC Driver & How to Connect

DbSchema is connecting to Salesforce using JDBC Drivers.

  1. What are JDBC Drivers
  2. What is the JDBC URL
  3. Download the Salesforce JDBC Driver
  4. How to Connect using the DbSchema Salesforce

What are JDBC Drivers?

JDBC drivers are Java library files with the extension '.jar', used by Java applications to connect to the database. Usually they are provided by the same company which developed the database software. DbSchema is an Salesforce Client which already includes the Salesforce JDBC driver. DbSchema can configure the Salesforce JDBC URL and test the connectivity.

What is the JDBC URL?

The URL is a string (text) with a specific format containing information about the host where the database is running, the port, username, database name, etc. The URL format is specific to each driver. Any wrong character in the URL may make the database connectivity fail. Therefore we recommend installing DbSchema and try to get connected, and you will find the JDBC URL in the connection dialog.

Driver Information

  • Required File(s): dbschema-salesforce-jdbc-xxx.jar
  • Java Driver Class: com.dbschema.salesforce.SalesforceJdbcDriver
  • URL:
    • jdbc:dbschema:salesforce://
    • jdbc:dbschema:salesforce://tables=all
    • jdbc:dbschema:salesforce://sessionid=PARAM
    • jdbc:dbschema:salesforce://sessionid=PARAM&tables=all
    • jdbc:dbschema:salesforce://user=...&password=...
  • Website: GitHub Salesforce Open Source JDBC Driver

Download Salesforce JDBC Driver

The driver files are compressed in a zip file.

for any issues with the driver, you can write to us.

The DbSchema JDBC Driver is Open Source

The driver is build by DbSchema team is free and open source. The driver can be found on GitHub.

Visit GitHub Driver Source Code

How To Create a Salesforce Database

Salesforce database is a cloud hosted database. You can register for a free trial account at https://login.salesforce.com/. There you have to go on 'View Profile Settings' on top right and follow the link on the left to 'Reset Security Token'. You will receive a security token per email. When logging in using DbSchema enter in the password field the regular web login password concatenated with the security token. More details in DbSchema help.

Connect to Salesforce using DbSchema

DbSchema is using JDBC Drivers to connect to the database. Installing the application you can easy set up a connection. DbSchema will build the JDBC URL for you.
  1. 1 Download DbSchema. DbSchema has a free community edition. No email or registration is required.
  2. 2 Choose to connect to the database, and choose Salesforce. Connect to database
  3. 3 Connection-dialog

    At this point, DbSchema already downloads the JDBC driver into this folders:

    • C:\Users\YourUser\.DbSchema\drivers\Salesforce (Windows) or
    • /Users/YourUser/.DbSchema/drivers/Salesforce (Linux and MacOS).

    In the Connection Dialog, select the driver and the JDBC URL template. For databases using multiple possibilities to connect, may exists multiple templates. Choose if the database is running on the current machine or a different port. If is running on a different machine (remote), you need to find the host name. Hover the Host info label using the mouse to get instructions.

  4. 4 Press the Ping button to test the connectivity.
  5. 5 Edit JDBC URL In the URL combo there is an option to 'Manually Edit the URL'. Select this option to see the generated JDBC URL.
  6. 6 DbSchema Layouts After connecting, DbSchema will create the first diagrams (layouts). Double-click any table header or column to edit.
  7. 7 SQL Editor Activate the SQL Editor from the menu to edit and execute queries. For a detailed list of features, please read the DbSchema Quick Tour.