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.

Re: OleDbConnection.Open very slow on ASP.NET App running under XP??? by David

David
Tue Sep 16 11:13:38 CDT 2003


"Jason Pritchard" <jwcpritchard@hotmail.com> wrote in message
news:uQmkBZGfDHA.2188@TK2MSFTNGP10.phx.gbl...
> 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



Re: OleDbConnection.Open very slow on ASP.NET App running under XP??? by Jason

Jason
Tue Sep 16 12:00:32 CDT 2003

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.


"David Browne" <davidbaxterbrowne no potted meat@hotmail.com> wrote in
message news:%23P$a01GfDHA.1888@TK2MSFTNGP12.phx.gbl...
>
> "Jason Pritchard" <jwcpritchard@hotmail.com> wrote in message
> news:uQmkBZGfDHA.2188@TK2MSFTNGP10.phx.gbl...
> > 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
>
>



Re: OleDbConnection.Open very slow on ASP.NET App running under XP??? by David

David
Tue Sep 16 13:01:27 CDT 2003


"Jason Pritchard" <jwcpritchard@hotmail.com> wrote in message
news:u8$WiOHfDHA.892@TK2MSFTNGP12.phx.gbl...
> 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



Re: OleDbConnection.Open very slow on ASP.NET App running under XP??? by Michael

Michael
Tue Sep 16 13:50:00 CDT 2003

"Jason Pritchard" <jwcpritchard@hotmail.com> wrote in
news:u8$WiOHfDHA.892@TK2MSFTNGP12.phx.gbl:

> 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)