By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,058 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,058 IT Pros & Developers. It's quick & easy.

System.Data.OracleClient.OracleConnection.Open() slow

P: n/a
When initially loaded, my web application (below) takes ~120000 milliseconds
to open its connection. But repeated executions take 0 milliseconds each.
But when I wait for approx. 5 minutes and try again, it takes another 120000
milliseconds for Open(). This behavior gets really irritating with the real
web application that I'm working on.

But the thing I don't understand is, when I make a console app that does the
same sort of thing, the problem is
not there at all; that app executes < 1s each time. I can also use other
apps (e.g. Golden32) that use the same ODBC connector, and they work fine.
And, I created the same web app on my co-worker's machine, and it initially
runs at 20000 ms, even though his machine is a 300 MHz celeron and mine is a
1.1 GHz celeron. I can't figure out why this is happening in such a specific
case. When this happens, there are many packets that get sent/received. But
ODBC performance monitoring and logging does not show anything on my machine
( I guess because the web app overrides the flag and disables both
monitoring and logging), so I can't tell what is in those packets.

Someone else posted a similar problem on this group on 2003.04.29 but there
was no response.

Anyone seen something like this before?

W2K professional
VS 2003
ODBC 3.52
Oracle in OraHome81 8.01.78.00
System.Data.OracleClient.dll 1.1.4322.573
Remote Oracle server 8.1.7.0.0
--- Web Application ----

<%@ Page Language="JScript" AspCompat="true" %>
<%@ Import Namespace="System.Data.OracleClient" %>

<%
var connection = new System.Data.OracleClient.OracleConnection("Data
Source=gxic;Unicode=True;;User Id=blah;Password=blah;");
var t1 = new Date().getTime();
connection.Open();
var t2 = new Date().getTime();
connection.Close();
var seconds = t2 - t1;
Response.Write("open took " + microseconds + " microseconds");
%>

---- Console Application ----

using System;
using System.Data.OracleClient;

namespace ConsoleApplication1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
OracleConnection connection = new OracleConnection("Data
Source=gxic;Unicode=True;;User Id=blah;Password=blah;");
Console.Write("opening...");
connection.Open();
Console.Write("closing...");
connection.Close();
}
}
}


Nov 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I solved my problem... so, ADO.NET does not use ODBC :P The solution was to
edit machine.config, specifically the processModel element. The username was
set to "machine". First, I tried setting username/password to a local admin
account, but that didn't work.So I changed it to "SYSTEM" and that fixed it.
It's weird because my coworkers are using "machine" in their config files,
but for some reason I need to use "SYSTEM".

Kevin

"Kevin Vogt" <te********@qayo.com> wrote in message
news:eX8kb.39078$S_.19201@clgrps13...
When initially loaded, my web application (below) takes ~120000 milliseconds to open its connection. But repeated executions take 0 milliseconds each.
But when I wait for approx. 5 minutes and try again, it takes another 120000 milliseconds for Open(). This behavior gets really irritating with the real web application that I'm working on.

But the thing I don't understand is, when I make a console app that does the same sort of thing, the problem is
not there at all; that app executes < 1s each time. I can also use other
apps (e.g. Golden32) that use the same ODBC connector, and they work fine.
And, I created the same web app on my co-worker's machine, and it initially runs at 20000 ms, even though his machine is a 300 MHz celeron and mine is a 1.1 GHz celeron. I can't figure out why this is happening in such a specific case. When this happens, there are many packets that get sent/received. But ODBC performance monitoring and logging does not show anything on my machine ( I guess because the web app overrides the flag and disables both
monitoring and logging), so I can't tell what is in those packets.

Someone else posted a similar problem on this group on 2003.04.29 but there was no response.

Anyone seen something like this before?

W2K professional
VS 2003
ODBC 3.52
Oracle in OraHome81 8.01.78.00
System.Data.OracleClient.dll 1.1.4322.573
Remote Oracle server 8.1.7.0.0


Nov 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.