SQL Server 2012: Add a linked server to PostgreSQL

前端 未结 2 781
名媛妹妹
名媛妹妹 2021-01-02 10:26

I try to connect a PostgreSQL to SQL Server 2012 server as linked server

I found some advices on different forum and follow it. But I\'m stuck with an authentication

相关标签:
2条回答
  • 2021-01-02 10:55

    I think I found the answer; I was still getting the error with a recent version of the ODBC driver and Postgres 10.x.

    The connection will work when tested in the Windows ODBC diaglog, but will fail in SQL Server. When setting the password for the remote user, place the password in curly braces.

    {password}

    This will keep the ODBC connection string from getting screwed up if you have certain symbols in your user's password.

    0 讨论(0)
  • 2021-01-02 11:03

    Ok, I found the solution.

    In the pg_hba.conf file, I change the method for sending passwords from MD5 to trust. After reloading the server, my linked server connection works.

    the entry is now:

    Type Database User Address   Method
    
    host all      all  x.x.x.x/x trust
    

    In hope that help others peoples.

    0 讨论(0)
提交回复
热议问题