Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / September 2005

Tip: Looking for answers? Try searching our database.

Speed up of connection to SQL Sever from VB.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
grs@shafferca.com - 26 Sep 2005 19:08 GMT
  I am running a tiny SQL Server 2000 database on a Small Business
server premium edition. I am connecting (using SQL Server security
logins) to it from 2 XP professional workstations each running the same
simple VB.NET program. (I am not running the server as a domain
controller, just using a workgroup.) From one of the machines, the
opening of the database connection is immediate (small fraction of a
second). From the other it is very slow (20 seconds). I have tried to
fool around with network settings, but both machines seem to be set up
with the same parameters. What am I missing? (I had the same problem
previously when the SQL Server was running on another XP workstation.)
Sahil Malik [MVP] - 26 Sep 2005 19:22 GMT
Are the connection strings same on the two machines?

Signature

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------
---------------

>    I am running a tiny SQL Server 2000 database on a Small Business
> server premium edition. I am connecting (using SQL Server security
[quoted text clipped - 6 lines]
> with the same parameters. What am I missing? (I had the same problem
> previously when the SQL Server was running on another XP workstation.)
grs@shafferca.com - 26 Sep 2005 19:54 GMT
Absolutely the same. Just sa as the login, a password and the Server
name.
grs@shafferca.com - 26 Sep 2005 19:59 GMT
Correction to previos post. Should read: Absolutely the same. Just sa
as the login, a password and the database
name.
David Browne - 26 Sep 2005 19:56 GMT
>   I am running a tiny SQL Server 2000 database on a Small Business
> server premium edition. I am connecting (using SQL Server security
[quoted text clipped - 6 lines]
> with the same parameters. What am I missing? (I had the same problem
> previously when the SQL Server was running on another XP workstation.)

You might be connecting through different net libraries from the different
machines.  You can take control of the net library by specifying it in your
connection string (otherwise client-side default settings control it).

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemdatasqlclientsqlconnectionclasstopic.asp


TCP/IP will generally give you the most reliable performance on most
networks.

Network Library=dbmssocn

David
grs@shafferca.com - 26 Sep 2005 20:12 GMT
Thanks for the reply. I will try it on site when I get there Wednesday.
These systems were originally set up by people with minimal knowledge
of technical matters. I assume everything was defaulted. But it is
worth a try. I will let you know how things work out.
grs@shafferca.com - 30 Sep 2005 19:08 GMT
I tried it. There was perhaps some improvement, but it still takes over
10-15 seconds to open the SQL server database from this machine. All
other machines take a fraction of a second. I also created manual HOSTS
and LMHOSTS files. This produced a minor improvement. The network
hardware was tested, and everything checked out. I am stumped. Anyone
have any new ideas?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.