连接到从传统的ASP的SQL Server 2008的命名实例 [英] Connecting to a named instance of SQL Server 2008 from classic ASP

查看:231
本文介绍了连接到从传统的ASP的SQL Server 2008的命名实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的ASP应用程序连接到SQL Server 2000的安装没有问题的网络服务器。旧code的作品:

My ASP application connects to the network server where SQL Server 2000 is installed with no problem. The old code that works:

myConn.Open ("Driver={SQL Server};
              Server=myNetwrkServer;
              Database=myDB;
              UID=myID;PWD=myPWD;Trusted_Connection=NO;")

SQL Server 2008中的一个实例安装在同一网络服务器上。新的code不工作:

An instance of SQL server 2008 was installed on the same network server. The new code doesn't work:

myConn.Open ("Driver={SQL Server Native Client 10.0};
                      Server=myNetwrkServer\SQLServ2008;
                      Database=myDB;
                      UID=myID;PWD=myPWD;Trusted_Connection="NO";)

请帮帮忙!

推荐答案

命名实例需要 SQL Server浏览器服务可启用并启动。如果此服务不是你的 myNetwrkServer 计算机上启动然后从连接网络,因为他们将不能够解决的实例名到实际监听端口将失败。

Named instances require the SQL Server Browser Service to be enabled and started. If this service is not started on your myNetwrkServer machine then the connect from network will fail as they will not be able to resolve the instance name to an actual listening port.

第二个问题是,你改变了驱动程序 {SQL服务器本机客户端10.0} 。这需要你你的ASP的计算机上安装SQL Server 2008本机驱动程序。没有理由改变这个驱动程序,你应该把司机老 {SQL服务器} ,让OLEDB解决低水平连接驱动程序为您服务。通过指定不仅本地驱动程序,但即使是版本号,你在使唤水平低连接堆栈即使它会工作,那么,当你升级到SQL Server 2008 R2的突破。只要把它在普通的 {SQL服务器} 键,让驾驶Manager图的细节。

A second problem is that you changed the driver to {SQL Server Native Client 10.0}. This requires that you install the SQL Server 2008 native driver on your ASP machine. There is no reason to change the driver, you should leave the driver to the old {SQL Server} and let OleDB resolve the low level connecting driver for you. By specifying not only the native driver, but even the version number, you are dictating the low level connectivity stack and even if it would work, it would break at when you upgrade to SQL Server 2008 R2. Just leave it at the generic {SQL Server} and let the driver manager figure out the details.

最后,你需要确保登录/密码在新服务器上定义的。

And finally, you need to make sure the login/password is defined on the new server.

作为一个通用的规则,新的code不起作用'从来都不是一个东西,你应该把在请求帮助。始终把如何这是行不通的。你得到一个异常或错误?什么异常,什么信息?想帮你不必是一个谜小说。

As a generic rule, 'new code doesn't work' is never a something you should put in a request for help. Always put how it doesn't work. Do you get an exception, or an error? What exception, what message? Trying to help you doesn't have to be a mystery novel.

这篇关于连接到从传统的ASP的SQL Server 2008的命名实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆