PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Re: Problem with .NET Provider for Oracle : ORA-01453

Reply

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

 
Thread Tools Rate Thread
Old 21-05-2004, 05:24 PM   #1
Cowboy
Guest
 
Posts: n/a
Default Re: Problem with .NET Provider for Oracle : ORA-01453


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
>
>
>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off