i am using this connection string in .net to connect to oracle and keep timing out getting a large result set.
how can i set a longer connection timeout using this connection string?
static private string GetOracleConnectionString()
{
return "User Id=USER;Password=pass;Data Source=(DESCRIPTION=" +
"(ADDRESS=(PROTOCOL=TCP)(HOST=14.12.7.20)(PORT=1139))" +
"(CONNECT_DATA=(SID=QCTRP1)));";
}
return "User Id=USER;Password=pass;Data Source=(DESCRIPTION=" +
"(ADDRESS=(PROTOCOL=TCP)(HOST=14.12.7.20)(PORT=1139))" +
"(CONNECT_DATA=(SID=QCTRP1)));Connection Timeout=60;";
More info on Oracle Data Provider for .NET / ODP.NET
are you looking for a connection timeout on the connection string?
When a connection is closed, the connection pooling service determines whether the connection lifetime has exceeded the value of the Connection Lifetime attribute. If so, the connection is closed; otherwise, the connection goes back to the connection pool. (http://www.connectionstrings.com/oracle)
or are you looking for the CommandTimeout on the command item?
Specifies the number of seconds the command is allowed to execute before terminating the execution with an exception
I think for a long running query you will need to extend the CommandTimeout property... however it defaults to 0 (no limit) so you may want to check that
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