Re: Problem with .NET Provider for Oracle : ORA-01453

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Cowboy (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 05/21/04


Date: Fri, 21 May 2004 10:24:24 -0500

Are the versions of Oracle equivalent in your dev environment and the
customer's environment? This could be the reason you are getting different
results. Make sure your patch levels are the same, as well.

The normal answer to solve this is to ensure a commit is issued (clear out
the queue) before running SET TRANSACTION to ensure that SET TRANSACTION is
the first command in your batch. The issue here may be some other data
manipulation that is not committed. If you are stacking statements on the
same connection, this could be where you end up with your issue; if so, try
disposing the conn object and creating a new one before the transaction
starts. The object will most likely be pulled from the pool, so the cycles
burned will be extremely low.

-- 
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************
Think Outside the Box!
************************************************
"Demvin" <anonymous@discussions.microsoft.com> wrote in message
news:CC53EB6F-C2C3-4CE1-AA13-D60F08BAA0B3@microsoft.com...
> Hi all,
>
> We have run into some weird problems here, and this oracle error is not
widely documented on the web :
>
> ORA-01453: SET TRANSACTION must be first statement of transaction.
>
> Here is what I do :
>
> 1) I make some select , insert and updates in a database with oracle user
X
> 2) I make some selects in the same database, still with user X but this
time the tables are in another database schema, we have synonyms that point
on these table with make queries on (SELECT statements only)
> 3) With the data I gathered at point 2, I want to insert it in my database
using a transaction. The transaction code is the same that I use when
manipulate the DB like in point 1 : Standard ADO.NET code, it always work
well.
> 4)When I execute my transaction, I get the following error (stacktrace
included) :
>
> ****<error and stack trace>****
>
> at System.Data.OracleClient.OracleConnection.CheckError(OciHandle
errorHandle, Int32 rc)
>    at System.Data.OracleClient.OracleCommand.Execute(OciHandle
statementHandle, CommandBehavior behavior, Boolean isReader, Boolean
needRowid, OciHandle& rowidDescriptor, ArrayList&
refCursorParameterOrdinals)
>
>    at System.Data.OracleClient.OracleCommand.Execute(OciHandle
statementHandle, CommandBehavior behavior, Boolean needRowid, OciHandle&
rowidDescriptor)
>
>    at
System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean
needRowid, OciHandle& rowidDescriptor)
>    at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()
>    at System.Data.OracleClient.OracleTransaction..ctor(OracleConnection
connection, IsolationLevel isolationLevel)
>    at
System.Data.OracleClient.OracleConnection.BeginTransaction(IsolationLevel
il)
>    at GDG.AccesLib.DBOracle.ExecuteTransaction(ArrayList queries, String
connectionString)
>
> ****</error and stack trace>****
>
> The bad thing is that we have this problem only on the customer's server.
The use of synonyms and all the oracle configuration is their resposability,
and they are a bit secretive, so I don't know much.
>
> At our location, everything works fine.
>
> Did anybody deal with this problem before ?
>
> Thanks in advance,
>
> Vincent
>
>
>
>


Relevant Pages

  • Re: Support for XA
    ... I have a need to share an oracle ... but not directly at the database level. ... UR's object cache / Context acts as a software transaction ... it tells each DB transaction to commit. ...
    (perl.dbi.users)
  • Re: Is Interbase still thriving?
    ... short of reengineering the whole SQL and database structure around ... But, considering, as I said, that DB2, Sybase ASE and MS SQL shares ... this approach to transaction consistency, do you really think it could ... Oracle DB. ...
    (borland.public.delphi.non-technical)
  • Re: serializable isolation level behavior question
    ... Should Oracle generate a error? ... Is the OP actually in a transaction? ... Is a serializable transaction protected against truncate? ... Oracle claims that "The SERIALIAZABLE setting specifies serializable ...
    (comp.databases.oracle.server)
  • Re: Oracle transactions and DDL statements.
    ... We've run into yet another problem regarding Oracle (10g -but I doubt ... real showstopper as we use Oracle in a distributed transaction and this ... Ingres and Teradata database system (and possible others I don't know - ... commits no-matter-what after a DDL statement. ...
    (comp.databases.oracle.misc)
  • Re: serializable isolation level behavior question
    ... Daniel A. Morgan ... to Oracle for them to harden their transaction-safety in this regard. ... The innocent ongoing serializable transaction should not be allowed ...
    (comp.databases.oracle.server)