Encountering Problem Bank Connection with Visual Studio

Asked

Viewed 44 times

1

Hello, does anyone know if you have any way to find problematic c c# code related to opening and closing database connections? I have an application that after a few hours processing a load when executing a select generates an Idle time error(ORA-02396)

But looking at the structures I could not identify problem in the code on 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 running a database query to capture 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 ask for this parameter to be changed. I was wondering if there is some kind of profiler native to Visual Studio 2012 to help locate "leak points".

1 answer

1


  • Opa, exactly what I need, will help a lot. Thanks Jaspion

Browser other questions tagged

You are not signed in. Login or sign up in order to post.