ORA-12571:TNS:在ASP.NET包作家失败 [英] ORA-12571: TNS:packet writer failure with ASP.NET

查看:1495
本文介绍了ORA-12571:TNS:在ASP.NET包作家失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的开发团队正在经历无数 ORA-12571:TNS:使用ASP.NET 3.5和4.0反对的Oracle 11g包作家失败错误。这些错误是因为发生时不一致的,并且由许多应用产生的。而随机调用存储过程,包,内联SQL语句此异常情况发生。甲骨文11客户端安装在Web服务器上。一些应用程序使用微软System.Data.OracleClient的连接到Oracle,有些使用Oracle(ODP.NET)提供的.NET组件。这两个数据访问对象拿出同样的错误。

有一个不同的Web服务器上运行其他非.NET应用程序,但使用相同的数据库服务器。该应用没有任何此类问题。我最初的想法是,有一些与Oracle客户端在Web服务器上配置不正确。

有没有其他人收到此错误?你做了什么来解决这个问题?

  ORA-12571:TNS:包作家失败

堆栈跟踪:

 在System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle,的Int32 RC)
   在System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle,的CommandBehavior行为,布尔needRowid,OciRowidDescriptor&安培; rowidDescriptor,ArrayList的&安培; resultParameterOrdinals)
   在System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle,的CommandBehavior行为的ArrayList和放大器; resultParameterOrdinals)
   在System.Data.OracleClient.OracleCommand.ExecuteReader(的CommandBehavior行为)
   在System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(的CommandBehavior行为)
   在System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(的CommandBehavior行为)
   在System.Data.Common.DbDataAdapter.FillInternal(数据集的数据集,数据表[]数据表,的Int32 startRecord用于,的Int32最大记录,字符串srcTable要,IDbCommand的命令的CommandBehavior行为)
   在System.Data.Common.DbDataAdapter.Fill(DataSet的数据集的Int32 startRecord用于,的Int32最大记录,字符串srcTable要,IDbCommand的命令的CommandBehavior行为)
   在System.Data.Common.DbDataAdapter.Fill(数据集的数据集,字符串srcTable要)


解决方案

另一种可能的解决办法是,你和Oracle数据库之间的防火墙认为你的连接是死了,关闭它,你下面。你只会发现,当您尝试执行查询,并得到ORA-12571错误。

这是通过具有开放很长一段时间没有活动连接造成的。

的解决方案是将SQLNET.EXPIRE_TIME添加sqlnet.ora文件在服务器上,将其设置为某个时间间隔(10)。这将导致连接每隔10分钟被ping通,以确保他们还活着。

这样做的结果是,你的防火墙将看到网络活动,而不是关闭连接。

  SQLNET.EXPIRE_TIME = 10

<一个href=\"https://garethhooper.com/2011/12/11/ora-12571-tnspacket-writer-failure-one-of-the-hardest-problems-ive-had-to-resolve/#more-244\"相对=nofollow> ORA-12571:TNS:包作家失败 - 一个我不得不解决最困难的问题。

My development team is experiencing numerous ORA-12571: TNS:packet writer failure errors using ASP.NET 3.5 and 4.0 against Oracle 11g. These errors are inconsistent as to when they occur, and are generated by numerous applications. This exception happens while calling random stored procedures, packets, and inline SQL statements. The Oracle 11 client is installed on the web server. Some applications use Microsoft System.Data.OracleClient to connect to Oracle, and some use the .NET components provided by oracle (ODP.NET). Both data access objects come up with the same error.

There are other non .NET applications that run on a different web server, but use the same database server. The apps do not have any such issues. My initial thinking is that there is something configured incorrectly on the web server with the Oracle client.

Has anyone else received this error? What did you do to fix it?

ORA-12571: TNS:packet writer failure

Stack Trace:

at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
   at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)
   at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals)
   at System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)

解决方案

Another possible solution is that the firewall between you and the Oracle database thinks your connection is dead and closes it underneath you. You will only find out when you try to execute a query and get the ORA-12571 error.

This is caused by having connections open for a long time with no activity.

The solution is to add the SQLNET.EXPIRE_TIME to the sqlnet.ora file on the server and set it to some interval (10). This will cause the connections to be pinged every 10 minutes to ensure they are still alive.

The result of this is that your firewall will see network activity and not close the connection.

SQLNET.EXPIRE_TIME=10

ORA-12571: TNS:packet writer failure - One of the hardest problems I've had to resolve

这篇关于ORA-12571:TNS:在ASP.NET包作家失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆