ODBC Connection String Troubleshooting Guide

Provider=MSDASQL;Password=password;Persist Security Info=True;User ID=postgres;Extended Properties="Driver={PostgreSQL UNICODE};Server=127.0.0.1;Port=5432;Database=postgres;"

This is a typical Connection String for PostgresQL and this guide will use it as the sample but the concept of this guide can be extended to other ODBC database. You may encounter error here and there in Connection String while installing or customizing database. Below are some steps to narrow down the troubleshooting scope.

  1. [Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified

    dsn-driver-error

    This error shown that the most essential part which is the ODBC driver is not found within machine. You must get the official ODBC Driver correctly installed and configured before looking on other part. First you need to check your ODBC Data Source Administrator. Check out Driver tab, it should have at least two or maybe four PostgresQL ODBC drivers listed.

    odbc-driver

    Ensure the driver name that entered within curly braces {} is exactly match with what is being shown, even one extra leading/trailing space or additional/missing of single space will cause a complete failure in establishing the connection.

    If you started to get other error message, means the ODBC Driver is already correctly installed and configured, check out next possible error.

  2. Could not connect to the server; Could not resolve hostname

    server-hostname-error

    Unable to connect to server or unable to resolve hostname is due to network connection, just check on Server’s IP address, and very unlikely cause by port number.

  3. FATAL: password authentication failed for user

    authentication-error

    Authentication error shown that either the password entered is wrong or there’s no such user at all. Open up PgAdmin to see if there’s such user and test out the password.

    data-link-properties

    Ensure “Allow saving password” is always checked, otherwise the previously entered password will be removed when you click OK button.

  4. FATAL: database does not exist

    db-not-exist

    Database doesn’t not exist simply means as it is. Either the new database name entered is not match or no new database has been created.