从ASP连接Sql Server 2005? [英] Connecting Sql Server 2005 from ASP?

查看:76
本文介绍了从ASP连接Sql Server 2005?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们计划在不久的将来转移到SQL Server 2005.


目前网站位于单独的服务器上,然后是数据库。

服务器的操作系统是Window 2003,目前我们的数据是SQL

Server 2000(一切正常)。

测试过程的一部分我们试图将我们的网站连接到SQL 2005

并且它根本不起作用。


我得到这个


------------------------------------------- ---------------------

ADODB.Connection error''800a0e7a''

找不到供应商。它可能没有正确安装。


当我使用以下连接字符串时

" Provider = SQLNCLI; Server = 127.0.0.1; Database = dbName; UID = UserName; PWD = UserPassword;"


(上面的字符串已经解决了少数人的问题 - 谷歌搜索它,但不是用于

我。)

-------------------------------------------- --------------------


------------------ ----------------------------------------------

这是我获取以下所有connectiong字符串的消息


用于SQL Server的Microsoft OLE DB提供程序错误''80004005''


[DBNETLIB] [ConnectionOpen(Connect())。] SQL Server不存在或

访问被拒绝。


1) - " Provider = SQLOLEDB.1;密码= UserPassword; Per sist Security

Info = True;用户ID = UserName;初始目录= ABC;数据

Source = XXX.XX.X .XX,1433"

2) - " Provider = sqloledb; Data Source = XXX.XX.X.XX,1433 ;网络

库= DBMSSOCN;初始目录= ABC;用户

ID =用户名;密码= UserPassword"

3) - "提供商= SQLOLEDB.1;持久安全信息=真;用户

ID =用户名;初始目录= ABC;数据源= ServerName \ SQLInstance"


- -------------------------------------------------- -------------

我尝试通过我们在

VB.Net 2003中开发的系统连接到SQL Server 2005,它工作正常,这是连接字符串:


" Data Source = ServerName \SQLInstance; Initial Catalog = ABC; Persist

Security Info = False; user id = UserName;密码= UserPassword"


我真的很感激任何帮助。


Mits

Hi
We are planning to move over to SQL Server 2005 in near future.

At the moment Website is on a seperate server then the Database.
OS for both the server is Window 2003 and currently our data is on SQL
Server 2000(on which everything works fine).
Part of the testing process we tried to connect our website on SQL 2005
and it does not work at all.

I get this

----------------------------------------------------------------
ADODB.Connection error ''800a0e7a''
Provider cannot be found. It may not be properly installed.

When i use following connection string
"Provider=SQLNCLI;Server=127.0.0.1;Database=dbName ;UID=UserName;PWD=UserPassword;"

(Above string has fixed problem for few people- googled it, but not for
me.)
----------------------------------------------------------------

----------------------------------------------------------------
This is the message i get for all the following connectiong string

Microsoft OLE DB Provider for SQL Server error ''80004005''

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.

1) - "Provider=SQLOLEDB.1;Password=UserPassword;Per sist Security
Info=True;User ID=UserName;Initial Catalog=ABC;Data
Source=XXX.XX.X.XX,1433"
2) - "Provider=sqloledb;Data Source=XXX.XX.X.XX,1433;Network
Library=DBMSSOCN;Initial Catalog=ABC;User
ID=UserName;Password=UserPassword"
3) - "Provider=SQLOLEDB.1;Persist Security Info=True;User
ID=UserName;Initial Catalog=ABC;Data Source = ServerName\SQLInstance"

----------------------------------------------------------------
I tried connecting to SQL Server 2005 through our system developed in
VB.Net 2003 and it works fine and here is the Connection String :

"Data Source=ServerName\SQLInstance;Initial Catalog=ABC;Persist
Security Info=False;user id=UserName;password=UserPassword"

I would really appreciate any help.

Mits

推荐答案

(MV ******* @ googlemail.com)写道:
(MV*******@googlemail.com) writes:
我们计划在不久的将来转移到SQL Server 2005 。

目前网站上有一个单独的服务器然后数据库。
服务器的操作系统是Window 2003,目前我们的数据是在SQL服务器2000上(一切正常)。

部分测试过程我们试图在SQL 2005上连接我们的网站
它根本不起作用。

我明白这个

-------- -------------------------------------------------- ------
ADODB.Connection错误''800a0e7a''
提供商无法找到。它可能没有正确安装。

当我使用以下连接字符串
Provider = SQLNCLI; Server = 127.0.0.1;


您是否在Web服务器上安装了SQL Native Client? SQL Native Client

是一个DLL,其中包含ODBC SQL Server驱动程序

和已通过支持增强的SQL Server OLE DB提供程序的版本

for SQL 2005.


SQL Native Client可以自由分发。

这是我获得的所有以下连接字符串的消息

用于SQL Server的Microsoft OLE DB提供程序错误''80004005''
[DBNETLIB] [ConnectionOpen(Connect())。] SQL Server不存在或
访问被拒绝。
We are planning to move over to SQL Server 2005 in near future.

At the moment Website is on a seperate server then the Database.
OS for both the server is Window 2003 and currently our data is on SQL
Server 2000(on which everything works fine).
Part of the testing process we tried to connect our website on SQL 2005
and it does not work at all.

I get this

----------------------------------------------------------------
ADODB.Connection error ''800a0e7a''
Provider cannot be found. It may not be properly installed.

When i use following connection string
"Provider=SQLNCLI;Server=127.0.0.1;
Did you install SQL Native Client on the web server? SQL Native Client
is a DLL that contains versions of both the ODBC SQL Server Driver
and the SQL Server OLE DB Provider that has been enhanced with support
for SQL 2005.

SQL Native Client is freely distributable.
This is the message i get for all the following connectiong string

Microsoft OLE DB Provider for SQL Server error ''80004005''

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.




请注意,默认情况下,某些版本的SQL 2005默认只允许

本地连接。您可以在Surface Area Configuration中修改它。
工具。


您可能还必须确保SQL Browser服务正在运行。



-

Erland Sommarskog,SQL Server MVP, es *** *@sommarskog.se


SQL Server 2005联机丛书
http://www.microsoft.com/technet/pro...ads/books.mspx

SQL Server 2000联机丛书
http://www.microsoft.com/sql/prodinf...ons/books.mspx



Note that by default some editions of SQL 2005 by default only permits
local connections. You can modify this in the Surface Area Configuration
Tool.

You may also have to encure that the SQL Browser service is running.


--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


嗨Erland

感谢您的回复。

我仍​​然不能使用SQL Server。


我下载了SQL Native Client并安装在Web服务器上。


我查看了SAC工具和本地和远程连接和使用两者

TCP / IP和命名管道选项被选中。我已经检查了SQL

浏览器服务正在运行。


现在我使用这个字符串


" Provider = SQLNCLI; Server = 127.0.0.1; Database = DBName; UID = UserName; PWD = UserPassword;"


i get


Microsoft SQL原生客户端错误''80040e4d''


用户''UserName''登录失败。


我创建了这个用户和这个用户有权访问

我需要的数据库。

是否有需要的特殊权限?这让我发疯了。

Mits



您可能还需要确保SQL Browser服务正在运行。


Erland Sommarskog写道:
Hi Erland
Thanks for your reply.
I still cant conntect to SQL Server.

I downloaded SQL Native Client and installed on the web server.

I looked in SAC Tool and "Local and Remote Connection" and "Using Both
TCP/IP and Named Pipes" options are selected. I have checked SQL
Browser service is running.

Now when i use this string

"Provider=SQLNCLI;Server=127.0.0.1;Database=DBName ;UID=UserName;PWD=UserPassword;"

i get

Microsoft SQL Native Client error ''80040e4d''

Login failed for user ''UserName''.

I have created this user and this user has proper permission to access
the database i need.
Is there any special permissions that need? This is driving me crazy.
Mits



You may also have to encure that the SQL Browser service is running.

Erland Sommarskog wrote:
(MV*******@googlemail.com)写道:
(MV*******@googlemail.com) writes:
我们计划在不久的将来转移到SQL Server 2005.

目前网站位于单独的服务器上,然后数据库。
服务器的操作系统是Window 2003,目前我们的数据是在SQL服务器2000上(一切正常)。

部分测试过程我们试图在SQL 2005上连接我们的网站
它不起作用一点。

我明白这个

---------------------------- ------------------------------------
ADODB.Connection error''800a0e7a''<无法找到提供商。它可能没有正确安装。

当我使用以下连接字符串
Provider = SQLNCLI; Server = 127.0.0.1;
We are planning to move over to SQL Server 2005 in near future.

At the moment Website is on a seperate server then the Database.
OS for both the server is Window 2003 and currently our data is on SQL
Server 2000(on which everything works fine).
Part of the testing process we tried to connect our website on SQL 2005
and it does not work at all.

I get this

----------------------------------------------------------------
ADODB.Connection error ''800a0e7a''
Provider cannot be found. It may not be properly installed.

When i use following connection string
"Provider=SQLNCLI;Server=127.0.0.1;



您在Web服务器上安装SQL Native Client? SQL Native Client
是一个DLL,其中包含ODBC SQL Server驱动程序和SQL Server OLE DB提供程序的版本,这些版本已通过SQL 2005的支持进行了增强。
<可以自由分发SQL Native Client。



Did you install SQL Native Client on the web server? SQL Native Client
is a DLL that contains versions of both the ODBC SQL Server Driver
and the SQL Server OLE DB Provider that has been enhanced with support
for SQL 2005.

SQL Native Client is freely distributable.

这是我为以下所有连接字符串获取的消息

用于SQL Server的Microsoft OLE DB提供程序错误''80004005''

[DBNETLIB] [ConnectionOpen(Connect())。] SQL Server不存在或
访问被拒绝。
This is the message i get for all the following connectiong string

Microsoft OLE DB Provider for SQL Server error ''80004005''

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.



请注意,默认情况下,某些版本的SQL 2005默认只允许本地连接。您可以在Surface Area Configuration
工具中修改它。

您可能还必须确保SQL Browser服务正在运行。


- -
Erland Sommarskog,SQL Server MVP, es****@sommarskog.se
SQL Server 2005的在线书籍
http://www.microsoft.com/technet/pro...ads/books.mspx
SQL Server 2000的在线书籍
http://www.microsoft.com/sql/prodinf...ons/books.mspx



Note that by default some editions of SQL 2005 by default only permits
local connections. You can modify this in the Surface Area Configuration
Tool.

You may also have to encure that the SQL Browser service is running.


--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx






SQL 2005密码区分大小写,而2000则不是,所以代码为

适用于SQL 2000登录可能无法在2005上运行。

MV ****** *@googlemail.com e:
The SQL 2005 password is case sensitive while 2000 wasn''t, so code that
works on SQL 2000 for logging in may not work on 2005.

MV*******@googlemail.com wrote:
嗨Erland
感谢您的回复。
我仍然无法使用SQL Server。

我下载了SQL Native Client并安装在网络服务器。

我查看了SAC工具和本地和远程连接。和使用两者
TCP / IP和命名管道选项被选中。我已经检查了SQL
浏览器服务正在运行。

现在我使用这个字符串

" Provider = SQLNCLI; Server = 127.0.0.1; Database = DBName ; UID = UserName; PWD = UserPassword;

我得到了

Microsoft SQL Native Client错误''80040e4d''

登录失败user''UserName''。

我创建了这个用户,并且该用户有权访问我需要的数据库。
是否需要特殊权限?这让我发疯了。

Mits


你可能还需要确保SQL浏览器服务正在运行。
< Erland Sommarskog写道:
Hi Erland
Thanks for your reply.
I still cant conntect to SQL Server.

I downloaded SQL Native Client and installed on the web server.

I looked in SAC Tool and "Local and Remote Connection" and "Using Both
TCP/IP and Named Pipes" options are selected. I have checked SQL
Browser service is running.

Now when i use this string

"Provider=SQLNCLI;Server=127.0.0.1;Database=DBName ;UID=UserName;PWD=UserPassword;"

i get

Microsoft SQL Native Client error ''80040e4d''

Login failed for user ''UserName''.

I have created this user and this user has proper permission to access
the database i need.
Is there any special permissions that need? This is driving me crazy.
Mits



You may also have to encure that the SQL Browser service is running.

Erland Sommarskog wrote:
(MV*******@googlemail.com)写道:
(MV*******@googlemail.com) writes:
我们计划搬到SQL Server 2005在不久的将来。

目前网站位于一个单独的服务器上,然后数据库。
服务器的操作系统是Window 2003,目前我们的数据是SQL
Server 2000(一切正常)。

测试过程的一部分我们试图在SQL 2005上连接我们的网站
它根本不起作用。
<我得到了这个

------------------------------------ ----------------------------
ADODB.Connection错误''800a0e7a''
无法找到提供商。它可能没有正确安装。

当我使用以下连接字符串
Provider = SQLNCLI; Server = 127.0.0.1;
We are planning to move over to SQL Server 2005 in near future.

At the moment Website is on a seperate server then the Database.
OS for both the server is Window 2003 and currently our data is on SQL
Server 2000(on which everything works fine).
Part of the testing process we tried to connect our website on SQL 2005
and it does not work at all.

I get this

----------------------------------------------------------------
ADODB.Connection error ''800a0e7a''
Provider cannot be found. It may not be properly installed.

When i use following connection string
"Provider=SQLNCLI;Server=127.0.0.1;



您在Web服务器上安装SQL Native Client? SQL Native Client
是一个DLL,其中包含ODBC SQL Server驱动程序和SQL Server OLE DB提供程序的版本,这些版本已通过SQL 2005的支持进行了增强。
<可以自由分发SQL Native Client。



Did you install SQL Native Client on the web server? SQL Native Client
is a DLL that contains versions of both the ODBC SQL Server Driver
and the SQL Server OLE DB Provider that has been enhanced with support
for SQL 2005.

SQL Native Client is freely distributable.

这是我为以下所有连接字符串获取的消息

用于SQL Server的Microsoft OLE DB提供程序错误''80004005''

[DBNETLIB] [ConnectionOpen(Connect())。] SQL Server不存在或
访问被拒绝。
This is the message i get for all the following connectiong string

Microsoft OLE DB Provider for SQL Server error ''80004005''

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.



请注意,默认情况下,某些版本的SQL 2005默认只允许本地连接。您可以在Surface Area Configuration
工具中修改它。

您可能还必须确保SQL Browser服务正在运行。


- -
Erland Sommarskog,SQL Server MVP, es****@sommarskog.se
SQL Server 2005的在线书籍
http://www.microsoft.com/technet/pro...ads/books.mspx
SQL Server 2000的在线书籍
http://www.microsoft.com/sql/prodinf...ons/books.mspx



Note that by default some editions of SQL 2005 by default only permits
local connections. You can modify this in the Surface Area Configuration
Tool.

You may also have to encure that the SQL Browser service is running.


--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx






这篇关于从ASP连接Sql Server 2005?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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