Installing ODBC Driver for Remote Connection to PostgreSQL DB

Raghavendra BN
Version 1
Published in
3 min readMay 26, 2022

--

Open Database Connectivity (ODBC) is a standard API for accessing DBMS. ODBC has been designed to be independent of databases and operating systems.

To set up a new ODBC data source for PostgreSQL:

  1. Install the latest PostgreSQL ODBC drivers:

* Download the latest 64 bit driver installer (zipped msi file) from the psqlodbc download site.

* Unzip the file.

* Run the msi installer and accept the defaults.

2. Open the 64 bit ODBC Administrator:

Windows 10 (64 bit version) supports 32 and 64 bit ODBC sources — always use the 64 bit ODBC Administrator.

*Search for ODBC and choose ODBC Data Sources (64 bit):

*Right Click and choose Run as Administrator:

3. Open the System DSN tab and click Add:

4. Choose the latest PostgreSQL ODBC driver and click Finish:

5. Test the connection by using Azure Data Studio.

i) Make sure we are connected to VPN.

ii) Open Azure Data Studio and Click on New Connection.

iii) Fill the required details of PostgreSQL which needs to be connected (Enter the private IP of postgresql instead of dns name). Click Connect.

iv) Once the connection is successful, databases gets loaded.

This is part three of a four-part series that can be viewed below:
Part 1 — Creating Virtual Network and PostgreSQL
Part 2 — Creating and Configuring Virtual Network Gateway (Point-to-Site)
Part 4 — Configuring a Data Gateway in Power BI

If you found this interesting or have any feedback, please let me know in the comments section.

About the Author:
Raghavendra BN is a DevOps Engineer, currently working in Version 1’s Foundation’s team. Follow Version 1 and Raghavendra BN for more blogs around Microsoft Azure and Azure DevOps.

--

--