[ISQL]错误:无法SQLConnect:[IM004] [unixODBC] [驱动程序管理器]驱动程序SQL_HANDLE_HENV上的SQLAllocHandle失败

时间:2017-11-07 08:47:33

标签: sql-server database-connection freetds unixodbc

我已经定义了下面的连接步骤,但是我收到了一个错误。尝试了/ usr / lib64 /中的大多数可用驱动程序,但仍然是同样的错误。

  

/usr/local/etc/freetds.conf

#Server defined by Victor
[THESERVER]
   host = 172.xx.xxx.xx
   port = 1433
   tds version = 7.2
  

/etc/odbc.ini

# Defined by victor
[CRMCONNECT]
Description = "CRMConnect"
Driver = msSQL
Trace = Yes
Servername = THESERVER
hostname = 172.xx.xxx.xx
Database = "THE_DB"
UserName = "user"
Password = "password"
PROTOCOL = TCPIP
  

/etc/odbcinst.ini

[msSQL]
Description = msSQL Driver
Driver = /usr/lib64/libodbc.so.2.0.0
fileusage=1
dontdlclose=1


command
[root@darubini ~]# isql -v "CRMCONNECT" "user" "password"
Error message
[IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
[ISQL]ERROR: Could not SQLConnect

下面是可用的libodbc和libtds驱动程序的快照。我哪里会出错。 enter image description here enter image description here

0 个答案:

没有答案