Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle hangs on create OracleConnection Instance

910556Jan 12 2012 — edited Jan 17 2012
All,

to investigate an issue on a customers system, I wrote a small test program and found a stange behaviour on my system. Testing this small console application under VisualStudio 2010, everything works fine. Starting the same application from the console, it takes 2mins to create an instance of OracleConnection (not open the database!). Putting the application on the server, where the database has been installed the application works fine. I am using Win7 / 64bit, Oracle.DataAccess.dll 4.112.1.2 from ODAC 11.2.0.1.2 , .Net4. The application is compiled for x86.

I developed on my system many applications over last 2 years, never getting an issue.

I am totally confused.

class Program
{
static void Main(string[] args)
{
try
{
DateTime start = DateTime.Now;

String connctionString = "Data Source=xxxx; User Id=xxxx; Password=xxxx";
//Console.WriteLine("Connection: {0}", connctionString);
Console.WriteLine("[1] Create Instance");
OracleConnection con = new OracleConnection();
Console.WriteLine("[2] Attach Connection String (Delay: {0})",DateTime.Now-start);
con.ConnectionString = connctionString;
Console.WriteLine("[3] open (Delay: {0})", DateTime.Now - start);
con.Open();

Console.WriteLine("Connected (Taste)");
}
catch (Exception ex)
{
Console.WriteLine("Error: {0}", ex.ToString());
}

Console.ReadKey();

}
}

Output while start in Visual Studio:
[1] Create Instance
[2] Attach Connection String (Delay: 00:00:00.2183370)
[3] open (Delay: 00:00:00.2339325)
Connected (Taste)

Out put while start in console
[1] Create Instance
[2] Attach Connection String (Delay: 00:02:10.2602631)
[3] open (Delay: 00:02:10.2758650)
Connected (Taste)

Thanks,

Axel

Edited by: user2571633 on 11.01.2012 23:47
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 10 2012
Added on Jan 12 2012
3 comments
334 views