You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT id FROM scm_test
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
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 行记录)
您现在已经连线到数据库 "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
The text was updated successfully, but these errors were encountered:
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
1> use SCMDB;
2> go
1> select * from test;
2> go
id
The text was updated successfully, but these errors were encountered: