Search code examples
postgresqlauthenticationbabelfish

"User_name" is not a babelfish user


I have created role under postgresql using PgAdmin.

CREATE ROLE user_name LOGIN PASSWORD 'xyz';

I'm able to login to server using pgAdmin using above credentials.

But when I try to connect from MSSQL Server (Babelfish) getting an following error:

enter image description here

But when I query using postgres user login I get the role details in babelfish.

SELECT * FROM pg_user;

Solution

  • The (sparse) documentation says:

    You can use CREATE LOGIN to create a new Babelfish login with access to all databases. Babelfish logins are implemented as PostgreSQL login roles of the same name.

    That could be more explicit, but you have to create the login in a TDS connection, not while you are connected with the PostgreSQL protocol.