dbTalk Databases Forums  

SQL Express slow when connecting from client on network.

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss SQL Express slow when connecting from client on network. in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jdc
 
Posts: n/a

Default SQL Express slow when connecting from client on network. - 02-11-2009 , 09:20 PM






Hi,

I am not even sure if this is the right place to post, and I will admit
upfront I am fairly new at SQL programming.

I have written an application for a non-profit and deployed at their office
using SQL Server 2008 Express edition.

When I do an upate of data from my application on the machine that SQL
server is installed, the update takes around 5 seconds.

When I do an update of the same data from my application on an XP machine,
the same update takes around 90 seconds.

Same software, same data, only difference is machines.

Server machine is Server 2008.
Client machine is Win XP.

The application is written in C# and I am using LINQ to SQL to read/write
data.

Any help in explaining the speed difference (and how to eliminate it), would
be greatly appreciated.

Thanks

Reply With Quote
  #2  
Old   
William Vaughn \(MVP\)
 
Posts: n/a

Default Re: SQL Express slow when connecting from client on network. - 02-12-2009 , 01:24 PM






Ah, not being a LINQ fan, I can't say that I've heard of anyone use the
terms "performance" and "LINQ" in the same sentence. I would turn on the SQL
Profiler to see what's getting sent to the server by your application. It
could be LAN latency or routing issues that are not seen when connecting
with the Shared Memory provider but I expect that it's just extra overhead
added by LINQ.

--
__________________________________________________ ________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com http://betav.com/blog/billva
__________________________________________________ __________________________________________



"jdc" <jdc (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,

I am not even sure if this is the right place to post, and I will admit
upfront I am fairly new at SQL programming.

I have written an application for a non-profit and deployed at their
office
using SQL Server 2008 Express edition.

When I do an upate of data from my application on the machine that SQL
server is installed, the update takes around 5 seconds.

When I do an update of the same data from my application on an XP machine,
the same update takes around 90 seconds.

Same software, same data, only difference is machines.

Server machine is Server 2008.
Client machine is Win XP.

The application is written in C# and I am using LINQ to SQL to read/write
data.

Any help in explaining the speed difference (and how to eliminate it),
would
be greatly appreciated.

Thanks


Reply With Quote
  #3  
Old   
Rick Byham, \(MSFT\)
 
Posts: n/a

Default Re: SQL Express slow when connecting from client on network. - 02-12-2009 , 05:20 PM



Does LINQ use the SQL Server Native Client?
One possibility: Perhaps your SQL Server Native Client on the XP computer is
attempting to connect via named pipes. Named pipes is not enabled on the
client. After 85 seconds the connection attempt times out. Then it tries the
next protocol such as TCP. It connects right away and returns results.
Or the other way around trying TCP first and then named pipes?
Use SQL Server Configuration Manager on the server to see which protocols
are enabled.
Use SQL Server Configuration Manager on the client to determine the order of
protocol connection attempts.
--
Rick Byham (MSFT), SQL Server Books Online
This posting is provided "AS IS" with no warranties, and confers no rights.

"William Vaughn (MVP)" <billva (AT) NoSpamBetav (DOT) com> wrote

Quote:
Ah, not being a LINQ fan, I can't say that I've heard of anyone use the
terms "performance" and "LINQ" in the same sentence. I would turn on the
SQL Profiler to see what's getting sent to the server by your application.
It could be LAN latency or routing issues that are not seen when
connecting with the Shared Memory provider but I expect that it's just
extra overhead added by LINQ.

--
__________________________________________________ ________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com http://betav.com/blog/billva
__________________________________________________ __________________________________________



"jdc" <jdc (AT) discussions (DOT) microsoft.com> wrote in message
news:B2CCE2C9-8D0F-435A-AF86-A758A0EDBA60 (AT) microsoft (DOT) com...
Hi,

I am not even sure if this is the right place to post, and I will admit
upfront I am fairly new at SQL programming.

I have written an application for a non-profit and deployed at their
office
using SQL Server 2008 Express edition.

When I do an upate of data from my application on the machine that SQL
server is installed, the update takes around 5 seconds.

When I do an update of the same data from my application on an XP
machine,
the same update takes around 90 seconds.

Same software, same data, only difference is machines.

Server machine is Server 2008.
Client machine is Win XP.

The application is written in C# and I am using LINQ to SQL to read/write
data.

Any help in explaining the speed difference (and how to eliminate it),
would
be greatly appreciated.

Thanks



Reply With Quote
  #4  
Old   
jdc
 
Posts: n/a

Default Re: SQL Express slow when connecting from client on network. - 02-12-2009 , 07:54 PM



That was a huge help, and got me looking at the right thing.

I added "Network Library=DBNMPNTW" to my connection string, forcing the
connection to Named Pipes, and it solved the problem.

Still slower over the network, i.e. 6 seconds on the local machine, about 16
on the client, but this is fine. It is a big data set, updating numerous
tables. I still have lots of things I can do code-wise to optimize, but this
solved a huge problem where I didn't have a clue.

Anyway, thanks again for pointing me in the right direction

Jay




"Rick Byham, (MSFT)" wrote:

Quote:
Does LINQ use the SQL Server Native Client?
One possibility: Perhaps your SQL Server Native Client on the XP computer is
attempting to connect via named pipes. Named pipes is not enabled on the
client. After 85 seconds the connection attempt times out. Then it tries the
next protocol such as TCP. It connects right away and returns results.
Or the other way around trying TCP first and then named pipes?
Use SQL Server Configuration Manager on the server to see which protocols
are enabled.
Use SQL Server Configuration Manager on the client to determine the order of
protocol connection attempts.
--
Rick Byham (MSFT), SQL Server Books Online
This posting is provided "AS IS" with no warranties, and confers no rights.

"William Vaughn (MVP)" <billva (AT) NoSpamBetav (DOT) com> wrote in message
news:27BB7C09-99ED-4877-80A2-540C4280C6E7 (AT) microsoft (DOT) com...
Ah, not being a LINQ fan, I can't say that I've heard of anyone use the
terms "performance" and "LINQ" in the same sentence. I would turn on the
SQL Profiler to see what's getting sent to the server by your application.
It could be LAN latency or routing issues that are not seen when
connecting with the Shared Memory provider but I expect that it's just
extra overhead added by LINQ.

--
__________________________________________________ ________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com http://betav.com/blog/billva
__________________________________________________ __________________________________________



"jdc" <jdc (AT) discussions (DOT) microsoft.com> wrote in message
news:B2CCE2C9-8D0F-435A-AF86-A758A0EDBA60 (AT) microsoft (DOT) com...
Hi,

I am not even sure if this is the right place to post, and I will admit
upfront I am fairly new at SQL programming.

I have written an application for a non-profit and deployed at their
office
using SQL Server 2008 Express edition.

When I do an upate of data from my application on the machine that SQL
server is installed, the update takes around 5 seconds.

When I do an update of the same data from my application on an XP
machine,
the same update takes around 90 seconds.

Same software, same data, only difference is machines.

Server machine is Server 2008.
Client machine is Win XP.

The application is written in C# and I am using LINQ to SQL to read/write
data.

Any help in explaining the speed difference (and how to eliminate it),
would
be greatly appreciated.

Thanks



Reply With Quote
  #5  
Old   
Rick Byham, \(MSFT\)
 
Posts: n/a

Default Re: SQL Express slow when connecting from client on network. - 02-13-2009 , 11:40 AM



Glad that helped.
--
Rick Byham (MSFT), SQL Server Books Online
This posting is provided "AS IS" with no warranties, and confers no rights.

"jdc" <jdc (AT) discussions (DOT) microsoft.com> wrote

Quote:
That was a huge help, and got me looking at the right thing.

I added "Network Library=DBNMPNTW" to my connection string, forcing the
connection to Named Pipes, and it solved the problem.

Still slower over the network, i.e. 6 seconds on the local machine, about
16
on the client, but this is fine. It is a big data set, updating numerous
tables. I still have lots of things I can do code-wise to optimize, but
this
solved a huge problem where I didn't have a clue.

Anyway, thanks again for pointing me in the right direction

Jay




"Rick Byham, (MSFT)" wrote:

Does LINQ use the SQL Server Native Client?
One possibility: Perhaps your SQL Server Native Client on the XP computer
is
attempting to connect via named pipes. Named pipes is not enabled on the
client. After 85 seconds the connection attempt times out. Then it tries
the
next protocol such as TCP. It connects right away and returns results.
Or the other way around trying TCP first and then named pipes?
Use SQL Server Configuration Manager on the server to see which protocols
are enabled.
Use SQL Server Configuration Manager on the client to determine the order
of
protocol connection attempts.
--
Rick Byham (MSFT), SQL Server Books Online
This posting is provided "AS IS" with no warranties, and confers no
rights.

"William Vaughn (MVP)" <billva (AT) NoSpamBetav (DOT) com> wrote in message
news:27BB7C09-99ED-4877-80A2-540C4280C6E7 (AT) microsoft (DOT) com...
Ah, not being a LINQ fan, I can't say that I've heard of anyone use the
terms "performance" and "LINQ" in the same sentence. I would turn on
the
SQL Profiler to see what's getting sent to the server by your
application.
It could be LAN latency or routing issues that are not seen when
connecting with the Shared Memory provider but I expect that it's just
extra overhead added by LINQ.

--
__________________________________________________ ________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com http://betav.com/blog/billva
__________________________________________________ __________________________________________



"jdc" <jdc (AT) discussions (DOT) microsoft.com> wrote in message
news:B2CCE2C9-8D0F-435A-AF86-A758A0EDBA60 (AT) microsoft (DOT) com...
Hi,

I am not even sure if this is the right place to post, and I will
admit
upfront I am fairly new at SQL programming.

I have written an application for a non-profit and deployed at their
office
using SQL Server 2008 Express edition.

When I do an upate of data from my application on the machine that SQL
server is installed, the update takes around 5 seconds.

When I do an update of the same data from my application on an XP
machine,
the same update takes around 90 seconds.

Same software, same data, only difference is machines.

Server machine is Server 2008.
Client machine is Win XP.

The application is written in C# and I am using LINQ to SQL to
read/write
data.

Any help in explaining the speed difference (and how to eliminate it),
would
be greatly appreciated.

Thanks




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.