2 Replies Latest reply: Nov 15, 2012 4:45 AM by 638427 RSS

    Very slow first connection with Oracle.DataAccess

      Hello, I'm having some troubles with connecting using Oracle DataAccess component. In particular, when using .Net 4 Framework, the first connection to the database takes about 20-25 seconds!

      Here's my setup:
      - Web server running 64-bit Windows Web Server 2008 SP2 with IIS 7.0
      - Oracle server running 64-bit Windows Server Standard 2008 SP2 with Oracle 11g

      The version of ODAC component is /

      The first strange thing is that, when I set an application on .NET 4 in IIS, I need to "Enable 32-bit Application" in order for it to work.

      I made some tests with a very simple query: "SELECT 1 FROM dual" and here's the results:

      - Classic ASP (ADODB.Connection): a fraction of a second to connect
      - .NET 2 with System.Data.OracleClient: a fraction of a second to connect
      - .NET 4 with Oracle.DataAccess: 20-25 seconds

      Moreover, if I launch the first connection thru Classic ASP, then the .NET 4 connection is very fast, as it happen in any case from the second connection on...
      This way, I excluded the problem is in the connection string, since it's always pretty much the same. I also excluded it could be a TNS problem, since they all use the same TNS (I think).

      That's all I've come up with, and I'm not a big Oracle expert so I hope someone here can help me sorting the situation out!