ODBC Driver for PostgreSQL

Connect to Heroku Postgres using ODBC Driver for PostgreSQL

Connecting to Heroku Postgres using ODBC driver for PostgreSQL

Heroku is a cloud-based multilingual platform-as-a-service (PaaS) that is designed for hosting applications and web services, working with loaded applications, reducing the need for complex work with the server, and rapid scaling of applications. It also simplifies and speeds up the development cycle.

This article explains how to connect to the Heroku Postgres using our ODBC driver for PostgreSQL.

To connect to your Heroku Postgres database, you need to get the URL of your database. You may get it through the Heroku Dashboard.

Using the Heroku Dashboard

This method is easier if you are using the platform for the first time.

  1. Go to the application on Heroku you want to connect to.
  2. Switch to the Settings tab and press the Reveal Config Vars button. The list of configuration variables will appear.
  3. In the Key field, you will see the key value in the following format:
    < postgres: //< username >: < password >@< hostname/server >/< databasename >

Now, you can establish a connection to Heroku Postgres through the ODBC Data Source Administrator. It is assumed that you have installed the ODBC driver for PostgreSQL on your computer.

  1. Open the ODBC Data Source Administrator.
  2. Select the User DSN and add an appropriate driver.
  3. In the driver setup dialog, enter the necessary data that you got from the Heroku configuration value for DATABASE_URL.

  4. Switch to the Security Settings > SSL Options and mark Use SSL.
  5. To establish a secure connection you need to insert certificates. How to get and upload the certificate you can find on the Heroku SLL page.
  6. After the certificate is downloaded, complete the configuration of the SSL options as seen in the picture below.

  7. To test the connectivity, click the Test Connection button.
  8. Click Ok to save the DSN.
© 2015-2024 Devart. All Rights Reserved. Request Support ODBC Forum Provide Feedback