0

In our system which connects to Oracle DB we get this kind of error

Internal error not handled (-2).\n   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)

Once this error occurs, then it is continuous, all the further queries even the SELECT statements fails.

The error will start from any random SELECT statement. And there's no pattern on which SQL is causing this issue.

Only possible way to come out of this is to do IISRESET.

After that the system will work normally for 2-3 days. If this error pops up again then the whole system is down again.

Note : I am yet to get the Oracle logs. Will post it when I have those.

Edit 1: We kind of narrowed down the problem. Seems connection leak from our application is the cause of the issue. I will update the post with details once we corner the issue. Thank you all.

  • not a programming question at all. There's a DB admin stackexchange site. You might have better luck there. However, posting this before you get the logs seems pretty premature. – Marcus Müller Aug 21 '15 at 12:07
  • This post might help you http://stackoverflow.com/questions/11327218/how-to-query-oracle-database-based-on-user-input-using-asp-net-c-sharp – Exhausted Aug 21 '15 at 12:07
  • [Have a look at this post](http://stackoverflow.com/questions/23566/what-does-an-iisreset-do). Best of luck. – Bob Jarvis - Слава Україні Aug 21 '15 at 12:50
  • Thanks @MarcusMüller, for your comments, because of people like you I keep myself away from this stackoverflow :) Please refer [link](https://medium.com/@johnslegers/the-decline-of-stack-overflow-7cb69faa575d). I will prove you that this is an application issue than a DB issue :) Thanks by the way for the motivation – Prakash Somasundaram Aug 24 '15 at 12:33
  • @PrakashSomasundaram you're welcome. I stand by it's not a programming question unless you can deduct somehow that it is, and you did not until 50 minutes ago, when you used your *DB administration* skills. So, up until you figuring out *what* was wrong, it was a question of *how to figure that out*, which is an admin question. I hope you still enjoy StackOverflow. – Marcus Müller Aug 24 '15 at 13:25
  • @PrakashSomasundaram: having read that linked page: It's a terrible misconception of what is wrong with StackOverflow. I do agree, not everything is good, but the points they complain about are actually examples of what works well on StackOverflow: Finding questions that might need some working to be more answerable, and pointing people that have questions that already have been answered to exactly the places where they have been answered. If getting help without a more or less friendly nudge "*hey, use the search*" isn't for you, even though you got help, then, well, bad luck. – Marcus Müller Aug 24 '15 at 14:36

1 Answers1

0

Finally we could figure out the reason for the error.

We had some external DB links in our query. In one place this query is combined with the local DB query in a single transaction. This caused the issue.

For some reason the local transaction could not get promoted to distributed transaction.

NOTE : We are still using Miscrosft Oracle Provider to talk to oracle DB

This can be solved if you are

  1. Moving this query to the local DB as a Materialized View and call that view from the application
  2. Setting enlit=false in the connection string (Not recommended)