473,320 Members | 1,948 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,320 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 8235
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.