I tried the InitOCI call and it's fast.
The settings of tnsnames.ora are correct.
The time of 2-4 seconds is the only connection time, it's not the query time.
There isn't any event handlers setting.
The server does not do nothing during this 2-4 seconds because the connection hasn't been created yet.
I made lots of tests and I'm absolutely sure that when I connect to sun machines (we have two different sun machines), if I set the connection at true at designtime, when I create the connected component it takes 80 ms, when I set the connection at false at designtime and then I set at true at runtime, the only connection time is 2-4 seconds...
I think that something different happens when the components are connected at runtime, something that waste a lot of time... If I connect to Oracle on Linux machines I don't have this problem. For me it's a rather big problem because I need to connect quickly to the server and I can't specify the logon data at design time.