tds_fdw
tds_fdw copied to clipboard
ERROR: DB-Library error: DB #: 20017, DB Msg: Unexpected EOF from the server, OS #: 115, OS Msg: Operation now in progress, Level: 9
Hi! I use SQL Server and get the following error ERROR: DB-Library error: DB #: 20017, DB Msg: Unexpected EOF from the server, OS #: 115, OS Msg: Operation now in progress, Level: 9` when I try to execute some query. Server is made with the following options: OPTIONS (servername 'IP', port '1433', database 'database', tds_version '7.1');
Postgres version: 9.6 SQL Server version: 2014.
DUMP file: 16:58:23.203294 3692 (token.c:328):tds_process_login_tokens() 16:58:23.203307 3692 (util.c:331):tdserror(0x28d75b0, 0x2999880, 20017, 115) 16:58:23.203315 3692 (dblib.c:7929):dbperror(0x28cb470, 20017, 115) 16:58:23.203326 3692 (dblib.c:7981):20017: "Unexpected EOF from the server" I used user which already is confirmed to be work.
Thanks for help!
what query do you use ?
@ale2317 For start I initiate Server and describe table with mapping as it said in documentation:
CREATE SERVER mssql_svr
FOREIGN DATA WRAPPER tds_fdw
OPTIONS (servername 'MY IP', port '1433', database 'MY DB');
CREATE FOREIGN TABLE Tbl(
Id bigint,
...
UpdatedAtUtc timestamp)
SERVER mssql_svr
OPTIONS (table_name 'dbo.Tbl', row_estimate_method 'showplan_all');
CREATE USER MAPPING FOR postgres
SERVER mssql_svr
OPTIONS (username 'username', password 'password');
Then I use the following query:
SELECT *
FROM Tbl
LIMIT 10
We use postgres 9.5 (and 9.6) with tds_fdw 1,7 and 2.0. That should work. Can you use SQL Server Profiler on the mssql server to log your auth an querys ?
Maybe firewall rules
- SQL Server 2008 R2
- PostgreSQL 9.6
Similar random(!) unpredictable error: [HV00L] ERROR: DB-Library error: DB #: 20017, DB Msg: Unexpected EOF from the server (), OS #: 0, OS Msg: No error: 0, Level: 9 OR DB-Library error: DB #: 20013, DB Msg: Unknown host machine name (), OS #: 0, OS Msg: No error: 0, Level: 2
The problem started after upgrade PosgreSQL from 9.4 to 9.6. Tried TDS Versions: 7.2, 7,3, 7.4, 8.0. Before upgrade PosgreSQL used TDS 8.0 and everything was OK.
Please share with possible decisions..