distributed transaction already begun ORA 02046 - using Link

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Posts: 10
Joined: Sun 13 Feb 2011 12:06
Location: SY

distributed transaction already begun ORA 02046 - using Link

Post by hom_rcp » Sun 13 Feb 2011 13:57

I have a very big problem for me appears with a few steps

* Select on the following view in Oracle

Code: Select all

create or replace view Test_View as
select "ID","USR"
from Test_Table@link_DB;
The link is to Oracle database (eveything is Oracle)
* Using Entity MODAL (Oracle)

That's all,
When I open the page the following exception will be shown (from the first time or after a postBack)

Code: Select all

distributed transaction already begun  "ORA 02046 "
Stack trace:

Code: Select all

   at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
   at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   at System.Data.Objects.ELinq.ObjectQueryProvider.b__2[TResult](IEnumerable`1 sequence)
   at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
   at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)
   at System.Linq.Queryable.Count[TSource](IQueryable`1 source)
   at WebApplication3._Default.Button1_Click1(Object sender, EventArgs e) in D:\FutureGate\Workflow Solution\WebApplication3\WebApplication3\Default.aspx.cs:line 29
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Any help!
Last edited by hom_rcp on Mon 14 Feb 2011 14:20, edited 2 times in total.

Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Mon 14 Feb 2011 14:10

As I can understand, you are trying to create a view that refers to a table from a linked server; am I correct? Please specify the type of this linked server (i.e., is it an Oracle server, or, e.g., a SQL Server instance?) and the exception stack trace.

Posts: 10
Joined: Sun 13 Feb 2011 12:06
Location: SY

Post by hom_rcp » Mon 14 Feb 2011 14:21

I edited the question, thanks.

Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 14 Feb 2011 16:18

I have made a simple test and querying of the database link succeeds on our servers using Entity Framework.
Could you please send us (support * devart * com, subject "EF DBLink problem") a small test project illustrating the issue?

Post Reply