Hello, does anyone know if I have any way to find problematic code in C # related to opening and closing database connections? I have an application that after a few hours processing a load while executing a select generates an idle time error (ORA-02396)
But looking at the structures I could not identify problem in the code in the line where the error is reported:
using (OracleConnection con = new OracleConnection(banco))
{
using (OracleCommand cmd = new OracleCommand())
{
cmd.Connection = con;
cmd.CommandTimeout = 500;
cmd.CommandText = sql;
foreach (OracleParameter op in parametros)
{
cmd.Parameters.Add(op);
}
con.Open();
DataTable tabela = new DataTable();
using (OracleDataReader odr = cmd.ExecuteReader())
{
tabela.Load(odr);
}
return tabela;
}
}
When executing a query in the database to capture the user_resource_limit, Oracle's IDLE_TIME was at 30. The problem is that I need to find a solution in the code for the problem without having to request to change this parameter. I wanted to know if there is a kind of native Visual Studio 2012 profiler to help find "leak" points.