Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2014
    Posts
    7

    Unanswered: PostgreSQL connection from indows Server

    Hi,

    I am trying to connect to the PostgreSQL database server from Windows Server machine. I have installed ODBC driver from PostgreSQL: File Browser where I have chose psqlodbc_09_03_0300-x64-1.zip

    I am having an error that says FTAL: no pg_hba.conf entry for host.....

    Could you please suggest what could be the problem?

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Yes.

    You have not configured postgresql to allow remote connections. You need to add a line in file pg_hba.conf to tell the server which connection, what authentication method (md5 is typical,) and to which database(s) you allow connections.

    Ref the manual, chapter 19.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    Aug 2014
    Posts
    7
    Ok, that now my test connection is successful, I have created a linked server in my MS SQL Server. Then, I can see all the tables but, it doesnot show any data from those tables. What could be the issue? Please see attached error that I am getting.
    Attached Thumbnails Attached Thumbnails error0.JPG  

  4. #4
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Well the error message tells you that one (or more) fields in the SQL server data is bigger than the mapped data type in postgresql.

    First, check your server log files, to see if there's messages there that can help you. You may need to temporarily set toe error log to be verbose, and the number of items logged greater, in postgresql.conf, until you get the problem resolved. If you can't nail it down from the logs, try mapping to half the columns first, see if the error is still there, then half the columns again, etc, until you can identify the column(s) which are causing problems.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •