Groups | Blog | Home
all groups > sql server connect > january 2006 >

sql server connect : Slow connection to SQL2005 on just one machine



p3t3r
1/9/2006 11:26:03 AM
I have 2 SQL Server 2005 machines each with a .NET2 web app.

Machine #1 is Windows XP
Machine #2 is Windows 2003

When I use EM on Machine #1 to connect to both instances everything is fine
(and fast).
When I use EM on Machine #2 to connect to both instances, the server on
machine #1 is very slow to connect. If I up the timeout to 120 it does make a
connection but everything is slow.

Both machines are configured to allow remote connections on TCP and named
pipes. I am use SQL Native Client provider to connect fromthe web apps.

If I use the web app on machine #1 it can connect to either machine
immediately.

If I use the web app on machine #2 it times out on DB#1 and DB#2 is fine.
Even a timeout setting of 300 for DB#1 cannot get machine #2 to make a
connection.

The connection strings used on both machines are identical. They specify
server, database, user & password. The user is a sql user (not a windows
account).

Here's the error message...
An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to
SQL Server)

What would make SQL Server on machine #1 run so slow?

It does allow the EM connection (eventually).
It does not allow the web app to connection at all.
stcheng NO[at]SPAM online.microsoft.com
1/10/2006 8:12:18 AM
Hi P3T3R,

Welcome to MSDN newsgroup.
As for the Sqlserver connection problem, based on my experience, it is
possibly caused by the XP machine's network connection for sqlserver....
Since after XP SP2, the windows firewall on xp box will prevent many
certain network connection from external machines. So I think you can first
try connecting to that XP machine's sqlserver from some other machines to
see whether the speed is also slow... And if so, we can confirm that it is
the xp's connection problem...

Then, you can try turn off the XP box's windows firewall to see whether it
helps. Also, here is a kb article mentioned some setting about hosting
SQLSERVER on windows xp box...

#How to configure Windows XP Service Pack 2 (SP2) for use with SQL Server
http://support.microsoft.com/kb/841249/en-us

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




--------------------
| Thread-Topic: Slow connection to SQL2005 on just one machine
| thread-index: AcYVUoePyza4dYuGSW+nbB3ChrUajw==
| X-WBNR-Posting-Host: 207.34.136.130
| From: "=?Utf-8?B?cDN0M3I=?=" <P3T3R@newsgroups.nospam>
| Subject: Slow connection to SQL2005 on just one machine
| Date: Mon, 9 Jan 2006 11:26:03 -0800
| Lines: 37
| Message-ID: <9D9A1B79-A179-405F-B37C-B5BA05AEC277@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.connect
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.connect:46581
| X-Tomcat-NG: microsoft.public.sqlserver.connect
|
| I have 2 SQL Server 2005 machines each with a .NET2 web app.
|
| Machine #1 is Windows XP
| Machine #2 is Windows 2003
|
| When I use EM on Machine #1 to connect to both instances everything is
fine
| (and fast).
| When I use EM on Machine #2 to connect to both instances, the server on
| machine #1 is very slow to connect. If I up the timeout to 120 it does
make a
| connection but everything is slow.
|
| Both machines are configured to allow remote connections on TCP and named
| pipes. I am use SQL Native Client provider to connect fromthe web apps.
|
| If I use the web app on machine #1 it can connect to either machine
| immediately.
|
| If I use the web app on machine #2 it times out on DB#1 and DB#2 is fine.
| Even a timeout setting of 300 for DB#1 cannot get machine #2 to make a
| connection.
|
| The connection strings used on both machines are identical. They specify
| server, database, user & password. The user is a sql user (not a windows
| account).
|
| Here's the error message...
| An error has occurred while establishing a connection to the server. When
| connecting to SQL Server 2005, this failure may be caused by the fact
that
| under the default settings SQL Server does not allow remote connections.
| (provider: Named Pipes Provider, error: 40 - Could not open a connection
to
| SQL Server)
|
| What would make SQL Server on machine #1 run so slow?
|
| It does allow the EM connection (eventually).
| It does not allow the web app to connection at all.
|
|
p3t3r
1/10/2006 11:28:03 AM
Thank you Steven, disabling the firewall restored the speed.

I switched the firewall back on and added the port for the TCP connection to
the firewall and it still worked.

This fixes it for me.

[quoted text, click to view]
stcheng NO[at]SPAM online.microsoft.com
1/11/2006 2:28:53 AM
That's cool P3T3R,

Glad that it works. Have a good day!

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Slow connection to SQL2005 on just one machine
| thread-index: AcYWG/l8dL2Jo49kTICO6l017zlEcw==
| X-WBNR-Posting-Host: 207.34.136.130
| From: "=?Utf-8?B?cDN0M3I=?=" <P3T3R@newsgroups.nospam>
| References: <9D9A1B79-A179-405F-B37C-B5BA05AEC277@microsoft.com>
<Ktm6Y2bFGHA.3680@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: Slow connection to SQL2005 on just one machine
| Date: Tue, 10 Jan 2006 11:28:03 -0800
| Lines: 107
| Message-ID: <BA2026BC-7589-4A86-A722-9A0A260649C9@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.connect
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.connect:46599
| X-Tomcat-NG: microsoft.public.sqlserver.connect
|
| Thank you Steven, disabling the firewall restored the speed.
|
| I switched the firewall back on and added the port for the TCP connection
to
| the firewall and it still worked.
|
| This fixes it for me.
|
[quoted text, click to view]
|
| > Hi P3T3R,
| >
| > Welcome to MSDN newsgroup.
| > As for the Sqlserver connection problem, based on my experience, it is
| > possibly caused by the XP machine's network connection for
sqlserver....
| > Since after XP SP2, the windows firewall on xp box will prevent many
| > certain network connection from external machines. So I think you can
first
| > try connecting to that XP machine's sqlserver from some other machines
to
| > see whether the speed is also slow... And if so, we can confirm that
it is
| > the xp's connection problem...
| >
| > Then, you can try turn off the XP box's windows firewall to see whether
it
| > helps. Also, here is a kb article mentioned some setting about hosting
| > SQLSERVER on windows xp box...
| >
| > #How to configure Windows XP Service Pack 2 (SP2) for use with SQL
Server
| > http://support.microsoft.com/kb/841249/en-us
| >
| > Regards,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| >
| > --------------------
| > | Thread-Topic: Slow connection to SQL2005 on just one machine
| > | thread-index: AcYVUoePyza4dYuGSW+nbB3ChrUajw==
| > | X-WBNR-Posting-Host: 207.34.136.130
| > | From: "=?Utf-8?B?cDN0M3I=?=" <P3T3R@newsgroups.nospam>
| > | Subject: Slow connection to SQL2005 on just one machine
| > | Date: Mon, 9 Jan 2006 11:26:03 -0800
| > | Lines: 37
| > | Message-ID: <9D9A1B79-A179-405F-B37C-B5BA05AEC277@microsoft.com>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.sqlserver.connect
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.connect:46581
| > | X-Tomcat-NG: microsoft.public.sqlserver.connect
| > |
| > | I have 2 SQL Server 2005 machines each with a .NET2 web app.
| > |
| > | Machine #1 is Windows XP
| > | Machine #2 is Windows 2003
| > |
| > | When I use EM on Machine #1 to connect to both instances everything
is
| > fine
| > | (and fast).
| > | When I use EM on Machine #2 to connect to both instances, the server
on
| > | machine #1 is very slow to connect. If I up the timeout to 120 it
does
| > make a
| > | connection but everything is slow.
| > |
| > | Both machines are configured to allow remote connections on TCP and
named
| > | pipes. I am use SQL Native Client provider to connect fromthe web
apps.
| > |
| > | If I use the web app on machine #1 it can connect to either machine
| > | immediately.
| > |
| > | If I use the web app on machine #2 it times out on DB#1 and DB#2 is
fine.
| > | Even a timeout setting of 300 for DB#1 cannot get machine #2 to make
a
| > | connection.
| > |
| > | The connection strings used on both machines are identical. They
specify
| > | server, database, user & password. The user is a sql user (not a
windows
| > | account).
| > |
| > | Here's the error message...
| > | An error has occurred while establishing a connection to the server.
When
| > | connecting to SQL Server 2005, this failure may be caused by the fact
| > that
| > | under the default settings SQL Server does not allow remote
connections.
| > | (provider: Named Pipes Provider, error: 40 - Could not open a
connection
| > to
| > | SQL Server)
| > |
| > | What would make SQL Server on machine #1 run so slow?
| > |
| > | It does allow the EM connection (eventually).
| > | It does not allow the web app to connection at all.
| > |
| > |
| >
| >
|
AddThis Social Bookmark Button