title: Debugging .Net OracleClient error
body: <p>We currently use iBatis and nHibernate on the same website. Performing a save on a specific page causes the following error to be thrown:</p>
  
  <p>System.Data.OracleClient.OracleException: ORA-01453: SET TRANSACTION must be first statement of transaction</p>
  
  <p>Stack trace is displayed at the end of this question. This only happens on this one page (at least that we have seen.) </p>
  
  <p>The code is pretty basic, calling BeginTransaction after verifying that there is not currently an active transaction. I am stumped and looking for ideas:
    1. What might be causing the issue
    2. How to debug / troubleshoot - (for example: is there any way to snoop at the commands being sent to Oracle via the System.Data.OracleClient?)</p>
  
  <p>Thank you for any help.</p>
  
  <p>System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) +304553
     System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor&amp; rowidDescriptor, ArrayList&amp; resultParameterOrdinals) +990
     System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor&amp; rowidDescriptor) +431
     System.Data.OracleClient.OracleCommand.ExecuteNonQuery() +115
     System.Data.OracleClient.OracleTransaction..ctor(OracleConnection connection, IsolationLevel isolationLevel) +377
     System.Data.OracleClient.OracleInternalConnection.BeginOracleTransaction(IsolationLevel il) +101
     System.Data.OracleClient.OracleInternalConnection.BeginTransaction(IsolationLevel il) +4
     System.Data.OracleClient.OracleConnection.BeginDbTransaction(IsolationLevel isolationLevel) +63
     System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction(IsolationLevel isolationLevel) +10
     NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel) +176</p>