We are upgrading from an environment where the development web server, the SQL Server 2005, and SQL Server data are all on the same machine, a Windows XP Machine. We are upgrading to having the web server on one Windows 2008 server, the SQL Server on a 2nd Windows 2008 Server, and to Server to a Windows 2008 server, nd the data on a SAN.
我们正在从开发Web服务器,SQL Server 2005和SQL Server数据都在同一台机器(Windows XP机器)上的环境中进行升级。我们正在升级到在一台Windows 2008服务器上安装Web服务器,在第二台Windows 2008服务器上安装SQL Server,在服务器上升级到Windows 2008服务器,以及SAN上的数据。
Now we are getting the error message:
现在我们收到错误消息:
A connection was succesfully established with the server, but then an error occured during the login process. (provider: named pipes provider, error 0, no process is on the other end of the pipe.)
已成功与服务器建立连接,但在登录过程中发生错误。 (提供者:命名管道提供者,错误0,管道的另一端没有进程。)
The network guy thinks it is a problem with the connection string:
网络人认为这是连接字符串的问题:
<add name="CNString"
connectionString="Data Source=WEBSERVER;
Initial Catalog=PCIdb;
User ID=sa;Password=pass;"
providerName="System.Data.SqlClient"/>
Can anyone help out here?
任何人都可以帮忙吗?
4 个解决方案
#1
2
This can be caused by any number of reasons, but the first thing to look at is the configuration and setup of the SQL Server itself.
这可能是由多种原因引起的,但首先要看的是SQL Server本身的配置和设置。
Are named pipes enabled on the server? You can check this through the server configuration manager (on the SQL Server machine itself).
是否在服务器上启用了命名管道?您可以通过服务器配置管理器(在SQL Server计算机本身上)进行检查。
Is the user on the connection string (or the connection pool user if you are using SSPI) setup on the server?
用户是否在服务器上设置连接字符串(如果使用SSPI,则为连接池用户)?
Note:
I do hope the connection string you put up is an edited version of your real one, as there are a couple of issues with it:
我希望你提供的连接字符串是你真正的连接字符串的编辑版本,因为它有几个问题:
- Using the
sa
login - you should never do that as now any SQL exploit can do any damage it wants - Calling a sql server "webserver" - a really confusion naming decision
使用sa登录 - 你永远不应该这样做,因为现在任何SQL漏洞都可以做任何想要的破坏
调用sql server“webserver” - 一个非常混乱的命名决定
When it comes to connection strings, look at connectionstrings.com - they hold a good list of valid connection strings to many databases using different providers.
当谈到连接字符串时,请查看connectionstrings.com - 它们为使用不同提供程序的许多数据库保存了一个有效连接字符串的良好列表。
#2
3
Is your SQL Server really called WEBSERVER
(DataSource="WEBSERVER"
) ??
你的SQL Server真的叫做WEBSERVER(DataSource =“WEBSERVER”)??
Also, I would never EVER use the sa
account in a connection string - NEVER, period. Use an application specific user or something, but do not use the sa
account under any circumstances.
此外,我永远不会在连接字符串中使用sa帐户 - 从不,期间。使用特定于应用程序的用户或其他内容,但在任何情况下都不要使用sa帐户。
#3
1
I got that error before...Make sure SQL server services are started
我之前遇到了这个错误...确保SQL服务器服务已启动
If that's not it, change the authentication mode to both server and windows.
如果不是这样,请将身份验证模式更改为服务器和窗口。
#4
0
It could be a connectionstring problem. Try comparing your connectionstring to the connectionstrings at http://www.connectionstrings.com but it could also be that the remote connection or the remote server (the webserver in this case) isn't allowed to connect to SQL. Check if remote connections are allowed and named pipes and/or TCP/IP protocols are enabled on the database server.
这可能是一个连接串问题。尝试将您的连接字符串与http://www.connectionstrings.com上的连接字符串进行比较,但也可能是远程连接或远程服务器(在本例中为Web服务器)不允许连接到SQL。检查是否允许远程连接,并在数据库服务器上启用命名管道和/或TCP / IP协议。
But, based on the scenario you've described, I'd say it's the database-end that's refusing the connection (since you've already had a working solution).
但是,根据你所描述的场景,我会说它是拒绝连接的数据库端(因为你已经有了一个可行的解决方案)。
#1
2
This can be caused by any number of reasons, but the first thing to look at is the configuration and setup of the SQL Server itself.
这可能是由多种原因引起的,但首先要看的是SQL Server本身的配置和设置。
Are named pipes enabled on the server? You can check this through the server configuration manager (on the SQL Server machine itself).
是否在服务器上启用了命名管道?您可以通过服务器配置管理器(在SQL Server计算机本身上)进行检查。
Is the user on the connection string (or the connection pool user if you are using SSPI) setup on the server?
用户是否在服务器上设置连接字符串(如果使用SSPI,则为连接池用户)?
Note:
I do hope the connection string you put up is an edited version of your real one, as there are a couple of issues with it:
我希望你提供的连接字符串是你真正的连接字符串的编辑版本,因为它有几个问题:
- Using the
sa
login - you should never do that as now any SQL exploit can do any damage it wants - Calling a sql server "webserver" - a really confusion naming decision
使用sa登录 - 你永远不应该这样做,因为现在任何SQL漏洞都可以做任何想要的破坏
调用sql server“webserver” - 一个非常混乱的命名决定
When it comes to connection strings, look at connectionstrings.com - they hold a good list of valid connection strings to many databases using different providers.
当谈到连接字符串时,请查看connectionstrings.com - 它们为使用不同提供程序的许多数据库保存了一个有效连接字符串的良好列表。
#2
3
Is your SQL Server really called WEBSERVER
(DataSource="WEBSERVER"
) ??
你的SQL Server真的叫做WEBSERVER(DataSource =“WEBSERVER”)??
Also, I would never EVER use the sa
account in a connection string - NEVER, period. Use an application specific user or something, but do not use the sa
account under any circumstances.
此外,我永远不会在连接字符串中使用sa帐户 - 从不,期间。使用特定于应用程序的用户或其他内容,但在任何情况下都不要使用sa帐户。
#3
1
I got that error before...Make sure SQL server services are started
我之前遇到了这个错误...确保SQL服务器服务已启动
If that's not it, change the authentication mode to both server and windows.
如果不是这样,请将身份验证模式更改为服务器和窗口。
#4
0
It could be a connectionstring problem. Try comparing your connectionstring to the connectionstrings at http://www.connectionstrings.com but it could also be that the remote connection or the remote server (the webserver in this case) isn't allowed to connect to SQL. Check if remote connections are allowed and named pipes and/or TCP/IP protocols are enabled on the database server.
这可能是一个连接串问题。尝试将您的连接字符串与http://www.connectionstrings.com上的连接字符串进行比较,但也可能是远程连接或远程服务器(在本例中为Web服务器)不允许连接到SQL。检查是否允许远程连接,并在数据库服务器上启用命名管道和/或TCP / IP协议。
But, based on the scenario you've described, I'd say it's the database-end that's refusing the connection (since you've already had a working solution).
但是,根据你所描述的场景,我会说它是拒绝连接的数据库端(因为你已经有了一个可行的解决方案)。