Closed vishalsinghji closed 4 years ago
Your bug report is too generic.
Please report at least:
I am sharing you the syntax which i have used. MSSQL(18), POSTGRES(12),
1.> create extension tds_fdw;
2> CREATE SERVER mssql_svr FOREIGN DATA WRAPPER tds_fdw OPTIONS (servername 'localhost', port '1433', database 'test' );
3.>CREATE USER MAPPING FOR postgres SERVER mssql_svr;
4.> CREATE FOREIGN TABLE employee (id integer, name varchar(50),role varchar(50),Address varchar(50)) SERVER mssql_svr OPTIONS (schema_name 'dbo', table_name 'employee');
All the above queries are executing fine but for simple select query it is not working.
5.> select * from employee;
ERROR: DB-Library error: DB #: 20002, DB Msg: Adaptive Server connection failed (localhost), OS #: 0, OS Msg: No error, Level: 9 SQL state: HV00N
Hi @vishalsinghji,
It looks like tds_fdw
is failing to connect to the MS SQL Server instance. Are you sure that you provided the correct credentials to the user mapping? See here: https://github.com/tds-fdw/tds_fdw/blob/master/UserMappingCreation.md
@GeoffMontee thanks man i am able to resolve the issue . There was an error in user mapping .
All the things are working properly for select statement it's showing error its showing error- 20002, DB Msg: Adaptive Server connection failed (127.0.0.1), OS #: 0, OS Msg: No error, Level: 9 SQL state: HV00N