Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server closed the connection unexpectedly #363

Open
cearcear123 opened this issue Jul 23, 2024 · 0 comments
Open

server closed the connection unexpectedly #363

cearcear123 opened this issue Jul 23, 2024 · 0 comments

Comments

@cearcear123
Copy link

cearcear123 commented Jul 23, 2024

Issue report

SELECT id FROM scm_test
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

Operating system

[root@localhost ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

Version of tds_fdw

postgres=# \dx
已安装扩展列表
名称 | 版本 | 架构模式 | 描述

-----------+-------+------------+-----------------------------------------------

mysql_fdw | 1.1 | public | Foreign data wrapper for querying a MySQL serv
er
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
tds_fdw | 2.0.3 | public | Foreign data wrapper for querying a TDS databa
se (Sybase or Microsoft SQL Server)

Version of PostgreSQL

postgres=# SELECT version();
version



PostgreSQL 10.23 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (
Red Hat 4.8.5-44), 64-bit
(1 行记录)

Version of FreeTDS

[root@localhost ~]# rpm -qa|grep freetds
freetds-devel-1.4.16-1.el7.x86_64
freetds-libs-1.4.16-1.el7.x86_64
freetds-1.4.16-1.el7.x86_64

Logs

您现在已经连线到数据库 "jctbreport",用户 "postgres".
jctbreport=# create extension tds_fdw;
错误: 扩展 "tds_fdw" 已经存在
jctbreport=# CREATE SERVER mssql_scm FOREIGN DATA WRAPPER tds_fdw OPTIONS (servername '192.168.2.17', port '1433', database 'DB');
CREATE SERVER
jctbreport=# CREATE USER MAPPING FOR postgres SERVER mssql_scm OPTIONS (username 'admin', password '123');
CREATE USER MAPPING
jctbreport=# CREATE FOREIGN TABLE scm_test ( id integer ) SERVER mssql_scm OPTIONS (schema_name 'dbo', table_name 'test');
CREATE FOREIGN TABLE
jctbreport=# select * from scm_test;
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

Sentences, data structures, data

[root@localhost ~]# tsql -S 192.168.2.17 -U admin -P 123
2> locale is "zh_CN.UTF-8"
3> locale charset is "UTF-8"
4> using default charset "UTF-8"
5> 1> select @@Version
6> 2> go
7>
8> Microsoft SQL Server 2014 (SP2) (KB3171021) - 12.0.5000.0 (X64)
9> Jun 17 2016 19:14:09
10> Copyright (c) Microsoft Corporation
11> Enterprise Edition (64-bit) on Windows NT 6.3 (Build 9600: ) (Hypervisor)
12>
13> (1 row affected)

1> use SCMDB;
2> go
1> select * from test;
2> go
id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant