Running application faster with ADO.net Connection

M

myra_el_khoury

hi,

I'm using ADO.NET (in VB.net) in a windows service application to
perform a process on
SQL Server 2000. This process runs quickly if the database is locally
installed, but takes 30seconds when connecting to the server through
the network when the database is on the server.
So I had to add to the connection string "Connect timeout=30" , so it
doesn't give me error as Timeout expired.

ConnString = ""Data Source=" & ServerName & ";Initial Catalog= " &
DatabaseName & " ;Integrated Security=True;Connect Timeout=30""

is there a way to decrease the time taken by the application to run on
the server, while using the ADO connection is faster from the same
server

Regards,
MK
 
C

Cor Ligthert [MVP]

Myra,
is there a way to decrease the time taken by the application to run on
the server, while using the ADO connection is faster from the same
server

That all has to do with:
The speed of your Lan (type and througput)
The kind of databaseserver you use (Jet, Oracle, SQL etc)
The kind of server (computer) you use (with all things about it in that,
processors, memory etc)
The load on your server (concurrent clients)
The load on your database (concurrent clients and complexity of
processes)

A lot of calculating on your database server can slow that down, on the
other hand retrieving a lot of data on your client can slowing your network
down.

Therefore you ask in my opinion to much from us to give you a real reliable
answer,

An example in this, if you have a very fast server (hardware) than you can
think about doing more on your server, if you have a very fast Lan, than you
can think to do more on your clients.

Just my thought reading your message.

Cor
 
W

William \(Bill\) Vaughn

Cor is right, but when accessing a remote named instance, you sometimes have
to re-resolve the name as well as the authentication credentials over the
network. This can also take time. Are using a named SQL Server instance or
addressing it via TCP/IP? What other traffic is on the LAN? Even over a slow
link, 30 seconds is a long time unless it's a JET database or some other
engine that's trying to cache DDL structure on first open.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top