admin管理员组文章数量:1388134
I have a simple application using oci.dll (Oracle.DataAccess and Oracle Instant Client) with the following code:
Console.WriteLine($"Connection create...");
using (var connection = new OracleConnection())
{
var osb = new OracleConnectionStringBuilder()
{
UserID = "user",
Password = "<password>",
DataSource = "database",
Pooling = false,
};
connection.ConnectionString = osb.ConnectionString;
Console.WriteLine($"Connection open...");
connection.Open();
try
{
Console.WriteLine($"Command create...");
using (var cmd = connection.CreateCommand())
{
cmd.CommandText = "select 1 from dual";
Console.WriteLine($"Command open...");
using (var reader = cmd.ExecuteReader())
{
Console.WriteLine($"Reader open...");
reader.Read();
var count = reader.GetDecimal(0);
Console.WriteLine($"DUAL: {count}");
}
}
}
finally
{
Console.WriteLine($"Connection close...");
connection.Close();
}
}
Console.WriteLine($"Done...");
After the application completes (when "Done..." is printed), additional calls to the server occur during the shutdown of the application. Tracing using Oracle trace files reveals the following functions are being executed:
- OpsDecFreeValCtx()
- OpsConFreeValCtx()
- OpsConOpen()
- And further communication via OCIServerAttach() and OCISessionBegin().
This behavior does not occur with oci18, but it happens consistently with oci21.
Question: How can I prevent these additional calls during application shutdown? Are there specific configurations or workarounds for oci21 that would stop this behavior?
Any insights or suggestions are greatly appreciated. Thanks in advance!
本文标签:
版权声明:本文标题:.net - Unexpected Additional Calls to Oracle Server During Application Shutdown Using oci.dll (oci21) – How to Prevent This? - S 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744492366a2608812.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论