<i id='wSOsv'><tr id='wSOsv'><dt id='wSOsv'><q id='wSOsv'><span id='wSOsv'><b id='wSOsv'><form id='wSOsv'><ins id='wSOsv'></ins><ul id='wSOsv'></ul><sub id='wSOsv'></sub></form><legend id='wSOsv'></legend><bdo id='wSOsv'><pre id='wSOsv'><center id='wSOsv'></center></pre></bdo></b><th id='wSOsv'></th></span></q></dt></tr></i><div id='wSOsv'><tfoot id='wSOsv'></tfoot><dl id='wSOsv'><fieldset id='wSOsv'></fieldset></dl></div>

      1. <legend id='wSOsv'><style id='wSOsv'><dir id='wSOsv'><q id='wSOsv'></q></dir></style></legend>
        <tfoot id='wSOsv'></tfoot>

          <bdo id='wSOsv'></bdo><ul id='wSOsv'></ul>

      2. <small id='wSOsv'></small><noframes id='wSOsv'>

      3. “Adaptive Server 不可用或不存在"从 PHP 连接到 SQL Server 时出错

        quot;Adaptive Server is unavailable or does not existquot; error connecting to SQL Server from PHP(“Adaptive Server 不可用或不存在从 PHP 连接到 SQL Server 时出错)

        • <bdo id='BioDZ'></bdo><ul id='BioDZ'></ul>

                <tbody id='BioDZ'></tbody>

                • <tfoot id='BioDZ'></tfoot>

                  <small id='BioDZ'></small><noframes id='BioDZ'>

                  <i id='BioDZ'><tr id='BioDZ'><dt id='BioDZ'><q id='BioDZ'><span id='BioDZ'><b id='BioDZ'><form id='BioDZ'><ins id='BioDZ'></ins><ul id='BioDZ'></ul><sub id='BioDZ'></sub></form><legend id='BioDZ'></legend><bdo id='BioDZ'><pre id='BioDZ'><center id='BioDZ'></center></pre></bdo></b><th id='BioDZ'></th></span></q></dt></tr></i><div id='BioDZ'><tfoot id='BioDZ'></tfoot><dl id='BioDZ'><fieldset id='BioDZ'></fieldset></dl></div>
                  <legend id='BioDZ'><style id='BioDZ'><dir id='BioDZ'><q id='BioDZ'></q></dir></style></legend>
                  本文介绍了“Adaptive Server 不可用或不存在"从 PHP 连接到 SQL Server 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试使用 unixODBC 和 FreeTDS 从我的 Mac 连接到 SQL Server 2005 数据库,正如我概述的那样 此处.但是,当我尝试使用相同的设置连接到不同的数据库时,我得到:

                  I'm attempting to connect to a SQL Server 2005 DB from my Mac using unixODBC and FreeTDS as I have outlined here. However, when I try to connect in to a different DB using the same setup, I get:

                  Connection Failed:[FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist.
                  

                  这是我的 freetds.conf 设置:

                  Here is my freetds.conf setup:

                  [my_db]
                  host = 12.34.56.789
                  port = 1433
                  tds version = 8.0
                  

                  这是我的 odbc.ini:

                  And here is my odbc.ini:

                  [my_dsn]
                  Driver = /opt/local/lib/libtdsodbc.so
                  Description = My Database
                  Trace = no
                  Servername = my_db
                  Database = MyDB
                  
                  [ODBC Data Sources]
                  my_dsn = FreeTDS
                  

                  我仍然能够连接到我在这台计算机上设置的另一个数据库(在我上面链接的博客文章中描述),所以我很确定错误不在 Mac 端.我已在服务器上验证我使用的是正确的 IP 地址和端口.关于可能是什么问题的任何想法,如果它在服务器端?

                  I am still able to connect to the other DB I set up on this computer (described in my blog post linked above), so I'm pretty sure that the error isn't on the Mac end. I've verified on the server that I'm using the correct IP address and port. Any thoughts on what could be the problem, and if it's on the server end?

                  推荐答案

                  1.查看有关 SQL 服务器的信息

                  tsql -LH SERVER_IP_ADDRESS
                  
                  locale is "C"
                  locale charset is "646"
                  ServerName TITAN
                  InstanceName MSSQLSERVER
                  IsClustered No
                  Version 8.00.194
                  tcp 1433
                  np \TITANpipesqlquery
                  

                  2.设置你的 freetds.conf

                  tsql -C    
                  freetds.conf directory: /usr/local/etc
                  
                  [TITAN]
                  host = SERVER_IP_ADDRESS
                  port = 1433
                  tds version = 7.2
                  

                  3 试试

                  tsql -S TITAN -U user -P password
                  

                   'dsn' => 'dblib:host=TITAN:1433;dbname=YOURDBNAME',
                  

                  另见http://www.freetds.org/userguide/confirminstall.htm (例 3-5.)

                  如果您收到消息 20009,请记住您尚未连接到机器.这是配置或网络问题,而不是协议故障.验证服务器已启动,具有 FreeTDS 正在使用的名称和 IP 地址,并且正在侦听配置的端口.

                  If you get message 20009, remember you haven't connected to the machine. It's a configuration or network issue, not a protocol failure. Verify the server is up, has the name and IP address FreeTDS is using, and is listening to the configured port.

                  这篇关于“Adaptive Server 不可用或不存在"从 PHP 连接到 SQL Server 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Proxy Authentication Required with cURL(cURL 需要代理身份验证)
                  How to use a SOCKS 5 proxy with cURL?(如何使用带有 cURL 的 SOCKS 5 代理?)
                  How to use HTTP_X_FORWARDED_FOR properly?(如何正确使用 HTTP_X_FORWARDED_FOR?)
                  file_get_contents behind a proxy?(代理后面的 file_get_contents ?)
                  pecl install cassandra throws: quot;error: Unable to load libcassandraquot;(pecl install cassandra 抛出:“错误:无法加载 libcassandra)
                  Installing php datastax driver on ubuntu(在 ubuntu 上安装 php datastax 驱动)

                  <small id='Lu9RK'></small><noframes id='Lu9RK'>

                      • <bdo id='Lu9RK'></bdo><ul id='Lu9RK'></ul>
                          <tfoot id='Lu9RK'></tfoot>
                            <i id='Lu9RK'><tr id='Lu9RK'><dt id='Lu9RK'><q id='Lu9RK'><span id='Lu9RK'><b id='Lu9RK'><form id='Lu9RK'><ins id='Lu9RK'></ins><ul id='Lu9RK'></ul><sub id='Lu9RK'></sub></form><legend id='Lu9RK'></legend><bdo id='Lu9RK'><pre id='Lu9RK'><center id='Lu9RK'></center></pre></bdo></b><th id='Lu9RK'></th></span></q></dt></tr></i><div id='Lu9RK'><tfoot id='Lu9RK'></tfoot><dl id='Lu9RK'><fieldset id='Lu9RK'></fieldset></dl></div>

                            <legend id='Lu9RK'><style id='Lu9RK'><dir id='Lu9RK'><q id='Lu9RK'></q></dir></style></legend>
                              <tbody id='Lu9RK'></tbody>