If the application has an open connection for a long time, it is recommended to check whether the connection is still valid, before using it. Call of Ping method has single round trip on Oracle server.
It is not a good idea to keep a connection open for long time. Connection pool automatically pings all connections within, thus closing old connections and opening new ones is encouraged.
If the connection being pinged is not initialized or has the state other than ConnectionState.Open, the method throws an exception.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2