Recently, We have migrated our Oracle 9.2.0.6 production database from Windows 32bit RAC (2 nodes) to Linux 64 bit environment. Linux 64 bit environment has 8 times more memory than Windows 32 bit environment and Linux 64 bit has faster disk ( RAID 10 compare to RAID 5 of windows).
However, after this migration, we have noticed sql connection time has been increased significantly. Some time, it is taking 16 seconds to open a connection. We have used different driver (JDBC, ODBC, OCI) and SQLPlus. But, we have noticed no difference in sql connection time. We have investigated network, but noticed no problem with network.
Some time, it is taking around 16 seconds to open a single connection. This database has around 50000 user schema.
Can anybody tell me what can be done to reduce the connection opening time? Your help would be appreciated.
At the time of writing the first connection pool created in a process would always have a timer interval of 3min 10s, so you'd normally see sql connections being closed somewhere between 3min 10s and 6min 20s after you call Close() on the ADO object.
While the specific details matter in general there is nothing wrong with keeping connections open for long durations. If your application is connection pooling - the connection slots in the pool typically remain connected until they are needed.
Not closing connections could cause timeouts as the connection pool may run out of available connections that can be used. A side point to this. If you use the using keyword, that will automatically close the connection for you.
From MSDN, "Note If the SqlConnection goes out of scope, it is not closed. Therefore, you must explicitly close the connection by calling Close or Dispose." Cheers!
if suddenly the tnsping is become very slow(means it's a all right system before), but ping to the same database server is fast, The most possible reason is the listener.log file is too large:
$ORACLE_HOME/network/log/listener.log
Some OS (SunOS in my experience) will meet writing to a very large text file performance issue(exceed 4G?), so tail/clean the log file will immediately solve the tnsping takes very long time problem.
It was DNS in our case. After our admin commented out all DNS entries on the side of the server the system started responding without delay.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With