473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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
1 8246
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kevin Vogt | last post by:
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...
4
by: ben | last post by:
Below is the error message I am receiving on a production server with the Oracle 9.2 client installed. However, on a Oracle 9.0 client installation on the development server the problem does not...
2
by: JJ | last post by:
Hi, I don't know if this is the correct newsgroup to post this question, but here goes. I have installed Visual Studio .Net Professional 2003. I checked the version and it is 7.1.3088. It...
0
by: George | last post by:
I have an aspx page, this page instance a Dll make for me, this Dll imports System.Data.OracleClient, I Add the Reference in the project and use the gcautil -i but the error "Namespace or type...
0
by: Andy Fish | last post by:
Hi, I have an asp.net/ado.net application that I have just ported to work with Oracle, using microsoft's own System.Data.OracleClient. I am having great difficulty working out what configuration...
2
by: jens Jensen | last post by:
Hello, can someone tell me what replaces System.Data.OracleClient .net 2.0? it seems like the namespace was only supported by version 1.1 of the .net framework. many thanks in advance JJ
3
by: chris | last post by:
When I tried to import system.data.oracleclient, it was not available. Do I need to install anything for being able to use it ?
4
by: Peter Kanurer | last post by:
Assume I add in VisualCSharp 2005 References to Oracle.DataAccess AND System.Data.OracleClient to an application. Does this cause problems or can they co-exist in one application ?
4
by: vbcsdotnet | last post by:
hello I run an sql which returns a datarow itemarray field of system.datetime. the problem is the database only stores the date, but the returned value includes a time of 12:00:00 AM. I do not...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.