Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server freetds无法从任何配置文件识别版本_Sql Server_Freetds - Fatal编程技术网

Sql server freetds无法从任何配置文件识别版本

Sql server freetds无法从任何配置文件识别版本,sql-server,freetds,Sql Server,Freetds,不知道为什么 我在/etc/freetds/freetds.conf、/usr/share/freetds/freetds.conf和~/.freetds.conf中有相同的conf文件 # $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $ # # This file is installed by FreeTDS if no file by the same # name is found in the install

不知道为什么

我在/etc/freetds/freetds.conf、/usr/share/freetds/freetds.conf和~/.freetds.conf中有相同的conf文件

#   $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same 
# name is found in the installation directory.  
#
# For information about the layout of this file and its settings, 
# see the freetds.conf manpage "man freetds.conf".  

# Global settings are overridden by those in a database
# server specific section
[global]
        # TDS protocol version
    tds version = 7.4

    # Whether to write a TDSDUMP file for diagnostic purposes
    # (setting this to /tmp is insecure on a multi-user system)
;   dump file = /tmp/freetds.log
;   debug flags = 0xffff

    # Command and connection timeouts
;   timeout = 10
;   connect timeout = 10

    # If you get out-of-memory errors, it may mean that your client
    # is trying to allocate a huge buffer for a TEXT field.  
    # Try setting 'text size' to a more reasonable limit 
    text size = 64512

# A typical Sybase server
[egServer50]
    host = symachine.domain.com
    port = 5000
    tds version = 5.0

# A typical Microsoft server
[egServer70]
    host = ntmachine.domain.com
    port = 1433
    tds version = 7.0

[cdcods]
    host = *my_host*
    port = 1433
    tds version = 7.4
其中,我的_主机是我的实际mssql主机。我正在连接MSSQL 2012,因此我认为7.4是正确的

我使用的命令是
$tsql-S cdcods-U'my\U domain\my\U user'-p'my\U pass'

这是日志:

log.c:196:Starting log file for FreeTDS 0.91
        on 2017-02-03 13:20:19 with debug flags 0x4fff.
iconv.c:330:tds_iconv_open(0x15749f0, UTF-8)
iconv.c:187:local name for ISO-8859-1 is ISO-8859-1
iconv.c:187:local name for UTF-8 is UTF-8
iconv.c:187:local name for UCS-2LE is UCS-2LE
iconv.c:187:local name for UCS-2BE is UCS-2BE
iconv.c:349:setting up conversions for client charset "UTF-8"
iconv.c:351:preparing iconv for "UTF-8" <-> "UCS-2LE" conversion
iconv.c:391:preparing iconv for "ISO-8859-1" <-> "ISO-8859-1" conversion
iconv.c:394:tds_iconv_open: done
net.c:207:Connecting to *my_host* port 1433 (TDS version 4.2)
net.c:272:tds_open_socket: connect(2) returned "Operation now in progress"
net.c:312:tds_open_socket() succeeded
util.c:156:Changed query state from DEAD to IDLE
login.c:572:NT login not support using TDS 4.x or 5.0
util.c:156:Changed query state from IDLE to DEAD
util.c:331:tdserror(0x15749c0, 0x15749f0, 20002, 0)
util.c:361:tdserror: client library returned TDS_INT_CANCEL(2)
util.c:384:tdserror: returning TDS_INT_CANCEL(2)
mem.c:615:tds_free_all_results()
log.c:196:启动FreeTDS 0.91的日志文件
2017-02-03 13:20:19,带有调试标志0x4fff。
iconv.c:330:tds_iconv_打开(0x15749f0,UTF-8)
iconv.c:187:ISO-8859-1的本地名称为ISO-8859-1
图标c:187:UTF-8的本地名称为UTF-8
图标编号c:187:UCS-2LE的本地名称为UCS-2LE
图标编号c:187:UCS-2BE的本地名称为UCS-2BE
iconv.c:349:为客户端字符集“UTF-8”设置转换
iconv.c:351:为“UTF-8”“UCS-2LE”转换准备iconv
iconv.c:391:为“ISO-8859-1”“ISO-8859-1”转换准备iconv
iconv.c:394:tds_iconv_打开:完成
net.c:207:连接到*my_主机*端口1433(TDS版本4.2)
net.c:272:tds\u open\u socket:connect(2)返回“操作正在进行”
net.c:312:tds\u open\u socket()成功
util.c:156:将查询状态从死状态更改为空闲状态
login.c:572:NT登录不支持使用TDS 4.x或5.0
util.c:156:将查询状态从空闲更改为死机
util.c:331:tdserror(0x15749c0,0x15749f0,20002,0)
util.c:361:tdserror:客户端库返回了TDS\u INT\u CANCEL(2)
util.c:384:tdserror:returningtds\u INT\u CANCEL(2)
成员c:615:tds_free_all_results()

您正在运行不支持TDS 7.4版的FreeTDS v0.91。IIRC它支持的最高值是7.2。正在尝试使用7.2版

如果您想使用TDS 7.3版,至少需要FreeTDS 0.95,如果您想使用7.4版,则需要FreeTDS 1.0

我有一个公关来澄清这一点,但它还没有推出的文件


祝你好运

执行
tsql-C
应该指出它所查看的
freetds.conf
文件的位置。这样做,然后清除所有其他
freetds.conf
文件以避免混淆。如果
tsql
正在查看您的两个
freetds.conf
文件中的一个,请尝试删除其中所有无关的内容,如Sybase和Microsoft服务器的示例。我以前从未有过程序配置make和make install没有任何问题。干得好freetds团队,干得好。这对我在centos 7CentOS 7上不起作用。centos 7可以通过EPEL“yum安装”freetds 0.95并支持TDS 7.3版。这里有一个链接,指向一个安装了FreeTDS的正在工作的流浪汉CentOS 7设备:如果您有问题,请询问您尝试过的内容以及有关配置的详细信息,我们将乐意提供帮助!