Altova DatabaseSpy 2023 Enterprise Edition

This example illustrates how to connect to a PostgreSQL database server from a Windows machine through the ODBC driver. The PostgreSQL ODBC driver is not available on Windows, so it must be downloaded and installed separately. This example uses the psqlODBC driver (version 11.0) downloaded from the official website (see also Database Drivers Overview).

 

Note:You can also connect to a PostgreSQL database server directly (without the ODBC driver), see Setting up a PostgreSQL Connection.

Prerequisites:

psqlODBC driver must be installed on your operating system.

You have the following database connection details: server, port, database, user name, and password.

To set up a connection to PostgreSQL using ODBC:

1.Start the database connection wizard.

2.Click ODBC Connections.

3.Select the User DSN option.

4.Click Create a new DSN DSN_add and select the driver from the drop-down list. If no PostgreSQL driver is available in the list, make sure that the PostgreSQL ODBC driver is installed on your operating system, as mentioned in the prerequisites above.

dbc_postgresql_odbc_01

5.Click User DSN.

dbc_postgresql_odbc_02

6.Fill in the database connection credentials (these must be supplied by the database owner), and then click Save.

 

The connection is now available in the list of ODBC connections. To connect to the database, you can either double-click the connection or select it, and then click Connect.

dbc_postgresql_odbc_03

© 2017-2023 Altova GmbH