简体   繁体   中英

Unable to connect SQL Server with ODBC drivers on linux

I have install the driver odbc 2.3.0 on linux by this reference: https://www.microsoft.com/en-ca/download/confirmation.aspx?id=28160

All these steps work correctly.

This is my configation:

SERVER:

  • Oracle server is on linux
  • SQL Server is on windows

SQL Server:

My login and password are the same. It's: demo
When I use cmd and I use the command: "ipconfig", I can get my IP
My IP is: 192.168.0.106

This is how I do my connection manually and it work:

手动连接

After the installation, i have configure my files odbinst.ini and odbc.ini

This is my file odbcinst.ini:

odbcinst.ini

This is my file odbc.ini:

数据库配置文件

This is where my driver is download:

在此处输入图片说明

My instance name is MSSQLSERVER and TCP-IP and listen all are enable:

Instance-name, tcp-ip 和 listen all

Dynamic port is blank and static port is 1433:

动态端口

As you see, I can be connect on localhost with the command line:

sqlcmd -S 192.168.0.106 -d demo -U demo -P demo 

命令行连接

But, I can't connect with my Oracle server on putty with this command line:

isql MSSQLSERVER -v

服务器命令行

Why it don't work?

  • The server is start
  • Allows remotely connexion is enable
  • I have add port 1433 in firewall setting
  • I tried to disable the firewall, nothing change

Something is wrong in my configuration?

Problem reseolve :

Change sqlServer Localhost to SqlServer.

You can't connect 2 server if they are on localhost. You need an oracle SQL Server and SQlServer working not on LocalHost

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM