OleDbConnection.Open very slow on ASP.NET App running under XP???

  • Thread starter Thread starter Jason Pritchard
  • Start date Start date
J

Jason Pritchard

Does anybody know why when connecting to an Oracle database from a ASP.NET
web app running under Windows XP, the connection is very slow. It takes
about 2 minutes to open the database connection. The same code running on a
NT2000 machine executes in under 4 seconds.

To test this, is very simple
On an XP machine, create a new ASP.NET app and create a new OleDbConnection
object. Assign a valid connection string and execute the Open statement.
That is it.

The connection string I used was:
Private f_cConn As String = "Provider=MSDAORA.1;Password=JJ;User ID=JJ;Data
Source=OLT"

ANy help is greatly need and appreciated.
 
Jason Pritchard said:
Does anybody know why when connecting to an Oracle database from a ASP.NET
web app running under Windows XP, the connection is very slow. It takes
about 2 minutes to open the database connection. The same code running on a
NT2000 machine executes in under 4 seconds.

To test this, is very simple
On an XP machine, create a new ASP.NET app and create a new OleDbConnection
object. Assign a valid connection string and execute the Open statement.
That is it.

The connection string I used was:
Private f_cConn As String = "Provider=MSDAORA.1;Password=JJ;User ID=JJ;Data
Source=OLT"

ANy help is greatly need and appreciated.

What version of the Oracle Clinent are you running?
Does SQL*Plus show the same slowness from the server?
What kind of Oracle name is 'OLT'?


David
 
Oracle 8.x client
SQL Plus, excellent response time. Even from a DOT net windows application
the response time is less the 3 seconds.
OLT is the name of the instance of the oracle server I am conntecting to.

This is only happening on ASP.NET applications that are run on XP boxes.
IE if you move the same code to a NT 2000 box the reponse is less then 3
seconds.

Any help really needed. Development is very slow as it takes so much time to
connect to the database.

Also Once the connection is made, all queries are really fast. It is just
the conneciton that is slow.
This is also happening on all our XP boxes, not just one.
 
Jason Pritchard said:
Oracle 8.x client
SQL Plus, excellent response time. Even from a DOT net windows application
the response time is less the 3 seconds.
OLT is the name of the instance of the oracle server I am conntecting to.

This is only happening on ASP.NET applications that are run on XP boxes.
IE if you move the same code to a NT 2000 box the reponse is less then 3
seconds.

Any help really needed. Development is very slow as it takes so much time to
connect to the database.

Also Once the connection is made, all queries are really fast. It is just
the conneciton that is slow.
This is also happening on all our XP boxes, not just one.
Ok.

See if any of the following have any effect:

-In your machine.config change the ASP.NET processModel to run pages under a
local administrator account,

<processModel . . . userName="administrator" password="FluffyPuppy" . . ./>

-In your tnsnames.ora, use an IP address instead of a host name, eg:


OLT =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.24.445)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = oracle)
)
)

-Install the Oracle 9i client.

David
 
Oracle 8.x client
SQL Plus, excellent response time. Even from a DOT net windows
application the response time is less the 3 seconds.
OLT is the name of the instance of the oracle server I am conntecting
to.

This is only happening on ASP.NET applications that are run on XP
boxes. IE if you move the same code to a NT 2000 box the reponse is
less then 3 seconds.

Any help really needed. Development is very slow as it takes so much
time to connect to the database.

Also Once the connection is made, all queries are really fast. It is
just the conneciton that is slow.
This is also happening on all our XP boxes, not just one.

Do you have the NetBUI protocal installed? If so that could be the
problem. If it is attempting to resolve the server name using NetBui it
will be very slow on Windows XP, and remain fast on Windows 2k and NT.

Using TCP instead will solve that problem as David suggested.

--
Michael Lang, MCSD
See my .NET open source projects
http://sourceforge.net/projects/colcodegen (simple code generator)
http://sourceforge.net/projects/dbobjecter (database app code generator)
http://sourceforge.net/projects/genadonet ("generic" ADO.NET)
 
Back
Top